Re:'pass through' audio units
Re:'pass through' audio units
- Subject: Re:'pass through' audio units
- From: Justin Carlson <email@hidden>
- Date: Thu, 31 May 2007 15:20:41 -0500
Hi Patrick and Patrick,
Wouldn't this be essentially the same as an "amplifier" audio unit
with unity gain?
Yes - here is the (unverified) code to pass the samples through. The
example could be improved and is essentially the default starter AU
with a few things removed. This is based on AUKernelBase's Process
which is used with AUEffectBase, so you should be able to get started
immediately.
void BypassAU::Process( const Float32 *inSourceP, Float32 *inDestP,
UInt32 inFramesToProcess, UInt32 inNumChannels, bool &ioSilence )
{
UInt32 nSampleFrames = inFramesToProcess;
const Float32 *sourceP = inSourceP;
Float32 *destP = inDestP;
// Insert any per-buffer analysis code
while (nSampleFrames-- > 0)
{
Float32 inputSample = *sourceP;
sourceP += inNumChannels;
Float32 outputSample = inputSample;
// Insert any per-sample analysis code
*destP = outputSample;
destP += inNumChannels;
}
}
I think your approach would work fine for many applications. An AU
that performs this operation and has no UI requires extremely little
overhead. I tested hundreds of such instances (quite a while ago) on
a PowerMac G4, the demand was surprisingly small.
Cheers,
J
_______________________________________________
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