spAudio
|
Data Structures | |
class | spAudio |
A class to handle audio I/O. More... | |
Macros | |
#define | SP_AUDIO_BLOCKING 0 |
#define | SP_AUDIO_NONBLOCKING 1 |
#define | SP_AUDIO_NO_CALLBACK 0 |
#define | SP_AUDIO_OUTPUT_POSITION_CALLBACK (1<<0) |
#define | SP_AUDIO_OUTPUT_BUFFER_CALLBACK (1<<2) |
#define | spFreeAudioDriver(audio) {_spFreeAudioDriver(audio); (audio) = NULL;} |
Typedefs | |
typedef struct _spAudio * | spAudio |
typedef unsigned long | spAudioCallbackType |
typedef spBool(* | spAudioCallbackFunc) (spAudio audio, spAudioCallbackType call_type, void *data1, void *data2, void *user_data) |
Functions | |
int | spGetNumAudioDriver (void) |
char * | xspGetAudioDriverName (int index) |
int | spGetNumAudioDriverDevice (const char *driver_name) |
char * | xspGetAudioDriverDeviceName (const char *driver_name, int index) |
#define SP_AUDIO_BLOCKING 0 |
Constant to enable blocking mode for spSetAudioBlockingMode() .
#define SP_AUDIO_NONBLOCKING 1 |
Constant to disable blocking mode for spSetAudioBlockingMode() .
#define SP_AUDIO_NO_CALLBACK 0 |
No callback exists.
#define SP_AUDIO_OUTPUT_POSITION_CALLBACK (1<<0) |
Called when the playback position changed.
data1: spLong *position, data2: NULL
#define SP_AUDIO_OUTPUT_BUFFER_CALLBACK (1<<2) |
Called when the current buffer finished.
data1: void *buffer, data2: long *buffer_length
#define spFreeAudioDriver | ( | audio | ) | {_spFreeAudioDriver(audio); (audio) = NULL;} |
typedef struct _spAudio* spAudio |
Definition of spAudio.
typedef unsigned long spAudioCallbackType |
Type used for spSetAudioCallbackFunc() . Must be a combination of SP_AUDIO_*_CALLBACK.
typedef spBool(* spAudioCallbackFunc) (spAudio audio, spAudioCallbackType call_type, void *data1, void *data2, void *user_data) |
Signature of the callback function for spSetAudioCallbackFunc() .
|
extern |
Gets the number of audio drivers.
|
extern |
Gets the name of the audio driver identified by the index.
[in] | index | 0-based index. You can specify an index from 0 to ( spGetNumAudioDriver() - 1). |
|
extern |
Gets the number of devices for the audio driver. If driver_name == NULL
, this function gets it for all drivers.
[in] | driver_name | A null-terminated string of the driver name. |
|
extern |
Gets the name of the audio device for the audio driver. If driver_name == NULL
, this function gets it for all drivers.
[in] | driver_name | A null-terminated string of the driver name. |
[in] | index | 0-based index. You can specify an index from 0 to ( spGetNumAudioDriverDevice() - 1). |