Re: Non-symmetric Audio Units
Re: Non-symmetric Audio Units
- Subject: Re: Non-symmetric Audio Units
- From: Doug Wyatt <email@hidden>
- Date: Fri, 10 Aug 2001 02:09:06 -0700
On Thursday, August 9, 2001, at 11:21 PM, Roger Butler wrote:
I'm working on a non-symmetric algorithm for a new audio unit. The
algorithm takes up to six channels of audio as input and produces
two-channel output. I'd like to know how to use RenderSlice() to
achieve
this aim. At WWDC 2000 we were told that audio units could be
non-symmetric
but the AudioBuffer structure passed to RenderSlice() looks like it
assumes
the same number of input channels as output channels.
Can we do something as simple as change ioData->mNumberChannels (where
ioData is an AudioBuffer instance) to the number of outputs we're
supplying?
Do we have to use multiple bus numbers? Are there AU parameters that
give
the number of input or output channels? Does it just depend on the
number
of channels the AU in front or behind our AU has? Or is there another
way
of rendering non-symmetric audio?
When RenderSlice is called, you (the audio unit) are being told how many
channels your destination expects you to produce. You have to produce
this number of interleaved channels.
When you call your source unit or input callback function, however, you
are free to pass an AudioBuffer structure with any number of channels
you wish to ask your source for, and your source will have to produce
that number of interleaved channels.
You can use multiple input busses to combine multiple interleaved
streams, if that makes sense in the kinds of situations in which you
expect your unit to be used.
Looking ahead, it would make sense for there to be a standard way to
configure the format of a unit's input callback, or interrogate the
upstream unit's output stream format.
Doug
--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden
http://www.sonosphere.com
"There is real magic in enthusiasm.
It spells the difference between mediocrity and accomplishment."
-- Norman Vincent Peale