Superclasses :
AUBase
Subclasses :
AUMIDIEffectBase, AUInlineEffectBase
Header : AUEffectBase
class AUEffectBase : public AUBase
This class supports effects processes with one input and output stream where the
number of input channels is equal to the number of output channels.
A subclass of AUKernelBase is used to encapsulate the signal processing.
Methods
Constructor
AUEffectBase(
AudioUnit audioUnit,
bool inProcessesInPlace = true
);
Destructor
|
public nonvirtual destructor
|
~AUEffectBase();
Deletes the AUKernelBase objects.
Format
virtual ComponentResult ChangeStreamFormat (
AudioUnitScope inScope,
AudioUnitElement inElement,
const CAStreamBasicDescription& inPrevFormat,
const CAStreamBasicDescription& inNewFormat
);
Internal. Overridden to update kernels and sample rate dependant properties when a stream format is changed.
Float64 GetSampleRate();
Returns the sample rate.
virtual bool StreamFormatWritable (
AudioUnitScope scope,
AudioUnitElement element
);
Overridden to return true.
Other
virtual void Cleanup();
UInt32 GetNumberOfChannels();
Returns the number of channels through the unit.
virtual ComponentResult Initialize();
Overridden to initialize dsp kernels.
bool IsBypassEffect ();
Return whether the effect bypass is on.
|
private nonvirtual method
|
bool IsInputSilent (
AudioUnitRenderActionFlags inActionFlags,
UInt32 inFramesToProcess
);
void MaintainKernels();
Internal. Allocates or frees enough kernels to track changes in the effect's channel count.
virtual AUKernelBase* NewKernel();
Override this method to return an instance of a subclass of AUKernelBase that implements your effect process.
virtual OSStatus ProcessBufferLists(
AudioUnitRenderActionFlags& ioActionFlags,
const AudioBufferList& inBuffer,
AudioBufferList& outBuffer,
UInt32 inFramesToProcess
);
Internal. Calls the Render method of the AUKernelBase object.
virtual void SetBypassEffect (bool inFlag);
virtual bool ShouldBypassEffect ();
Parameters
bool GetParamHasSampleRateDependency () const;
Float32 GetParameter(UInt32 paramID);
This is an overloaded function name which has no scope argument. Used for convenient access to global scope parameter values.
void SetParamHasSampleRateDependency (bool inFlag);
void SetParameter(
UInt32 paramID,
Float32 value
);
This is an overloaded function name which has no scope argument. Used for convenient access to global scope parameter values.
Properties
virtual ComponentResult GetProperty (
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void* outData
);
Overridden to support kAudioUnitProperty_BypassEffect.
virtual ComponentResult GetPropertyInfo (
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
UInt32& outDataSize,
Boolean& outWritable
);
Overridden to support kAudioUnitProperty_BypassEffect.
virtual ComponentResult SetProperty(
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
const void* inData,
UInt32 inDataSize
);
Overridden to support kAudioUnitProperty_BypassEffect.
Rendering
virtual ComponentResult Render(
AudioUnitRenderActionFlags& ioActionFlags,
const AudioTimeStamp& inTimeStamp,
UInt32 inNumberFrames
);
Overridden to use AUKernelBase object to perform rendering.
virtual ComponentResult Reset(
AudioUnitScope inScope,
AudioUnitElement inElement
);
Overridden to reset all kernels.
Data
Other
|
private instance variable
|
bool mBypassEffect;
If true, then buffers are passed through without calling the unit's rendering code.
This flag is set by the property kAudioUnitProperty_BypassEffect.
See also IsBypassEffect.
|
protected instance variable
|
KernelList mKernelList;
A list of all of the dsp kernel objects. See AUKernelBase.
|
private instance variable
|
bool mParamSRDep;
|
private instance variable
|
bool mProcessesInPlace;
|
private instance variable
|
AUSilentTimeout mSilentTimeout;