Expand description
Audio playback.
Structs
A structure to hold a set of audio conversion filters and buffers.
Identifies an audio device.
Audio format flags.
The calculated values in this structure are calculated by SDL_OpenAudio().
The status of an audio device.
SDL_AudioStream is a new audio conversion interface.
Constants
Alias for
AUDIO_F32LSB
32-bit floating point samples
As
AUDIO_F32LSB
, but big-endian byte orderNative-endian f32 samples
Signed 8-bit samples
Alias for
AUDIO_S16LSB
Signed 16-bit samples
As
AUDIO_U16MSB
, but big-endian byte orderNative-endian i16 samples
Alias for
AUDIO_S32LSB
;32-bit integer samples
As
AUDIO_S32MSB
, but big-endian byte orderNative-endian i32 samples
Unsigned 8-bit samples
Alias for
AUDIO_U16LSB
Unsigned 16-bit samples
As
AUDIO_S16LSB
, but big-endian byte orderNative-endian u16 samples
You can only use 9 slots in the
SDL_AudioCVT.filters
field. The 10th is
reserved as a null terminator.Maximum volume value, for use with
SDL_MixAudio
.Functions
Pits per sample. eg: i16 = 16, f32 = 32.
If the samples are big-endian.
If the sample type is a floating type.
If the samples are an int type.
If the samples are little-endian.
If the samples are signed values.
If the samples are unsigned values.
Get the number of converted/re-sampled bytes available.
Clear any pending data in the stream without converting it
Flush the stream.
Get converted/re-sampled data from the stream
Add data to be converted/re-sampled to the stream
Initializes an
SDL_AudioCVT
.Drop any queued audio data.
This function shuts down audio processing and closes the default audio
device.
This function shuts down audio processing and closes the given audio
device.
Performs an in-place audio conversion.
Dequeue more audio on non-callback devices.
Free an audio stream
This function frees data previously allocated with
SDL_LoadWAV_RW
Get the human-readable name of a specific audio device.
Get the preferred audio format of a specific audio device.
Gets the current audio status (stopped / playing / paused).
The name of an audio driver. See
SDL_GetAudioDriver
Gets the current audio status (stopped / playing / paused).
The name of the current audio driver (or null if no driver is
initialized).
Get the number of available devices exposed by the current driver.
The number of audio drivers. See
SDL_GetAudioDriver
Get the number of bytes of still-queued audio.
Loads a WAV file.
Load the audio data of a WAVE file into memory
Locks the default audio device.
Locks the given audio device.
In-place mixes two audio sources.
Mix according to a format.
Create a new audio stream
This function opens the audio device with the desired parameters, and
returns 0 if successful, placing the actual hardware parameters in the
structure pointed to by
obtained
. If obtained
is NULL, the audio
data passed to the callback function will be guaranteed to be in the
requested format, and will be automatically converted to the hardware
audio format if necessary. This function returns -1 if it failed
to open the audio device, or couldn’t set up the audio thread.Open a specific audio device.
Pause and unpause the audio callback processing.
Pause and unpause the audio callback processing.
Queue more audio on non-callback devices.
Unlocks the default audio device.
Unlocks the given audio device.
Type Definitions
This function is called when the audio device needs more data.
Filter function used by
SDL_AudioCVT