55#if SDL_MAJOR_VERSION < 3
56#error SDL3_sound requires SDL 3.0.0 or later.
63#ifndef DOXYGEN_SHOULD_IGNORE_THIS
65#if defined(SDL_SOUND_DLL_EXPORTS) && defined(_WIN32)
66# define SNDDECLSPEC __declspec(dllexport)
67#elif ((defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__)) && !defined(_WIN32)
68# define SNDDECLSPEC __attribute__((visibility("default")))
73#define SOUND_VER_MAJOR 3
74#define SOUND_VER_MINOR 0
75#define SOUND_VER_PATCH 0
217#define SOUND_VERSION(x) \
219 (x)->major = SOUND_VER_MAJOR; \
220 (x)->minor = SOUND_VER_MINOR; \
221 (x)->patch = SOUND_VER_PATCH; \
436SNDDECLSPEC
Sound_Sample * SDLCALL Sound_NewSample(SDL_IOStream *rw,
Uint32 Sound_DecodeAll(Sound_Sample *sample)
Decode the remainder of the sound data in a Sound_Sample.
Sound_Sample * Sound_NewSampleFromFile(const char *fname, Sound_AudioInfo *desired, Uint32 bufferSize)
Start decoding a new sound sample from a file on disk.
Sint32 Sound_GetDuration(Sound_Sample *sample)
Retrieve total play time of sample, in milliseconds.
Uint32 Sound_Decode(Sound_Sample *sample)
Decode more of the sound data in a Sound_Sample.
Sound_Sample * Sound_NewSampleFromMem(const Uint8 *data, Uint32 size, const char *ext, Sound_AudioInfo *desired, Uint32 bufferSize)
Start decoding a new sound sample from a file on disk.
int Sound_Rewind(Sound_Sample *sample)
Rewind a sample to the start.
int Sound_Quit(void)
Shutdown SDL_sound.
void Sound_ClearError(void)
Clear the current error message.
void Sound_FreeSample(Sound_Sample *sample)
Dispose of a Sound_Sample.
int Sound_Init(void)
Initialize SDL_sound.
const Sound_DecoderInfo ** Sound_AvailableDecoders(void)
Get a list of sound formats supported by this version of SDL_sound.
void Sound_GetLinkedVersion(Sound_Version *ver)
Get the version of SDL_sound that is linked against your program.
Sound_SampleFlags
Flags that are used in a Sound_Sample to show various states.
Definition SDL_sound.h:95
@ SOUND_SAMPLEFLAG_NONE
Definition SDL_sound.h:96
@ SOUND_SAMPLEFLAG_CANSEEK
Definition SDL_sound.h:99
@ SOUND_SAMPLEFLAG_ERROR
Definition SDL_sound.h:103
@ SOUND_SAMPLEFLAG_EAGAIN
Definition SDL_sound.h:104
@ SOUND_SAMPLEFLAG_EOF
Definition SDL_sound.h:102
int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size)
Change the current buffer size for a sample.
int Sound_Seek(Sound_Sample *sample, Uint32 ms)
Seek to a different point in a sample.
const char * Sound_GetError(void)
Get the last SDL_sound error message as a null-terminated string.
Information about an existing sample's format.
Definition SDL_sound.h:121
Uint8 channels
Definition SDL_sound.h:123
Uint32 rate
Definition SDL_sound.h:124
Uint16 format
Definition SDL_sound.h:122
Information about available soudn decoders.
Definition SDL_sound.h:148
const char * author
Definition SDL_sound.h:151
const char ** extensions
Definition SDL_sound.h:149
const char * url
Definition SDL_sound.h:152
const char * description
Definition SDL_sound.h:150
Represents sound data in the process of being decoded.
Definition SDL_sound.h:167
const Sound_DecoderInfo * decoder
Definition SDL_sound.h:169
Sound_SampleFlags flags
Definition SDL_sound.h:174
void * buffer
Definition SDL_sound.h:172
Sound_AudioInfo actual
Definition SDL_sound.h:171
Uint32 buffer_size
Definition SDL_sound.h:173
Sound_AudioInfo desired
Definition SDL_sound.h:170
void * opaque
Definition SDL_sound.h:168
Information the version of SDL_sound in use.
Definition SDL_sound.h:192
int minor
Definition SDL_sound.h:194
int major
Definition SDL_sound.h:193
int patch
Definition SDL_sound.h:195