MusicKit  0.0.0
Public Member Functions | Static Public Member Functions | Protected Attributes
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) - addAudioProcessor:
 Adds an SndAudioProcessor to the end of the effects chain.
(void) - insertAudioProcessor:atIndex:
 Inserts an SndAudioProcessor into the effects chain at a specific location.
(void) - removeAudioProcessor:
 Removes an SndAudioProcesor from the effects chain.
(void) - removeAudioProcessorAtIndex:
 Removes an SndAudioProcesor from the effects chain.
(SndAudioProcessor *) - processorAtIndex:
 Get the processor at a certain index.
(void) - 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
 Return the state of the effects chain bypass.
(void) - setBypassProcessors:
 Sets the audio processor chain to be bypassed or not.
(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.
(SndFormat- format
 Returns the format of the buffers being processed by the SndAudioProcessors in the SndAudioProcessorChain.
(id) - init
 Initializes SndAudioProcessorChain instance.
(void) - addAudioProcessor:
 Adds an SndAudioProcessor to the end of the effects chain.
(void) - insertAudioProcessor:atIndex:
 Inserts an SndAudioProcessor into the effects chain at a specific location.
(void) - removeAudioProcessor:
 Removes an SndAudioProcesor from the effects chain.
(void) - removeAudioProcessorAtIndex:
 Removes an SndAudioProcesor from the effects chain.
(SndAudioProcessor *) - processorAtIndex:
 Get the processor at a certain index.
(void) - 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
 Return the state of the effects chain bypass.
(void) - setBypassProcessors:
 Sets the audio processor chain to be bypassed or not.
(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.
(SndFormat- format
 Returns the format of the buffers being processed by the SndAudioProcessors in the SndAudioProcessorChain.

Static Public Member Functions

(id) + audioProcessorChain
 Factory method.
(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

Adds an SndAudioProcessor to the end of the effects chain.

Parameters:
procThe SndAudioProcessor to be added to the effects chain

Adds an SndAudioProcessor to the end of the effects chain.

Parameters:
procThe SndAudioProcessor to be added to the effects chain

Factory method.

Returns:
A freshly initialized, autoreleased SndAudioProcessorChain.

Factory method.

Returns:
A freshly initialized, autoreleased SndAudioProcessorChain.

Returns the format of the buffers being processed by the SndAudioProcessors in the SndAudioProcessorChain.

Note currently the format will only be meaningful after the receiver has begun processing buffers.

Returns:
Returns a SndFormat structure.

Returns the format of the buffers being processed by the SndAudioProcessors in the SndAudioProcessorChain.

Note currently the format will only be meaningful after the receiver has begun processing buffers.

Returns:
Returns a SndFormat structure.
- (id) init

Initializes SndAudioProcessorChain instance.

Creates an active SndAudioFader instance as the post effects fader.

Returns:
Self
- (id) init

Initializes SndAudioProcessorChain instance.

Creates an active SndAudioFader instance as the post effects fader.

Returns:
Self
- (void) insertAudioProcessor: (SndAudioProcessor *)  newAudioProcessor
atIndex: (int)  processorIndex 

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

Parameters:
newAudioProcessorThe SndAudioProcessor to be added to the effects chain.
processorIndexThe location in the effects chain to insert the SndAudioProcessor.
- (void) insertAudioProcessor: (SndAudioProcessor *)  newAudioProcessor
atIndex: (int)  processorIndex 

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

Parameters:
newAudioProcessorThe SndAudioProcessor to be added to the effects chain.
processorIndexThe location in the effects chain to insert the SndAudioProcessor.
- (BOOL) isBypassingFX

Return the state of the effects chain bypass.

Returns:
YES is effects chain is being bypassed
- (BOOL) isBypassingFX

Return the state of the effects chain bypass.

Returns:
YES is effects chain is being bypassed
- (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.
- (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.

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

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
- (id) processBuffer: (SndAudioBuffer *)  buff
forTime: (double)  timeInSeconds 

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:
buffA SndAudioBuffer instance of valid sound data.
timeInSecondsThe time in seconds the buffer is intended to be played.
Returns:
Returns self.
- (id) processBuffer: (SndAudioBuffer *)  buff
forTime: (double)  timeInSeconds 

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:
buffA SndAudioBuffer instance of valid sound data.
timeInSecondsThe time in seconds the buffer is intended to be played.
Returns:
Returns self.
- (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).
- (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).
- (SndAudioProcessor *) processorAtIndex: (int)  index

Get the processor at a certain index.

Parameters:
indexBase zero reference to the SndAudioProcessor required.
Returns:
Returns an autoreleased SndAudioProcessor.
- (SndAudioProcessor *) processorAtIndex: (int)  index

Get the processor at a certain index.

Parameters:
indexBase zero reference to the SndAudioProcessor required.
Returns:
Returns an autoreleased SndAudioProcessor.
- (int) processorCount

Returns the number of processors in the audio processor chain.

Returns:
number of processors in the processor chain.
- (int) processorCount

Returns the number of processors in the audio processor chain.

Returns:
number of processors in the processor chain.

Removes an SndAudioProcesor from the effects chain.

Parameters:
procSndAudioProcessor to be removed from the effects chain

Removes an SndAudioProcesor from the effects chain.

Parameters:
procSndAudioProcessor to be removed from the effects chain
- (void) removeAudioProcessorAtIndex: (int)  index

Removes an SndAudioProcesor from the effects chain.

Parameters:
indexThe base 0 entry in effects chain to remove.
- (void) removeAudioProcessorAtIndex: (int)  index

Removes an SndAudioProcesor from the effects chain.

Parameters:
indexThe base 0 entry in effects chain to remove.
- (void) setBypassProcessors: (BOOL)  bypassEffectsChain

Sets the audio processor chain to be bypassed or not.

Parameters:
bypassEffectsChainBypass flag - YES to enable bypassing the effects processing.
- (void) setBypassProcessors: (BOOL)  bypassEffectsChain

Sets the audio processor chain to be bypassed or not.

Parameters:
bypassEffectsChainBypass flag - YES to enable bypassing the effects processing.
- (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:
newPostFaderA SndAudioFader instance to become 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:
newPostFaderA SndAudioFader instance to become the postFader object at the end of the chain.

Member Data Documentation

- (NSMutableArray *) audioProcessorArray [protected]

audioProcessorArray The array (chain) of SndAudioProcessors

- (BOOL) bypassProcessing [protected]

bypassProcessing YES disables processing.

- (double) nowTime [protected]

nowTime Time of processing a buffer in seconds.

- (SndAudioFader *) postFader [protected]

postFader A SndAudioFader which modifies the chain of effects volume and pan, effectively it is an "FX return" control

processorOutputBuffer A buffer used to hold the result of one SndAudioProcessor


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