00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00017
00018 #ifndef __SNDSTREAMMANAGER_H__
00019 #define __SNDSTREAMMANAGER_H__
00020
00021 #import <Foundation/Foundation.h>
00022 #import "SndFormat.h"
00023
00024 @class SndAudioBuffer;
00025 @class SndStreamClient;
00026 @class SndStreamMixer;
00027
00028 #ifdef __MINGW32__
00029 #import "SndConditionLock.h"
00030 #define NSConditionLock SndConditionLock
00031 #endif
00032
00036 @protocol SndDelegateMessagePassing
00040 - (void) _sendDelegateInvocation:(in unsigned long) mesg;
00041 @end
00042
00051 @interface SndStreamManager : NSObject <SndDelegateMessagePassing>
00052 {
00054 SndStreamMixer *mixer;
00056 BOOL active;
00058 BOOL bg_active;
00060 SndFormat format;
00062 double nowTime;
00064 char bg_sem;
00067 char bgdm_sem;
00070 NSConditionLock *bg_threadLock;
00072 NSConditionLock *bgdm_threadLock;
00073 NSLock *delegateMessageArrayLock;
00074 NSMutableArray *delegateMessageArray;
00075 NSConnection *threadConnection;
00076
00077 BOOL bDelegateMessagingEnabled;
00078 BOOL isStopping;
00079 }
00080
00087 + (void) initialize;
00088
00096 + (SndStreamManager *) defaultStreamManager;
00097
00103 + (NSArray *) getDriverNames;
00104
00109 - (NSString *) description;
00110
00117 - (void) startStreaming;
00118
00125 - (void) stopStreaming;
00126
00137 - (void) streamStartStopThread;
00138
00154 - (void) delegateMessageThread: (NSArray *) ports;
00155
00166 - (BOOL) addClient: (SndStreamClient *) client;
00167
00176 - (BOOL) removeClient: (SndStreamClient *) client;
00177
00187 - (void) processStreamAtTime: (double) sampleCount
00188 input: (SndAudioBuffer *) inB
00189 output: (SndAudioBuffer *) outB;
00190
00200 - setFormat: (SndFormat) newFormat;
00201
00206 - (SndFormat) format;
00207
00214 - (double) nowTime;
00215
00220 - (SndStreamMixer *) mixer;
00221
00228 - (BOOL) isActive;
00229
00233 - (double) samplingRate;
00234
00241 - (void) resetTime: (double) originTimeInSeconds;
00242
00261 - (void) sendMessageInMainThreadToTarget: (id) target sel: (SEL) sel arg1: (id) arg1 arg2: (id) arg2;
00262
00263 @end
00264
00266
00267 #endif