Hey Denis,
I haven’t used the AudioQueue api much but
I know there is some sample code that could help you:
http://developer.apple.com/library/mac/#samplecode/AudioQueueTools/
One week ago I have this sample to do some
testing on the iphone, using a modified version of aqrender.cpp, and maybe it
could be a good starting point for you.
I don’t know about latency; however I
assume that this can be as low as you want if you use the AudioQueue in offline
mode, and feed the PCM data of it to your processing algorithms or directly to
the output callback that fills the buffers of the output audio unit. Don’t take
my word for it, do some testing it could also be a bad idea. There is also
aqplay.cpp example that maybe already fits your need. I would suggest that you
just play around with it.
Also, keep in mind that AudioQueue is the
only API that will let you use the hardware decoder and encoder (Anyone… please
correct me if I am wrong). The Audio Converter Services can decode and encode
compressed data (mp3 (decode only), acc, etc) but everything is done in software,
so it is a bit faster in software but it eat some cpu time that could be useful
for your processing algorithms.
I hope this help!
Stephane … your old colleague from
MUMT-306 307 ;-)
From:
coreaudio-api-bounces+sbeauchemin=email@hidden
[mailto:coreaudio-api-bounces+sbeauchemin=email@hidden] On Behalf Of Denis Lebel
Sent: November-01-10 10:21 PM
To: email@hidden
Subject: AudioQueue Services
approximate latency?
Hi,
What's the approximate latency one might experience while using the
AudioQueue Services API, both on OS X and iOS devices? If not able to answer
that, would you say it's generally low enough so it isn't perceivable? I'm
trying to figure out whether I could get away with using that API or if I
should start developing at a lower level right away. FYI, the app I'm working
on requires some basic i/o (using default audio devices), with
simultaneous [compressed] file playback, and some audio analysis+processing, on
both OS/platforms.