From: conrad berhrster
<conrad.berhoerster(a)gmx.de>
Now the question:
- The worker thread is faster then the jackthread. (Sure, it should be). What
is the usual way to pause the workerthread and wake up again, when the
ringbuffer needs more data.
My alsashmrec uses
kill((pid_t)diskpid,SIGSTOP); (in disk writer process)
and
kill((pid_t)diskpid,SIGCONT); (in A/D reader process)
Perhaps that could be replaced with semaphore but what if
multiple processes uses the same disk service process?
That increases the number of SIGCONTs but otherwise the
processes would be uncoupled. How it is with semaphores?
- How should the ringbuffer be initilized when starting
to play?
Fill it up if its size was selected optimally.
If you have multiple songs and you don't know which the user
would like to play next, then make one ringbuffer per song and
fill them all up. Then the playing can start instantly when user
presses the song button.
Juhana
--
http://music.columbia.edu/mailman/listinfo/linux-graphics-dev
for developers of open source graphics software