8#pragma comment ( lib, "winmm" )
15#if defined(SGI) || defined(linux) || defined(OSS) || defined(_WIN32) || defined(sun) || defined(MACOS) || defined(ANDROID)
16#define SP_SUPPORT_AUDIO
58#define SP_AUDIO_BLOCKING 0
59#define SP_AUDIO_NONBLOCKING 1
61#define SP_AUDIO_CAPS_OPTION_DIALOG (1<<5)
65#define SP_AUDIO_NO_CALLBACK 0
66#define SP_AUDIO_OUTPUT_POSITION_CALLBACK (1<<0)
67#define SP_AUDIO_OUTPUT_BUFFER_CALLBACK (1<<2)
71#define SP_AUDIO_OUTPUT_FINISHED_CALLBACK (1<<3)
72#define SP_AUDIO_OUTPUT_BUFFER_REQUEST_CALLBACK (1<<4)
73#define SP_AUDIO_INPUT_POSITION_CALLBACK (1<<5)
74#define SP_AUDIO_INPUT_BUFFER_CALLBACK (1<<6)
75#define SP_AUDIO_INPUT_FINISHED_CALLBACK (1<<7)
76#define SP_AUDIO_INPUT_BUFFER_REQUEST_CALLBACK (1<<8)
135extern spBool spAddAudioExitCallback(
spAudio audio, spExitCallbackFunc callback);
296extern long spReadAudioBuffer(
spAudio audio,
char *buffer,
long size);
305extern long spWriteAudioBuffer(
spAudio audio,
char *buffer,
long size);
373#define spFreeAudioDriver(audio) {_spFreeAudioDriver(audio); (audio) = NULL;}
377#define spFreeAudio(audio) spFreeAudioDriver(audio)
A class to handle audio I/O.
spAudioCallbackType spSetAudioCallbackFunc(spAudio audio, spAudioCallbackType call_type, spAudioCallbackFunc call_func, void *call_data)
spAudio spInitAudioDriver(const char *driver_name)
spBool spGetAudioSampleRate(spAudio audio, double *samp_rate)
spBool spGetAudioChannel(spAudio audio, int *num_channel)
spBool spStopAudio(spAudio audio)
spBool spSetAudioBlockingMode(spAudio audio, int block_mode)
spBool spGetAudioSampleBit(spAudio audio, int *samp_bit)
spBool spGetNumAudioDevice(spAudio audio, int *num_device)
long spWriteAudio(spAudio audio, void *data, long length)
spBool spSetAudioBufferSize(spAudio audio, int buffer_size)
spBool spGetAudioOutputPosition(spAudio audio, spLong *position)
char * xspGetAudioDeviceName(spAudio audio, int device_index)
void _spFreeAudioDriver(spAudio audio)
spBool spSetAudioSampleBit(spAudio audio, int samp_bit)
long spReadAudioDouble(spAudio audio, double *data, long length)
long spWriteAudioDouble(spAudio audio, double *data, long length)
spBool spSelectAudioDevice(spAudio audio, int device_index)
spBool spGetAudioBlockingMode(spAudio audio, int *block_mode)
spBool spSetAudioSampleRate(spAudio audio, double samp_rate)
spBool spOpenAudioDevice(spAudio audio, const char *mode)
spBool spSyncAudio(spAudio audio)
spBool spSetAudioNumBuffer(spAudio audio, int num_buffer)
long spReadAudioDoubleWeighted(spAudio audio, double *data, long length, double weight)
spBool spGetAudioSpecifiedSampleBit(spAudio audio, int *specified_samp_bit)
spAudio spInitAudio(void)
spBool spGetAudioBufferSize(spAudio audio, int *buffer_size)
long spReadAudio(spAudio audio, void *data, long length)
spBool spSetAudioChannel(spAudio audio, int num_channel)
spBool spCloseAudioDevice(spAudio audio)
spBool spGetAudioNumBuffer(spAudio audio, int *num_buffer)
long spWriteAudioDoubleWeighted(spAudio audio, double *data, long length, double weight)
struct _spAudio * spAudio
Definition spAudio.h:56
char * xspGetAudioDriverName(int index)
spBool(* spAudioCallbackFunc)(spAudio audio, spAudioCallbackType call_type, void *data1, void *data2, void *user_data)
Definition spAudio.h:80
char * xspGetAudioDriverDeviceName(const char *driver_name, int index)
unsigned long spAudioCallbackType
Definition spAudio.h:63
int spGetNumAudioDriver(void)
int spGetNumAudioDriverDevice(const char *driver_name)