SndAudioProcessorChain Class Reference

Holds a collection of serially "chained" SndAudioProcessors with a final SndAudioFader at the end of the chain. More...

#import <SndAudioProcessorChain.h>

List of all members.

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
SndAudioBufferprocessorOutputBuffer
SndAudioFaderpostFader
double nowTime


Detailed Description

Holds a collection of serially "chained" SndAudioProcessors with a final SndAudioFader at the end of the chain.

To come


Member Function Documentation

+ (id) audioProcessorChain  

Factory method.

Returns:
A freshly initialized, autoreleased SndAudioProcessorChain.

- (id) init  

Initializes SndAudioProcessorChain instance.

Creates an active SndAudioFader instance as the post effects fader.

Returns:
Self

- (id) bypassProcessors: (BOOL)  b  

Sets the internal FX bypass flag.

Parameters:
b Bypass flag - TRUE if bypass is to be enabled
Returns:
self.

- (id) addAudioProcessor: (SndAudioProcessor *)  proc  

Adds an SndAudioProcessor to the FX chain.

Parameters:
proc The SndAudioProcessor to be added to the FX chain
Returns:
Self

- (id) insertAudioProcessor: (SndAudioProcessor *)  newAudioProcessor
atIndex: (int)  processorIndex 

Inserts an SndAudioProcessor into the FX chain at a specific location.

Parameters:
newAudioProcessor The SndAudioProcessor to be added to the FX chain.
processorIndex The location in the FX chain to insert the SndAudioProcessor.
Returns:
Returns self

- (id) removeAudioProcessor: (SndAudioProcessor *)  proc  

Removes an SndAudioProcesor from the FX chain.

Parameters:
proc SndAudioProcessor to be removed from the FX chain
Returns:
self

- (id) removeAudioProcessorAtIndex: (int)  index  

Removes an SndAudioProcesor from the FX chain.

Parameters:
index The base 0 entry in FX chain to remove
Returns:
self

- (SndAudioProcessor *) processorAtIndex: (int)  index  

Get the processor at a certain index.

Parameters:
index Base zero reference to the SndAudioProcessor required.
Returns:
Returns an autoreleased SndAudioProcessor.

- (id) removeAllProcessors  

Removes all processors from the processor chain.

Returns:
Returns self.

- (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.

Parameters:
buff A SndAudioBuffer instance of valid sound data.
t The time in seconds the buffer is intended to be played.
Returns:
Returns self.

- (int) processorCount  

Returns the number of processors in the audio processor chain.

Returns:
number of processors in the 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.

Returns:
NSArray containing the processors (in processing order).

- (BOOL) isBypassingFX  

Returns:
TRUE is FX chain is being bypassed

- (void) setBypass: (BOOL)  b  

Parameters:
b Bypass flag - TRUE to enable bypass

Returns the SndAudioFader which is the last effect at the end of this SndAudioProcessorChain instance.

Returns:
id of the postFader object at the end of the chain

- (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.

Parameters:
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.

Returns:
Returns a double Indicating the play start time of the buffer being processed in seconds.


Member Data Documentation

- (NSMutableArray*) audioProcessorArray [protected]

audioProcessorArray The array (chain) of SndAudioProcessors

- (BOOL) bypassProcessing [protected]

bypassProcessing YES disables processing.

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.


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

Generated on Sat Dec 5 17:01:16 2009 for MusicKit by  doxygen 1.5.6