00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00014
00015 #ifndef __SND_PERFORMANCE_H__
00016 #define __SND_PERFORMANCE_H__
00017
00018 #import <Foundation/Foundation.h>
00019 #import "Snd.h"
00020 #import "SndAudioBuffer.h"
00021 #import "SndAudioProcessorChain.h"
00022
00034 @interface SndPerformance : NSObject
00035 {
00037 Snd *snd;
00039 double playTime;
00041 long startAtIndex;
00043 long playIndex;
00046 long endAtIndex;
00048 BOOL paused;
00050 SndAudioProcessorChain *audioProcessorChain;
00051
00053 BOOL looping;
00055 long loopStartIndex;
00057 long loopEndIndex;
00058
00059
00060 double deltaTime;
00061
00062 double actualTime;
00063 }
00064
00073 + (SndPerformance *) performanceOfSnd: (Snd *) s playingAtTime: (double) seconds;
00074
00084 + (SndPerformance *) performanceOfSnd: (Snd *) s
00085 playingAtTime: (double) seconds
00086 beginAtIndex: (long) beginIndex
00087 endAtIndex: (long) endIndex;
00096 - initWithSnd: (Snd *) s playingAtTime: (double) seconds;
00097
00107 - initWithSnd: (Snd *) s
00108 playingAtTime: (double) seconds
00109 beginAtIndex: (long) beginIndex
00110 endAtIndex: (long) endIndex;
00111
00122 - initWithSnd: (Snd *) s
00123 playingAtTime: (double) playTime
00124 startPosition: (double) startPosition
00125 duration: (double) duration
00126 deltaTime: (double) deltaTime;
00127
00132 - (Snd *) snd;
00133
00138 - (double) playTime;
00139
00143 - setPlayTime: (double) t;
00144
00145 - (double) deltaTime;
00146 - (void) setDeltaTime: (double) _deltaTime;
00147
00148
00153 - (long) playIndex;
00154
00159 - (void) setPlayIndex: (long) newPlayIndex;
00160
00170 - (long) rewindPlayIndexBySamples: (long) numberOfSamplesToRewind;
00171
00178 - (long) endAtIndex;
00179
00184 - (long) startAtIndex;
00185
00193 - (void) setEndAtIndex: (long) newEndAtIndex;
00194
00199 - (void) setLooping: (BOOL) yesOrNo;
00200
00205 - (BOOL) looping;
00206
00215 - (void) setLoopStartIndex: (long) loopStartIndex;
00216
00221 - (long) loopStartIndex;
00222
00233 - (void) setLoopEndIndex: (long) newLoopEndIndex;
00234
00239 - (long) loopEndIndex;
00240
00245 - (void) stopInFuture: (double) inSeconds;
00246
00250 - (void) stopNow;
00251
00256 - (BOOL) isEqual: (id) anotherPerformance;
00257
00261 - (void) dealloc;
00262
00267 - (NSString *) description;
00268
00272 - (BOOL) isPaused;
00273
00278 - setPaused: (BOOL) b;
00279
00283 - pause;
00284
00288 - resume;
00289
00295 - (BOOL) isPlaying;
00296
00300 - (SndAudioProcessorChain *) audioProcessorChain;
00301
00305 - (void) setAudioProcessorChain: (SndAudioProcessorChain *) anAudioProcessorChain;
00306
00319 - (long) retrievePerformBuffer: (SndAudioBuffer *) bufferToFill ofLength: (long) buffLength;
00320
00327 - (BOOL) atEndOfPerformance;
00328
00329 @end
00330
00332
00333 #endif