Crate sdl2_mixer

Source
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.
InitFlag
Music
This is an opaque data type used for Music data.
Sdl2MixerContext
Context manager for sdl2_mixer to manage init and quit

Enums§

Fading
Fader effect type enumerations
MusicType
Music type enumerations

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§

LoaderRWops
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.

Type Aliases§

AudioFormat