00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __PERFORMSOUND__
00019 #define __PERFORMSOUND__
00020
00021
00022
00023
00024
00025
00026 #include "MKPerformSndMIDIConfig.h"
00027 #include <objc/objc.h>
00028
00029
00030
00031 #ifndef FALSE
00032 #define FALSE 0
00033 #define TRUE !(FALSE)
00034 #endif
00035
00036 #if STDC_HEADERS
00037 # include <stdlib.h>
00038 #endif
00039 #include "SndStruct.h"
00040 #include "SndFormats.h"
00041
00042 #define MKPERFORMSND_USE_STREAMING 1 // Uses the newer streaming API
00043
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047
00051 typedef struct SNDStreamBuffer {
00053 SndSampleFormat dataFormat;
00055 long frameCount;
00057 int channelCount;
00059 double sampleRate;
00061 void *streamData;
00062 } SNDStreamBuffer;
00063
00072 typedef void (*SNDStreamProcessor)(double sampleTime, SNDStreamBuffer *inStream, SNDStreamBuffer *outStream, void *userData);
00073
00086 PERFORM_API BOOL SNDInit(BOOL guessTheDevice);
00087
00094 PERFORM_API BOOL SNDTerminate(void);
00095
00101 PERFORM_API char **SNDGetAvailableDriverNames(void);
00102
00110 PERFORM_API BOOL SNDSetDriverIndex(unsigned int selectedIndex);
00111
00117 PERFORM_API unsigned int SNDGetAssignedDriverIndex(void);
00118
00124 PERFORM_API BOOL SNDIsMuted(void);
00125
00132 PERFORM_API void SNDSetMute(BOOL aFlag);
00133
00142 PERFORM_API BOOL SNDSetBufferSizeInBytes(long liBufferSizeInBytes);
00143
00152 PERFORM_API void SNDStreamNativeFormat(SNDStreamBuffer *streamFormat,
00153 BOOL isOutputStream);
00154
00162 PERFORM_API BOOL SNDStreamStart(SNDStreamProcessor newStreamProcessor, void *userData);
00163
00169 PERFORM_API BOOL SNDStreamStop(void);
00170
00177 PERFORM_API const char **SNDSpeakerConfiguration(void);
00178
00179 #ifdef __cplusplus
00180 }
00181 #endif
00182
00183 #endif