#import <SndAudioUnitProcessor.h>
Public Member Functions | |
(AudioUnit) | - audioUnit |
Returns the C++ AudioUnit handle. | |
(id) | - initWithParamCount:name: |
Initialization method. | |
(BOOL) | - processReplacingInputBuffer:outputBuffer: |
Process the given audio buffer through the AudioUnit. | |
(float) | - paramValue: |
Gets the value of the indexed parameter. | |
(NSString *) | - paramName: |
Gets the name of indexed parameter. | |
(NSString *) | - paramLabel: |
Returns a label or extra text describing the parameters units of measurement. | |
(NSString *) | - paramDisplay: |
Converts an object-internal value into a more user-friendly representation. | |
(void) | - setParam:toValue: |
Sets the indexed parameter to the value given. | |
Static Public Member Functions | |
(NSArray *) | + availableAudioProcessors |
Returns an array of names of available audio units (on MacOS X). | |
(SndAudioProcessor *) | + audioProcessorNamed: |
Returns an autoreleased instance of a SndAudioProcessor subclass named processorName. | |
Protected Attributes | |
AudioUnit | audioUnit |
int | inputBusNumber |
unsigned int | inputChannelCount |
int | outputBusNumber |
int | parameterListLength |
AudioUnitParameterID * | parameterIDList |
BOOL | auIsNonInterleaved |
float * | interleavedInputSamples |
There is one AudioUnit per SndAudioUnitProcessor instance. In this context it forms the Model in an MVC triumvariate with SndAudioUnitController managing the display of the Audio Units GUI and the management of parameter changes.
+ (NSArray *) availableAudioProcessors |
Returns an array of names of available audio units (on MacOS X).
The names returned can be assumed to be human readable and reasonably formatted. They can also be assumed to be unique and therefore can be used to create an instance using +processorNamed:. For the SndAudioUnitProcessor class, these names are those returned by those Apple AudioUnits available for loading.
Reimplemented from SndAudioProcessor.
+ (SndAudioProcessor *) audioProcessorNamed: | (NSString *) | processorName |
Returns an autoreleased instance of a SndAudioProcessor subclass named processorName.
processorName | An NSString with one of the names returned by +availableAudioProcessors. |
Reimplemented from SndAudioProcessor.
- (id) initWithParamCount: | (const int) | count | ||
name: | (NSString *) | name | ||
Initialization method.
count | Number of parameters. | |
name | Name of sound audio processor. |
Reimplemented from SndAudioProcessor.
- (float) paramValue: | (const int) | index |
Gets the value of the indexed parameter.
Following the VST convention, this should be in the range [0,1]. No enforcement at the present time.
index | Index of the parameter |
Reimplemented from SndAudioProcessor.
- (NSString *) paramName: | (const int) | index |
Gets the name of indexed parameter.
index | Parameter index |
Reimplemented from SndAudioProcessor.
- (NSString*) paramLabel: | (const int) | index |
Returns a label or extra text describing the parameters units of measurement.
index | Parameter index |
Reimplemented from SndAudioProcessor.
- (NSString *) paramDisplay: | (const int) | index |
Converts an object-internal value into a more user-friendly representation.
index | Parameter index |
Reimplemented from SndAudioProcessor.
- (void) setParam: | (const int) | index | ||
toValue: | (const float) | value | ||
Sets the indexed parameter to the value given.
By VST convention, the argument v should be in the range [0,1]. If the internal parameter has a different range, this should be mapped internally.
index | Index of the parameter to be set. | |
value | Floating point value in the range [0,1] |
Reimplemented from SndAudioProcessor.
- (AudioUnit) audioUnit [protected] |
The AudioUnit handle used by the Apple AudioUnit API
- (int) inputBusNumber [protected] |
The bus of the audio unit to supply audio data to.
- (unsigned int) inputChannelCount [protected] |
The number of channels on the input bus.
- (int) outputBusNumber [protected] |
The bus of the audio unit to retrieve audio data from. This could perhaps be determined by examining the bus characteristics of each audio unit.
- (int) parameterListLength [protected] |
The number of parameters in this AudioUnit.
- (AudioUnitParameterID*) parameterIDList [protected] |
An array of AudioUnitParameterIDs used to refer to each AudioUnit parameter.
- (BOOL) auIsNonInterleaved [protected] |
Indicates if the AudioUnit accepts data as non-interleaved buffers (YES), or as a single interleaved buffer (NO).
- (float*) interleavedInputSamples [protected] |
buffer holding audio data in interleaved format.