Custom AudioUnit PROCESS function
Custom AudioUnit PROCESS function
- Subject: Custom AudioUnit PROCESS function
- From: Felipe Baytelman <email@hidden>
- Date: Sun, 9 Jan 2005 18:32:08 +0900
I want to make a really simple AudioUnit that flattens the stereo
signal in two symmetric mono signals, and control the volume of each
channel independently (I don't know if I can do that without an AU).
Then, this is the example passthough function:
UInt32 nSampleFrames = inFramesToProcess;
const Float32 *sourceP = inSourceP;
Float32 *destP = inDestP;
while (nSampleFrames-- > 0) {
Float32 inputSample = *sourceP;
sourceP += inNumChannels; // advance to next frame (e.g. if stereo,
we're advancing 2 samples);
// we're only processing one of an arbitrary number of
interleaved channels
// memcpy is really better at doing this!!!!!
// here's where you do your DSP work
Float32 outputSample = inputSample;
*destP = outputSample;
destP += inNumChannels;
}
How do I know which bus (I assume a bus is one of the Stereo channel)
I'm processing?
For example, if I'm processing bus number two, I need to go back one
sample to merge it...
if I'm processing bus number one I should look one forward...
h... h... help. =D
Thanks.
--
Felipe Baytelman
email@hidden
080 5498 9347
email@hidden
_______________________________________________
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