Re: Lowest latency I/O
Re: Lowest latency I/O
- Subject: Re: Lowest latency I/O
- From: William Stewart <email@hidden>
- Date: Mon, 18 Jul 2005 11:15:41 -0700
Christof
The MOTU device provides an I/O proc that contains both input and
output data; its a full duplex device. If you are using the AUHAL
audio unit then it is possible in fact to make a direct connection
like this:
AUGraphConnectNode (myGraph, outputNode, 1, outputNode, 0) // connect
the output 1 of the "output node" to the input 0 of the "output node"
You can of course put almost any AU(s) in between these to do
processing. Then all of this processing is done in the I/O Proc as
you describe below.
If, when using the AUHAL audio unit, you are using the callback for
input (as in the TechNote example), then that is going to call you on
the same I/O Proc as soon as it executes - the input is there in the
same thread/same callback as you are called on to produce output.
As BJ explains, if you are dealing with 2 devices, then you have the
possibility of a beating between the input and output device threads.
However, with Tiger we introduced the AggregateDevice - this joins up
nominated audio devices into a single "aggregated" device. Then, for
the client applications, it looks similar to say the MOTU interface
which presents all of its inputs and outputs at the same time; so you
can use the same techniques.
You can easily make an aggregate device - go to the Audio MIDI Setup
and have a look in the Audio Menu
Bill
On 18/07/2005, at 8:17 AM, Christof Faller wrote:
Dear list,
My questions seem to be not concise enough: :-)
I need lowest possible latency and plan to directly pass the
(processed)
sampled getting from the input callback to the output callback.
In order to do this properly I have a question: Is it guaranteed that
while I am in one callback (e.g. input) the other callback (e.g.
output)
is not called? Or do I have to be afraid that while I do input
callback
processing, the output callback may be called?
Any comments on this topic are appreciated, thanks,
Christof
On Jul 16, 2005, at 7:56 AM, Christof Faller wrote:
Dear list,
For a real-time audio processor with lowest possible latency, I am
using the
input and output callback functions by passing what I had received
from the input
to the output, without any double-buffering. (For example I use
Apple PowerBook
analog-in to MOTU 896 8-channel-out).
The processing I do is in the input callback. The audio processing
needs about
15% of processor load (i.e. to process 100s it needs 15s). Once in
a while my
application runs with a lot of artifacts. Several times stopping
and re-starting
the audio often helps.
Here a question regarding the possible cause of this:
Is it possible that the output callback is called
while the processor is in the input callback (where I do the
processing)?
(This could explain these artifacts, since I use no double-
buffering).
Another questions regarding overall latency:
For example if I use a MOTU 896 for input and output
with a 10ms audio buffer, what is the overall latency of the system -
any estimates? (Latency is very cruicial, since the processing I
do is
planned for a PA system). Can I get much lower latency than the
MOTU 896
with a PCI card based audio device, or another type of firewire based
audio device?
Any comments are appreciated, thanks,
Christof
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40volny.cz
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden