00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #define PERFORM_API
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #include <objc/objc.h>
00053 #include <stdlib.h>
00054 #include "SndStruct.h"
00055
00056 #ifdef __cplusplus
00057 extern "C" {
00058 #endif
00059
00060 typedef struct {
00061 SndSoundStruct streamFormat;
00062 void* streamData;
00063
00064 } SNDStreamBuffer;
00065
00066 typedef void (*SNDStreamProcessor)(double, SNDStreamBuffer, SNDStreamBuffer, void*);
00067
00068 typedef int (*SNDNotificationFun)(SndSoundStruct *s, int tag, int err);
00069
00070 #define SND_NULL_FUN ((SNDNotificationFun)0)
00071
00072 PERFORM_API void SNDStreamNativeFormat(SndSoundStruct *s);
00073 PERFORM_API BOOL SNDStreamStart();
00074 PERFORM_API void SNDStreamStop();
00075
00076
00077
00078 PERFORM_API BOOL SNDInit(BOOL guessTheDevice);
00079
00080
00081 PERFORM_API char **SNDGetAvailableDriverNames(void);
00082
00083
00084 PERFORM_API BOOL SNDSetDriverIndex(unsigned int selectedIndex);
00085
00086
00087 PERFORM_API unsigned int SNDGetAssignedDriverIndex(void);
00088
00089 PERFORM_API void SNDGetVolume(float *left, float * right);
00090
00091 PERFORM_API void SNDSetVolume(float left, float right);
00092
00093 PERFORM_API BOOL SNDIsMuted(void);
00094
00095 PERFORM_API void SNDSetMute(BOOL aFlag);
00096
00097 PERFORM_API int SNDStartPlaying(SndSoundStruct *soundStruct, int tag, int priority, int preempt,
00098 SNDNotificationFun beginFun, SNDNotificationFun endFun);
00099
00100 PERFORM_API int SNDStartRecording(SndSoundStruct *soundStruct, int tag, int priority, int preempt,
00101 SNDNotificationFun beginRecFun, SNDNotificationFun endRecFun);
00102
00103 PERFORM_API int SNDSamplesProcessed(int tag);
00104
00105 PERFORM_API void SNDStop(int tag);
00106
00107 PERFORM_API void SNDPause(int tag);
00108
00109 PERFORM_API void SNDResume(int tag);
00110
00111 PERFORM_API int SNDUnreserve(int dunno);
00112
00113 PERFORM_API void SNDTerminate(void);
00114
00115 #ifdef __cplusplus
00116 }
00117 #endif
00118