MusicKit  0.0.0
SndAudioProcessorChain.h
00001 
00002 //
00003 //  $Id$
00004 //
00005 //  Original Author: SKoT McDonald, <skot@tomandandy.com>
00006 //
00007 //  Copyright (c) 2001, The MusicKit Project.  All rights reserved.
00008 //
00009 //  Permission is granted to use and modify this code for commercial and non-commercial
00010 //  purposes so long as the author attribution and copyright messages remain intact and
00011 //  accompany all relevant code.
00012 //
00014 
00015 #ifndef __SNDAUDIOPROCESSORCHAIN_H__
00016 #define __SNDAUDIOPROCESSORCHAIN_H__
00017 
00018 #import <Foundation/Foundation.h>
00019 
00020 @class SndAudioBuffer;
00021 @class SndAudioProcessor;
00022 @class SndAudioFader;
00023 
00030 @interface SndAudioProcessorChain : NSObject
00031 {
00033     NSMutableArray *audioProcessorArray;
00035     BOOL   bypassProcessing;
00037     SndAudioBuffer *processorOutputBuffer; 
00039     SndAudioFader *postFader;
00041     double nowTime;
00042 }
00043 
00048 + audioProcessorChain;
00049 
00056 - init;
00057 
00058 // TODO perhaps add initWithFormat: (SndFormat) newFormat to prime the chain format?
00059 
00065 - (void) addAudioProcessor: (SndAudioProcessor*) proc;
00066 
00074 - (void) insertAudioProcessor: (SndAudioProcessor *) newAudioProcessor
00075                       atIndex: (int) processorIndex;
00076 
00082 - (void) removeAudioProcessor: (SndAudioProcessor*) proc;
00083 
00089 - (void) removeAudioProcessorAtIndex: (int) index;
00090 
00097 - (SndAudioProcessor *) processorAtIndex: (int) index;
00098 
00102 - (void) removeAllProcessors;
00103 
00115 - processBuffer: (SndAudioBuffer *) buff forTime: (double) timeInSeconds;
00116 
00121 - (int) processorCount; 
00122 
00129 - (NSArray *) processorArray;
00130 
00136 - (BOOL) isBypassingFX;
00137 
00143 - (void) setBypassProcessors: (BOOL) bypassEffectsChain;
00144 
00150 - (SndAudioFader *) postFader;
00151 
00159 - (void) setPostFader: (SndAudioFader *) newPostFader;
00160 
00166 - (double) nowTime;
00167 
00174 - (SndFormat) format;
00175 
00176 @end
00177 
00179 
00180 #endif