• 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:'pass through' audio units
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: 'pass through' audio units
      • From: Stephen Davis <email@hidden>
  • Prev by Date: Observing CurrentPlayTime in AUScheduledSoundPlayer
  • Next by Date: Re: 'pass through' audio units
  • Previous by thread: Re: 'pass through' audio units
  • Next by thread: Re: 'pass through' audio units
  • Index(es):
    • Date
    • Thread