MusicKit
0.0.0
|
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 00010 // non-commercial purposes so long as the author attribution and copyright 00011 // messages remain intact and accompany all relevant code. 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 00098 - (NSArray *) clients; 00099 00105 - (void) finishMixing; 00106 00111 - (int) clientCount; 00112 00117 - (SndAudioProcessorChain *) audioProcessorChain; 00118 00123 - (void) resetTime: (double) originTimeInSeconds; 00124 00129 - (SndStreamClient *) clientAtIndex: (int) clientIndex; 00130 00131 @end 00132 00134 00135 #endif