53#if SDL_MAJOR_VERSION < 3
54#error SDL3_sound requires SDL 3.0.0 or later.
68#define SDL_SOUND_MAJOR_VERSION 3
77#define SDL_SOUND_MINOR_VERSION 0
86#define SDL_SOUND_MICRO_VERSION 0
95#define SDL_SOUND_VERSION \
96 SDL_VERSIONNUM(SDL_SOUND_MAJOR_VERSION, SDL_SOUND_MINOR_VERSION, SDL_SOUND_MICRO_VERSION)
103#define SDL_SOUND_VERSION_ATLEAST(X, Y, Z) \
104 ((SDL_SOUND_MAJOR_VERSION >= X) && \
105 (SDL_SOUND_MAJOR_VERSION > X || SDL_SOUND_MINOR_VERSION >= Y) && \
106 (SDL_SOUND_MAJOR_VERSION > X || SDL_SOUND_MINOR_VERSION > Y || SDL_SOUND_MICRO_VERSION >= Z))
118extern SDL_DECLSPEC
int SDLCALL Sound_Version(
void);
132typedef enum Sound_SampleFlags
134 SOUND_SAMPLEFLAG_NONE = 0,
137 SOUND_SAMPLEFLAG_CANSEEK = 1,
140 SOUND_SAMPLEFLAG_EOF = 1 << 29,
141 SOUND_SAMPLEFLAG_ERROR = 1 << 30,
142 SOUND_SAMPLEFLAG_EAGAIN = 1 << 31
217extern SDL_DECLSPEC
int SDLCALL Sound_Init(
void);
244extern SDL_DECLSPEC
int SDLCALL Sound_Quit(
void);
280extern SDL_DECLSPEC
const Sound_DecoderInfo ** SDLCALL Sound_AvailableDecoders(
void);
301extern SDL_DECLSPEC
const char * SDLCALL Sound_GetError(
void);
316extern SDL_DECLSPEC
void SDLCALL Sound_ClearError(
void);
394extern SDL_DECLSPEC
Sound_Sample * SDLCALL Sound_NewSample(SDL_IOStream *io,
396 const SDL_AudioSpec *desired,
428extern SDL_DECLSPEC
Sound_Sample * SDLCALL Sound_NewSampleFromMem(
const Uint8 *data,
431 const SDL_AudioSpec *desired,
466extern SDL_DECLSPEC
Sound_Sample * SDLCALL Sound_NewSampleFromFile(
const char *filename,
467 const SDL_AudioSpec *desired,
487extern SDL_DECLSPEC
void SDLCALL Sound_FreeSample(
Sound_Sample *sample);
515extern SDL_DECLSPEC Sint32 SDLCALL Sound_GetDuration(
Sound_Sample *sample);
548extern SDL_DECLSPEC
int SDLCALL Sound_SetBufferSize(
Sound_Sample *sample,
576extern SDL_DECLSPEC Uint32 SDLCALL Sound_Decode(
Sound_Sample *sample);
616extern SDL_DECLSPEC Uint32 SDLCALL Sound_DecodeAll(
Sound_Sample *sample);
655extern SDL_DECLSPEC
int SDLCALL Sound_Rewind(
Sound_Sample *sample);
703extern SDL_DECLSPEC
int SDLCALL Sound_Seek(
Sound_Sample *sample, Uint32 ms);
Definition SDL_sound.h:166
const char * author
Definition SDL_sound.h:169
const char ** extensions
Definition SDL_sound.h:167
const char * url
Definition SDL_sound.h:170
const char * description
Definition SDL_sound.h:168
Definition SDL_sound.h:185
const Sound_DecoderInfo * decoder
Definition SDL_sound.h:187
Sound_SampleFlags flags
Definition SDL_sound.h:192
void * buffer
Definition SDL_sound.h:190
SDL_AudioSpec actual
Definition SDL_sound.h:189
Uint32 buffer_size
Definition SDL_sound.h:191
SDL_AudioSpec desired
Definition SDL_sound.h:188
void * opaque
Definition SDL_sound.h:186