Re: Multiple outputs for the same source
Re: Multiple outputs for the same source
- Subject: Re: Multiple outputs for the same source
- From: William Stewart <email@hidden>
- Date: Tue, 24 May 2005 17:07:20 -0700
On 24/05/2005, at 3:55 PM, Felipe Baytelman wrote:
Thanks Bill! Sorry for posting everything separated, but I think is
better to isolate different questions :D
(Tell me if I should post them all together next time)
It comes up by default with two output buses - so you call
AURender on it, providing output el==0 and then again output el==1
to get those two outputs
Bill
I'm not sure how to do this. Can you give me a little example?
OK - Here's the following loop:
numOutputEls is the number of output elements
bufferList is an array of AUBufferList (size is numOutputEls)
descs is an array of CAStreamBasicDescriptions (size is numOutputEls)
mAU is a CAAudioUnit...
inNumFrames is the number of frames you need
inTime is a TimeStamp
for (unsigned int i = 0; i < numOutputEls; ++i)
{
bufferList[i].Allocate (descs[i], inNumFrames);
bufferList[i].PrepareBuffer(descs[i], inNumFrames);
AudioUnitRenderActionFlags flags = 0;
OSStatus result = mAU.Render (&flags, &inTime, i, inNumFrames,
&bufferList[i].GetBufferList());
}
// you must increment this after you've rendered one cycle through
the outputs
// make sure that mSampleTime is the ONLY valid time stamp field (see
AudioTimeStamp in CoreAudioTypes.h)
inTime.mSampleTime += inNumFrames;
The bufferList array now has the results of rendering for each of the
output buses - do something with them :-)
You MUST prepare the buffers each time before you call Render - the
first time through, Allocate will allocate the memory you need, next
time through these two calls just set up the buffer list for you.
On 24-05-2005, at 15:48, William Stewart wrote:
No - this is called fan out (and there's a corollary on input too,
fan in).
The reason we don't support this is that *every* AU would have to
support it, and this would mean every AU would have to bufffer its
render results, which would also preclude in-place processing
(aside from the memory ramifications)
You can use the splitter AU in Tiger (which is a simple wrapper
around the general functionality provided by the matrix mixer au)
to achieve this
Bill
Sure! That's why I'm asking about the AUSplitter. Is there any way
I could do this in Panther? Through the matrix mixer au? Is there
any example on how to do this for different outputs?
MatrixMixer - the Splitter is an AU that wraps up a MM
Bill
--
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