Re: Sound File Signal Flow
Re: Sound File Signal Flow
- Subject: Re: Sound File Signal Flow
- From: Brian Willoughby <email@hidden>
- Date: Wed, 1 Sep 2010 19:46:33 -0700
On Sep 1, 2010, at 18:55, GW Rodriguez wrote:
So this question I am sure is very fundamental, and my difficulty
in finding the answer may be from my years of sound engineering. I
think in terms of signal flow, like water through a pipe.
If I am using Audio Queue to play a sound file and I want to send
it out using AUHAL, how do the two connect to each other? What
part of the code says: "hey audio file, i want you to send your
enqueue buffers to %@", [some audio unit].
Is it programmed into the queue callback or is it done by the AU,
the pull model?
Interesting analogy. All of CoreAudio works on the pull model, so
think of a vacuum sucking water from the sources rather than water
pressure causing the flow towards the outputs.
I can't say how AudioQueue works internally (other may pipe up), but
there is an AU which can read a file. AUAudioFilePlayer still
operates on the official CoreAudio pull model, so rather than the
audio file sending buffers somewhere, the AUAudioFilePlayer responds
to pull callbacks from the output unit by providing pre-queued file
buffers. The AU has to do some amount of advance buffering so that
it never has to wait for disk at a critical moment, but apart from
that you can think of it as purely pull model.
I imagine that AudioQueue uses AUAudioFilePlayer or similar code in
order to get its job done.
I work with AUGraph, not AudioQueue, and with AUGraph you can connect
directly between AUs and AUHAL. In other audio system designs, the
programmer might need to manually make the link between the AUHAL
callback and the rest of the AUs. For example, inside the AUHAL
callback, your code could pull from any number of other AUs or an
AUGraph. Since all of these building blocks are supposed to be safe
for real-time callbacks, you can fit them together as you need.
Brian Willoughby
Sound Consulting
_______________________________________________
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