[jmsl] pause a musicjob?

jmsl at music.columbia.edu jmsl at music.columbia.edu
Fri Oct 17 09:38:37 EDT 2008


Hi Peter

Great problem, with no straightforward solution.  You mean a situation 
where a MusicJob with a repeat pause of say 10 seconds is "paused" 2 
seconds into that repeatPause and then when resuming playback waits the 
remaining 8 seconds and continues?

The problem is that JMSL.sleepUntil() has already been called, which 
calls Thread.sleep() which is waiting to wake up 10 seconds later. I 
guess I could something weird like store the  current time when pause is 
engaged, interrupt the thread, and upon interruption calculate how much 
time is left, have it wait forever while in pause, then upon resume 
interrupt again and sleep for the stored difference.  Phil might have a 
more coherent answer than this one...

Thanks as usual for shaking up my brain!
Nick

jmsl at music.columbia.edu wrote:
> Is there any easy way to pause a MusicJob?  I'm building a transport 
> and I'd love to be able to pause/rew/ff, etc.
>
> I've been poking around with various combinations but to no avail, and 
> any help is much appreciated.
>
> thanks,
> Peter McCulloch
> _______________________________________________
> jmsl mailing list
> jmsl at music.columbia.edu
> http://music.columbia.edu/mailman/listinfo/jmsl


More information about the jmsl mailing list