[go: up one dir, main page]

Module sdl2::mixer[][src]

Expand description

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

Sound effect channel.

The internal format for an audio chunk.

Sound effect channel grouping.

This is an opaque data type used for Music data.

Context manager for sdl2_mixer to manage init and quit

Enums

Fader effect type enumerations

Music type enumerations

Constants

Default channels: Stereo.

The suggested default is signed 16bit samples in host byte order.

Good default sample rate in Hz (samples per second) for PC sound cards.

Maximum value for any volume setting.

Traits

Loader trait for RWops

Functions

Set the number of channels being mixed.

Shutdown and cleanup the mixer API.

Get the name of the indexed sample chunk decoder.

Get the number of sample chunk decoders available from the Mix_GetChunkDecoder function.

Returns the version of the dynamically linked SDL_mixer library

Get the name of the indexed music decoder.

Get the number of music decoders available.

Returns how many channels are currently paused.

Returns how many channels are currently playing.

Loads dynamic libraries and prepares them for use. Flags should be one or more flags from InitFlag.

Open the mixer with a certain audio format.

Get the actual audio format in use by the opened audio device.

Reserve num channels from being used when playing samples when passing in -1 as a channel number to playback functions.

When channel playback is halted, then the specified channel_finished function is called.

Unhooks the specified function set before, so no function is called when channel playback is halted.

Type Definitions