[PlanetCCRMA] general question

fonse006 fonse006@csusm.edu
Sun Aug 21 22:02:01 2005

>===== Original Message From "Alexander Car�t" <alexander_carot@gmx.net> 
>Hi to all,
>In terms of audio delay I've been using RtAudio with PlanetCCRMA (FC3) for
>quite some time. Yesterday it was the first time that I measured the latency
>and found out that it is at about 16ms (!).
>I recorded the direct sound of a mic to the left channel of an external
>sound recorder and to the right I recorded the captured output of RtAudio.
>In case of using 32kHz with 128 Samples/Frame I should get 4ms but it is at
>least 16ms with any other configurations as well.
>I suppose this must be something due to the system - do I have to especially
>switch on the ll-patch in FC3 or is this something due to FIFO
>scheduling,thread priority and interrupts ?
>Thanks a lot in advance
>-- A l e x

I am not 100% positive that I understood how you measured that, but I think 
that you might be confused as to what latency is.  Latency is how long your 
system buffers audio before it actually interrupts the processor to work on 
that chunk of audio.  For instance you are working with your setup jack tries 
to guarantee that no audio will sit in a buffer for more than 4ms.  It does 
not guarantee that  your audio stream will only be buffered once nor does it 
guarantee that your audio stream will only take 4ms to make it through your 
entire audio path.  If I understand the way you made your measurements right 
the path that one channel took was quite a bit longer than the other.  This 
will create several extra buffers that your audio stream had to wait 4ms in.  
Add in the extra time that the stream spent getting transferred in and out of 
the processor and there is the extra time that you are seeing.  As far as I 
know there is no easy way to audit how the latency measurement that jack gives 
you, but I think that it is unlikely that jack is wrong in that regard.  
Anyway, that is what I think is happening.  If I am way off base sorry and 
feel free to correct me.