Expand description
A binding for SDL2_mixer
.
Structs§
- Channel
- Sound effect channel.
- Chunk
- The internal format for an audio chunk.
- Group
- Sound effect channel grouping.
- Init
Flag - Music
- This is an opaque data type used for Music data.
- Sdl2
Mixer Context - Context manager for
sdl2_mixer
to manage init and quit
Enums§
Constants§
- AUDIO_
F32 - AUDIO_
F32LSB - AUDIO_
F32MSB - AUDIO_
F32SYS - AUDIO_
S8 - AUDIO_
S16 - AUDIO_
S32 - AUDIO_
S16LSB - AUDIO_
S16MSB - AUDIO_
S16SYS - AUDIO_
S32LSB - AUDIO_
S32MSB - AUDIO_
S32SYS - AUDIO_
U8 - AUDIO_
U16 - AUDIO_
U16LSB - AUDIO_
U16MSB - AUDIO_
U16SYS - DEFAULT_
CHANNELS - Defualt channels: Stereo.
- DEFAULT_
FORMAT - The suggested default is signed 16bit samples in host byte order.
- DEFAULT_
FREQUENCY - Good default sample rate in Hz (samples per second) for PC sound cards.
- INIT_
FLAC - INIT_
FLUIDSYNTH - INIT_
MOD - INIT_
MODPLUG - INIT_
MP3 - INIT_
OGG - MAX_
VOLUME - Maximum value for any volume setting.
Traits§
- LoaderR
Wops - Loader trait for
RWops
Functions§
- allocate_
channels - Set the number of channels being mixed.
- channel
- Return a channel object.
- close_
audio - Shutdown and cleanup the mixer API.
- get_
chunk_ decoder - Get the name of the indexed sample chunk decoder.
- get_
chunk_ decoders_ number - Get the number of sample chunk decoders available from the
Mix_GetChunkDecoder
function. - get_
linked_ version - Returns the version of the dynamically linked
SDL_mixer
library - get_
music_ decoder - Get the name of the indexed music decoder.
- get_
music_ decoders_ number - Get the number of music decoders available.
- get_
paused_ channels_ number - Returns how many channels are currently paused.
- get_
playing_ channels_ number - Returns how many channels are currently playing.
- init
- Loads dynamic libraries and prepares them for use. Flags should be
one or more flags from
InitFlag
. - open_
audio - Open the mixer with a certain audio format.
- query_
spec - Get the actual audio format in use by the opened audio device.
- reserve_
channels - Reserve num channels from being used when playing samples when passing in -1 as a channel number to playback functions.
- set_
channel_ finished - When channel playback is halted, then the specified
channel_finished
function is called. - unset_
channel_ finished - Unhooks the specified function set before, so no function is called when channel playback is halted.