[linux-audio-dev] Re: diskstream and jack

From: Juhana Sadeharju <kouhia@email-addr-hidden>
Date: Thu Jul 20 2006 - 23:05:02 EEST

>From: conrad berhrster <conrad.berhoerster@email-addr-hidden>
>
>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
Received on Fri Jul 21 00:15:04 2006

This archive was generated by hypermail 2.1.8 : Fri Jul 21 2006 - 00:15:04 EEST