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

From: conrad berhörster <conrad.berhoerster@email-addr-hidden>
Date: Fri Jul 14 2006 - 14:27:14 EEST

Hello maarten and dmitry and the rest,
 
thanks for the quick answers.
Faster means, that the workerthread is called more often than the jackthread
and that the workerthread can possible fill more data then jack will need.
So i try the semaphore wake thing . first i must read about semophores. never
had used them before.
this will take some minutes .

sizu c~

Am Freitag 14 Juli 2006 12:16 schrieb mdeboer@email-addr-hidden:
> Hi Conrad,
>
> > Now the question:
> > - The worker thread is faster then the jackthread. (Sure, it should be).
>
> Faster, but it might be irregular. That's what determines the ringbuffer
> size.
>
> > What
> > is the usual way to pause the workerthread and wake up again, when the
> > ringbuffer needs more data.
>
> I use usleep, though I am suppose that's a bit crude.. Is the ringbuffer
> full? Then sleep a little bit. If not, read N samples from disk and write
> it in the buffer.
>
> > -Which size should the ringbuffer have.
>
> I think this depends on many factors, such as hard disk speed.
>
> > - H oxw should the ringbuffer be initilized when starting to play?
> > - Any small program to have look into or a good inroduction into
> > pthreads?.
>
> Another question is: how much time in advance should the workerthread
> start reading, in order the have the first buffer filled when the
> playerthread needs it?
>
> I also observed that launching a thread can take a long time (esp. on
> MacOSX), so I suppose you want to have the workerthread launched in
> advance, and make it start reading when you need it.
>
> maarten
Received on Fri Jul 14 16:15:06 2006

This archive was generated by hypermail 2.1.8 : Fri Jul 14 2006 - 16:15:06 EEST