AEAudioUnitModule Class Reference

Audio unit module. More...

#import <AEAudioUnitModule.h>

Inherits AEModule.

Inherited by AEAudioFilePlayerModule, AEBandpassModule, AEDelayModule, AEDistortionModule, AEDynamicsProcessorModule, AEHighPassModule, AEHighShelfModule, AELowPassModule, AELowShelfModule, AENewTimePitchModule, AEParametricEqModule, AEPeakLimiterModule, AEReverbModule, and AEVarispeedModule.

Instance Methods

(instancetype _Nullable) - initWithRenderer:componentDescription:
 Default initializer.
 
(instancetype _Nullable) - initWithRenderer:componentDescription:subrenderer:
 Sub-renderer initializer.
 
(double) - getParameterValueForId:
 Get an audio unit parameter.
 
(void) - setParameterValue:forId:
 Set an audio unit parameter.
 
(BOOL) - setup
 Setup audio unit.
 
(void) - initialize
 Initialize audio unit.
 
(void) - teardown
 Cleanup audio unit.
 
(AudioUnit _Nonnull) - AEAudioUnitModuleGetAudioUnit
 Get access to audio unit.
 
- Instance Methods inherited from AEModule
(instancetype _Nullable) - initWithRenderer:
 Initializer.
 
(instancetype _Nonnull) - NS_UNAVAILABLE
 
(void) - rendererDidChangeSampleRate
 Notifies the module that the renderer's sample rate has changed.
 
(void) - rendererDidChangeNumberOfChannels
 Notifies the module that the renderer's channel count has changed.
 

Properties

AudioComponentDescription componentDescription
 The component description.
 
AudioUnit _Nonnull audioUnit
 The audio unit.
 
BOOL hasInput
 Whether the audio unit processes input (and thus will process buffers in place, rather than pushing new buffers)
 
double wetDry
 Wet/dry amount, for use with effect audio unit types. 0.0-1.0; 0.0 bypasses the effect entirely.
 
AERenderer *_Nullable subrenderer
 Sub-renderer, for use with format converter audio unit types, such as the varispeed and time/pitch units.
 
- Properties inherited from AEModule
AEModuleProcessFunc _Nonnull processFunction
 Process function.
 
AEModuleIsActiveFunc _Nullable isActiveFunction
 Active test function.
 
AERenderer *_Nullable renderer
 The renderer.
 

Detailed Description

Audio unit module.

This module provides an interface to Audio Units, both generator and effect types.

For generator Audio Units, this module will push one buffer onto the stack during processing. For effect units, it will pop and and push one (i.e. process in place).

Method Documentation

- (instancetype _Nullable) initWithRenderer: (AERenderer *_Nullable)  renderer
componentDescription: (AudioComponentDescription)  audioComponentDescription 

Default initializer.

Use this initializer for all audio unit types beside format converters (such as the varispeed and time/pitch units).

Parameters
rendererThe renderer
audioComponentDescriptionThe structure identifying the audio unit to instantiate
- (instancetype _Nullable) initWithRenderer: (AERenderer *_Nullable)  renderer
componentDescription: (AudioComponentDescription)  audioComponentDescription
subrenderer: (AERenderer *_Nullable)  subrenderer 

Sub-renderer initializer.

Use this initializer for format converter audio units, such as the varispeed and time/pitch units. As these audio units draw input at a different rate to output production, you must provide a sub-renderer which will be used to produce input frames as needed.

Parameters
rendererOwning renderer
audioComponentDescriptionThe structure identifying the audio unit to instantiate
subrendererSub-renderer to use to provide input, or nil for default initializer behaviour
- (double) getParameterValueForId: (AudioUnitParameterID)  parameterId

Get an audio unit parameter.

Parameters
parameterIdThe audio unit parameter identifier
Returns
The value of the parameter
- (void) setParameterValue: (double)  value
forId: (AudioUnitParameterID)  parameterId 

Set an audio unit parameter.

Note: Parameters set via this method will be automatically assigned again if the audio unit is recreated due to removal from the audio controller, an audio controller reload, or a media server error.

Parameters
valueThe value of the parameter to set
parameterIdThe audio unit parameter identifier
- (BOOL) setup

Setup audio unit.

This method is for use by subclasses only

- (void) initialize

Initialize audio unit.

This method is for use by subclasses only

- (void) teardown

Cleanup audio unit.

This method is for use by subclasses only

- (AudioUnit _Nonnull) AEAudioUnitModuleGetAudioUnit (__unsafe_unretained AEAudioUnitModule *_Nonnull)  module

Get access to audio unit.

Available for realtime thread usage

Parameters
moduleThe module
Returns
The audio unit

Property Documentation

- (AudioComponentDescription) componentDescription
readnonatomicassign

The component description.

- (AudioUnit _Nonnull) audioUnit
readnonatomicassign

The audio unit.

- (BOOL) hasInput
readnonatomicassign

Whether the audio unit processes input (and thus will process buffers in place, rather than pushing new buffers)

- (double) wetDry
readwritenonatomicassign

Wet/dry amount, for use with effect audio unit types. 0.0-1.0; 0.0 bypasses the effect entirely.

- (AERenderer* _Nullable) subrenderer
readwritenonatomicstrong

Sub-renderer, for use with format converter audio unit types, such as the varispeed and time/pitch units.


The documentation for this class was generated from the following file: