Re: Streaming audio to built-in audio device
Re: Streaming audio to built-in audio device
- Subject: Re: Streaming audio to built-in audio device
- From: "B. Mitchell Loebel" <email@hidden>
- Date: Mon, 07 May 2007 01:39:57 -0700
Thank you Stephen.
Several other guys on this list made a number of suggestions including
the one you offered below. I think I'm on the right track now. I'll know
in a few days. 'Til then, thanks again.
At 12:24 AM 5/7/2007 -0700, Stephen Davis wrote:
On May 6, 2007, at 5:58 PM, B.
Mitchell Loebel wrote:
Cutting to the chase
...
The solution I'm seeking doesn't have a user interface ... my host app
does that. So I'm looking for a code snippet to hard wire into my app.
I'm not even looking for a plug-in because that implies dynamic loading
by my app at launch time.
I did some looking in the Apple refs and came up with TN2097,
DefaultOutputUnit, and the notion of an
AudioStreamBasicDescription struct. I can assign all the parameters
that are important to me into that struct ... good. I also saw a way to
set up a renderCallback method ...
- "that will be used as the input procedure when rendering data
to
- the AudioUnit. The input procedure will be called only when the
Audio
- Converter needs more data to process" (quoting TN2097)
Question ..
how do I instantiate the
DefaultOutputUnit without having to become a Component Manager
expert ;-).
TN2097 described how I should bind a renderCallback method into the AU
... good. I see where the Audio Unit is the 'consumer' of my data ... my
app is the 'producer'. Having told the Audio Unit the size and shape of
my frames (my app will load a buffer with a frame for the Audio Unit to
'pull'), I'd like to pass a pointer to the AU when it needs more data to
drive its D/A and speakers. I saw somewhere that the renderCallback is
supposed to return a ComponentResult, but I can't find out what that
looks like ... question. I do know
what my renderCallback function needs do to create the pointer to my
buffer ... my app does that coding.
Finally, I need to know how to start and stop the Audio Unit
engine.
I think most of the questions I've raised would be answered if I could
find a list of functions associated
with the DefaultOutputUnit ... in C.
Are you able to point me there please?
It won't answer all of your questions but take a look at the usage of the
DefaultOutputUnit in the "SimpleSDK" at
/Developer/Examples/CoreAudio/SimpleSDK/DefaultOutputUnit. That's
about as minimal as you can get.
hth,
stephen
---
B. Mitchell Loebel, Executive
Director
408 425-9920
The Tech Startup Connection
(formerly The PARALLEL Processing Connection)
_______________________________________________
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