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. | |
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).
- (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).
renderer | The renderer |
audioComponentDescription | The 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.
renderer | Owning renderer |
audioComponentDescription | The structure identifying the audio unit to instantiate |
subrenderer | Sub-renderer to use to provide input, or nil for default initializer behaviour |
- (double) getParameterValueForId: | (AudioUnitParameterID) | parameterId |
Get an audio unit parameter.
parameterId | The audio unit parameter identifier |
- (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.
value | The value of the parameter to set |
parameterId | The 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
module | The module |
|
readnonatomicassign |
The component description.
|
readnonatomicassign |
The audio unit.
|
readnonatomicassign |
Whether the audio unit processes input (and thus will process buffers in place, rather than pushing new buffers)
|
readwritenonatomicassign |
Wet/dry amount, for use with effect audio unit types. 0.0-1.0; 0.0 bypasses the effect entirely.
|
readwritenonatomicstrong |
Sub-renderer, for use with format converter audio unit types, such as the varispeed and time/pitch units.