• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom AudioUnit PROCESS function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom AudioUnit PROCESS function


  • Subject: Re: Custom AudioUnit PROCESS function
  • From: Marc Poirier <email@hidden>
  • Date: Mon, 10 Jan 2005 13:01:08 -0500

When you have interchannel dependencies, or unmatched numbers of input and output channels, you can't use the AUKernel thingy, you have to override AUEffectBase::ProcessBufferLists() to do DSP.

Marc



On Jan 9, 2005, at 4:32 AM, Felipe Baytelman wrote:

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
References: 
 >Custom AudioUnit PROCESS function (From: Felipe Baytelman <email@hidden>)

  • Prev by Date: Re: Finding documentation about error codes
  • Next by Date: Re: Strange sysex problems
  • Previous by thread: Custom AudioUnit PROCESS function
  • Next by thread: Re: Custom AudioUnit PROCESS function
  • Index(es):
    • Date
    • Thread