#import <SndAudioProcessorChain.h>
Public Member Functions | |
(id) | - init |
Initializes SndAudioProcessorChain instance. | |
(void) | - dealloc |
Destructor. | |
(id) | - bypassProcessors: |
Sets the internal FX bypass flag. | |
(id) | - addAudioProcessor: |
Adds an SndAudioProcessor to the FX chain. | |
(id) | - insertAudioProcessor:atIndex: |
Inserts an SndAudioProcessor into the FX chain at a specific location. | |
(id) | - removeAudioProcessor: |
Removes an SndAudioProcesor from the FX chain. | |
(id) | - removeAudioProcessorAtIndex: |
Removes an SndAudioProcesor from the FX chain. | |
(SndAudioProcessor *) | - processorAtIndex: |
Get the processor at a certain index. | |
(id) | - removeAllProcessors |
Removes all processors from the processor chain. | |
(id) | - processBuffer:forTime: |
Process the provided audio buffer with the chain of SndAudioProcessors. | |
(int) | - processorCount |
Returns the number of processors in the audio processor chain. | |
(NSArray *) | - processorArray |
Returns an array of SndAudioProcessors in this chain. | |
(BOOL) | - isBypassingFX |
(void) | - setBypass: |
(SndAudioFader *) | - postFader |
Returns the SndAudioFader which is the last effect at the end of this SndAudioProcessorChain instance. | |
(void) | - setPostFader: |
Assigns the SndAudioFader which is the last effect at the end of this SndAudioProcessorChain instance. | |
(double) | - nowTime |
Returns the time the buffer is to be played. | |
Static Public Member Functions | |
(id) | + audioProcessorChain |
Factory method. | |
Protected Attributes | |
NSMutableArray * | audioProcessorArray |
BOOL | bypassProcessing |
SndAudioBuffer * | processorOutputBuffer |
SndAudioFader * | postFader |
double | nowTime |
To come
+ (id) audioProcessorChain |
- (id) init |
Initializes SndAudioProcessorChain instance.
Creates an active SndAudioFader instance as the post effects fader.
- (id) bypassProcessors: | (BOOL) | b |
Sets the internal FX bypass flag.
b | Bypass flag - TRUE if bypass is to be enabled |
- (id) addAudioProcessor: | (SndAudioProcessor *) | proc |
Adds an SndAudioProcessor to the FX chain.
proc | The SndAudioProcessor to be added to the FX chain |
- (id) insertAudioProcessor: | (SndAudioProcessor *) | newAudioProcessor | ||
atIndex: | (int) | processorIndex | ||
Inserts an SndAudioProcessor into the FX chain at a specific location.
newAudioProcessor | The SndAudioProcessor to be added to the FX chain. | |
processorIndex | The location in the FX chain to insert the SndAudioProcessor. |
- (id) removeAudioProcessor: | (SndAudioProcessor *) | proc |
Removes an SndAudioProcesor from the FX chain.
proc | SndAudioProcessor to be removed from the FX chain |
- (id) removeAudioProcessorAtIndex: | (int) | index |
Removes an SndAudioProcesor from the FX chain.
index | The base 0 entry in FX chain to remove |
- (SndAudioProcessor *) processorAtIndex: | (int) | index |
Get the processor at a certain index.
index | Base zero reference to the SndAudioProcessor required. |
- (id) removeAllProcessors |
Removes all processors from the processor chain.
- (id) processBuffer: | (SndAudioBuffer *) | buff | ||
forTime: | (double) | t | ||
Process the provided audio buffer with the chain of SndAudioProcessors.
The t parameter tells the processor chain at what time the buffer is destined to start to be played. This matches up with the time the SndStreamClients were given for generating this same buffer.
buff | A SndAudioBuffer instance of valid sound data. | |
t | The time in seconds the buffer is intended to be played. |
- (int) processorCount |
Returns the number of processors in the audio processor chain.
- (NSArray *) processorArray |
Returns an array of SndAudioProcessors in this chain.
Provided for speed, so it returns a shallow copy of the SndAudioProcessor instances.
- (BOOL) isBypassingFX |
- (void) setBypass: | (BOOL) | b |
b | Bypass flag - TRUE to enable bypass |
- (SndAudioFader *) postFader |
Returns the SndAudioFader which is the last effect at the end of this SndAudioProcessorChain instance.
- (void) setPostFader: | (SndAudioFader *) | newPostFader |
Assigns the SndAudioFader which is the last effect at the end of this SndAudioProcessorChain instance.
There is a default post-send fader which is usually sufficient. This method is only necessary to use if a ganged fading of several playing streams is required.
newPostFader | A SndAudioFader instance to become the postFader object at the end of the chain. |
- (double) nowTime |
Returns the time the buffer is to be played.
- (NSMutableArray*) audioProcessorArray [protected] |
audioProcessorArray The array (chain) of SndAudioProcessors
- (BOOL) bypassProcessing [protected] |
bypassProcessing YES disables processing.
- (SndAudioBuffer*) processorOutputBuffer [protected] |
processorOutputBuffer A buffer used to hold the result of one SndAudioProcessor
- (SndAudioFader*) postFader [protected] |
postFader A SndAudioFader which modifies the chain of effects volume and pan, effectively it is an "FX return" control
- (double) nowTime [protected] |
nowTime Time of processing a buffer in seconds.