• 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
Custom AudioUnit PROCESS function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Custom AudioUnit PROCESS function
      • From: Chandrasekhar Ramakrishnan <email@hidden>
    • Re: Custom AudioUnit PROCESS function
      • From: Stefan Gretscher <email@hidden>
    • Re: Custom AudioUnit PROCESS function
      • From: Marc Poirier <email@hidden>
  • Prev by Date: RE: Re: Strange sysex problems
  • Next by Date: Re: Strange sysex problems
  • Previous by thread: Re: low level sound file access somehow?
  • Next by thread: Re: Custom AudioUnit PROCESS function
  • Index(es):
    • Date
    • Thread