Re: Changing the latency from within the render callback.
Re: Changing the latency from within the render callback.
- Subject: Re: Changing the latency from within the render callback.
- From: Marc Poirier <email@hidden>
- Date: Fri, 27 Feb 2004 11:06:03 -0500 (EST)
Would it be possible to do your own buffering based on the
MaxFramesPerSlice value, so that your latency is always fixed at that and
not dependent on the size of each slice? This may result in higher
latency in some cases, but I would be inclined to think that higher but
constant latency is better than lower but variable latency...
Marc
On Fri, 27 Feb 2004, Philippe Wicker wrote:
>
Some times ago I published on my web site the sources of a set of tools
>
enabling audio communication between processes. II share my spare time
>
between this project and another more "usual" one for which there is no
>
such latency problem. Recently there has been a thread on this list
>
called "multithreaded mixer" which showed me that the synchronization
>
method I'm currently using between a source audio thread in one process
>
and a destination audio thread in another process is not compliant with
>
real time thread scheduling constraints (the destination thread is
>
blocked waiting for the source thread to complete its rendering, which
>
is the "number one bad thing to do" according Jeff Moore's answers). So
>
I have to change my synchronization technique. In some configuration
>
(e.g. if an AU subgraph belonging to process A is inserted in an AU
>
chain in a host running in process B, then the audio is sent through a
>
"send plug" and received back via a "return plug") I need the audio be
>
rendered by the part of the AU chain B located ahead of the "send" port
>
before I can send it to the external AU subgraph A and get it back via
>
the "return" port to end the render. Because I cannot block the audio
>
thread B, one solution is to use a ping-pong shared buffer between both
>
threads. Hence the latency of one buffer.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.