Go to the documentation of this file.
64 #ifndef _INCLUDE_SDL_SOUND_H_
65 #define _INCLUDE_SDL_SOUND_H_
68 #include "SDL_endian.h"
74 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
80 #ifdef SDL_SOUND_DLL_EXPORTS
81 # define SNDDECLSPEC __declspec(dllexport)
83 # define SNDDECLSPEC __attribute__((visibility("default")))
88 #define SOUND_VER_MAJOR 1
89 #define SOUND_VER_MINOR 0
90 #define SOUND_VER_PATCH 1
232 #define SOUND_VERSION(x) \
234 (x)->major = SOUND_VER_MAJOR; \
235 (x)->minor = SOUND_VER_MINOR; \
236 (x)->patch = SOUND_VER_PATCH; \
482 SNDDECLSPEC
Sound_Sample * SDLCALL Sound_NewSampleFromMem(
const Uint8 *data,
const char * description
Definition: SDL_sound.h:165
void Sound_ClearError(void)
Clear the current error message.
Sound_Sample * Sound_NewSampleFromFile(const char *fname, Sound_AudioInfo *desired, Uint32 bufferSize)
Start decoding a new sound sample from a file on disk.
@ SOUND_SAMPLEFLAG_NONE
Definition: SDL_sound.h:111
int patch
Definition: SDL_sound.h:210
Sint32 Sound_GetDuration(Sound_Sample *sample)
Retrieve total play time of sample, in milliseconds.
int Sound_Init(void)
Initialize SDL_sound.
@ SOUND_SAMPLEFLAG_ERROR
Definition: SDL_sound.h:118
int Sound_Seek(Sound_Sample *sample, Uint32 ms)
Seek to a different point in a sample.
Sound_SampleFlags flags
Definition: SDL_sound.h:189
Uint32 rate
Definition: SDL_sound.h:139
Uint32 buffer_size
Definition: SDL_sound.h:188
Uint8 channels
Definition: SDL_sound.h:138
@ SOUND_SAMPLEFLAG_EOF
Definition: SDL_sound.h:117
int Sound_Rewind(Sound_Sample *sample)
Rewind a sample to the start.
const char * author
Definition: SDL_sound.h:166
Sound_Sample * Sound_NewSample(SDL_RWops *rw, const char *ext, Sound_AudioInfo *desired, Uint32 bufferSize)
Start decoding a new sound sample.
@ SOUND_SAMPLEFLAG_EAGAIN
Definition: SDL_sound.h:119
const char ** extensions
Definition: SDL_sound.h:164
Represents sound data in the process of being decoded.
Definition: SDL_sound.h:181
int Sound_SetBufferSize(Sound_Sample *sample, Uint32 new_size)
Change the current buffer size for a sample.
@ SOUND_SAMPLEFLAG_CANSEEK
Definition: SDL_sound.h:114
Uint32 Sound_Decode(Sound_Sample *sample)
Decode more of the sound data in a Sound_Sample.
Sound_AudioInfo desired
Definition: SDL_sound.h:185
const char * url
Definition: SDL_sound.h:167
const Sound_DecoderInfo * decoder
Definition: SDL_sound.h:184
Information about available soudn decoders.
Definition: SDL_sound.h:162
Sound_SampleFlags
Flags that are used in a Sound_Sample to show various states.
Definition: SDL_sound.h:109
Uint16 format
Definition: SDL_sound.h:137
void Sound_FreeSample(Sound_Sample *sample)
Dispose of a Sound_Sample.
void * opaque
Definition: SDL_sound.h:183
int major
Definition: SDL_sound.h:208
Sound_AudioInfo actual
Definition: SDL_sound.h:186
Uint32 Sound_DecodeAll(Sound_Sample *sample)
Decode the remainder of the sound data in a Sound_Sample.
Information about an existing sample's format.
Definition: SDL_sound.h:135
int minor
Definition: SDL_sound.h:209
int Sound_Quit(void)
Shutdown SDL_sound.
const char * Sound_GetError(void)
Get the last SDL_sound error message as a null-terminated string.
const Sound_DecoderInfo ** Sound_AvailableDecoders(void)
Get a list of sound formats supported by this version of SDL_sound.
Information the version of SDL_sound in use.
Definition: SDL_sound.h:206
void Sound_GetLinkedVersion(Sound_Version *ver)
Get the version of SDL_sound that is linked against your program.
void * buffer
Definition: SDL_sound.h:187