00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00014
00015 #ifndef __SND_STREAM_MIXER_H__
00016 #define __SND_STREAM_MIXER_H__
00017
00018 #import <Foundation/Foundation.h>
00019
00020 #import "SndAudioBuffer.h"
00021 #import "SndStreamClient.h"
00022 #import "SndAudioProcessorChain.h"
00023
00032 @interface SndStreamMixer : NSObject
00033 {
00035 NSMutableArray *streamClients;
00037 NSLock *streamClientsLock;
00039 SndAudioProcessorChain *processorChain;
00041 double nowTime;
00043 double lastNowTime;
00044 }
00045
00050 + mixer;
00051
00056 - init;
00057
00058 - (void) dealloc;
00059
00060 - (NSString *) description;
00061
00074 - processInBuffer: (SndAudioBuffer *) inB
00075 outBuffer: (SndAudioBuffer *) outB
00076 nowTime: (double) t;
00077
00083 - (BOOL) removeClient: (SndStreamClient *) client;
00084
00092 - (int) addClient: (SndStreamClient *) client;
00093
00099 - (void) finishMixing;
00100
00105 - (int) clientCount;
00106
00111 - (SndAudioProcessorChain *) audioProcessorChain;
00112
00117 - (void) resetTime: (double) originTimeInSeconds;
00118
00123 - (SndStreamClient *) clientAtIndex: (int) clientIndex;
00124
00125 @end
00126
00128
00129 #endif