[−][src]Module sdl2::mixer
A binding for the library SDL2_mixer
Note that you need to build with the
feature mixer
for this module to be enabled,
like so:
$ cargo build --features "mixer"
If you want to use this with from inside your own crate, you will need to add this in your Cargo.toml
[dependencies.sdl2]
version = ...
default-features = false
features = ["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 |
Enums
Fading | Fader effect type enumerations |
MusicType | Music type enumerations |
Constants
AUDIO_F32LSB | |
AUDIO_F32MSB | |
AUDIO_F32 | |
AUDIO_F32SYS | |
AUDIO_S8 | |
AUDIO_S16LSB | |
AUDIO_S16MSB | |
AUDIO_S16 | |
AUDIO_S16SYS | |
AUDIO_S32LSB | |
AUDIO_S32MSB | |
AUDIO_S32 | |
AUDIO_S32SYS | |
AUDIO_U8 | |
AUDIO_U16LSB | |
AUDIO_U16MSB | |
AUDIO_U16 | |
AUDIO_U16SYS | |
DEFAULT_CHANNELS | Default 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. |
MAX_VOLUME | Maximum value for any volume setting. |
Traits
LoaderRWops | Loader trait for |
Functions
allocate_channels | Set the number of channels being mixed. |
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 |
get_linked_version | Returns the version of the dynamically linked |
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 |
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 |
unset_channel_finished | Unhooks the specified function set before, so no function is called when channel playback is halted. |
Type Definitions
AudioFormat |