Re: Multichannel audio and sharing data between channels of an audio unit?
Re: Multichannel audio and sharing data between channels of an audio unit?
- Subject: Re: Multichannel audio and sharing data between channels of an audio unit?
- From: Brian Willoughby <email@hidden>
- Date: Mon, 9 May 2005 16:19:44 -0700
Oli,
There is one object per AU instance, plus one kernel object per channel. If
you have a mixture of effect-wide and per-channel data, then you can manage
this by placing some variables in the main object, and the other variables in
the kernel object, ass appropriate. In your kernel code, you need to follow
the pointer to the main object to find those "global" variables. You may have
to cast the pointer to access your added variables. Look at the AUEffectBase
source for more information.
For example, my AUrider links the channel volumes. The variables associated
with the auto-gain are placed in the main object and are accessed from the
kernel objects to keep all channels at the same level.
If only simple variables are shared among the channels, then you probably want
to continue to use AUEffectBase, but put some of the code in the Render()
function. However, if your algorithm needs to access data for more than one
channel at the same time, then you want to avoid AUEffectBase and work with
AUBase instead.
Brian Willoughby
Sound Consulting
Begin forwarded message:
From: Oli Donald <email@hidden>
Date: Mon, 9 May 2005 20:47:48 +0100
Subject: Multichannel audio and sharing data between channels of an audio unit?
Hi,
I have another question that should be easy to answer - how exactly
does multichannel audio work with AudioUnits? Searching the docs
didn't turn up much info, but a Google search revealed that the
'inNumChannels' parameter of AUKernel::Process() is always '1'. In
this case, how exactly is multichannel sound handled by AU's?
Are seperate instances of your AU created for each channel? If this
is so, how can I synchronize data between two or more channels in my
AudioUnit? At the moment, if my AU runs in stereo, the two channels
get out of sync with certain parameters. For example, when I click
the 'clear buffer' button in my GUI, I memset() my AU's buffer to
0's, but only one channel becomes silent.
I'm a good C and ObjC programmer, but my C++ knowledge is virtually
non-existant, I think this might be the source of my problems ;) Any
help appreciated though.
Thanks,
Oli
_______________________________________________
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