Module dsdl.mixer

Functions

NameDescription
allocateChannels(channels) Wraps Mix_AllocateChannels which changes the amount of track channels managed by SDL_mixer
getChannels() Gets Channel proxy instances of the available audio channels provided by SDL_mixer
getMasterVolume() Wraps Mix_MasterVolume (from SDL_mixer 2.6) which gets the master volume
getVersion() Wraps Mix_Linked_Version which gets the version of the linked SDL2_mixer library
init(flac, mod, mp3, ogg, mid, opus, everything) Wraps Mix_Init which initializes selected SDL2_mixer audio format subsystems
load(file) Wraps Mix_LoadWAV which loads an audio file from the filesystem to a Chunk
loadMusic(file) Wraps Mix_LoadMUS which loads an audio file from the filesystem to a Music
loadMusicRaw(data) Wraps Mix_LoadMUS_RW which loads an audio file from a buffer to a Music
loadMusicRaw(data, type) Wraps Mix_LoadMUSType_RW which loads a typed audio file from a buffer to a Music
loadPCM(pcm) Wraps Mix_QuickLoad_RAW which loads raw PCM audio data to a Chunk
loadRaw(data) Wraps Mix_LoadWAV_RW which loads an audio file from a buffer to a Chunk
loadSO(libName) Loads the SDL2_mixer shared dynamic library, which wraps bindbc-sdl's loadSDLMixer function
openAudio(frequency, format, channels, chunkSize) Wraps Mix_OpenAudio which opens the default audio device for playback by SDL_mixer
openAudioDevice(frequency, format, channels, chunkSize, deviceName, allowFrequencyChange, allowFormatChange, allowChannelsChange, allowSamplesChange, allowAnyChange) Wraps Mix_OpenAudioDevice (from SDL_mixer 2.0.2) which opens a selected audio device for playback by SDL_mixer
querySpec() Wraps Mix_QuerySpec which queries the default audio device information
quit() Wraps Mix_Quit which entirely deinitializes SDL2_mixer
reserveChannels(channels) Wraps Mix_ReserveChannels which reserves the first track channels managed by SDL_mixer for the application
setMasterVolume(newVolume) Wraps Mix_MasterVolume (from SDL_mixer 2.6) which sets the master volume

Classes

NameDescription
Channel D class that acts as a proxy for a mixer audio channel from a channel ID
Chunk D class that wraps Mix_Chunk storing an audio chunk for playback
Music D class that wraps Mix_Music storing music for playback

Enums

NameDescription
Fading D enum that wraps Mix_Fading
MusicType D enum that wraps Mix_MusicType

Manifest constants

NameTypeDescription
channels Alias to MIX_CHANNELS
defaultFormat Alias to MIX_DEFAULT_FORMAT
defaultFrequency Alias to MIX_DEFAULT_FREQUENCY
maxVolume Alias to MIX_MAX_VOLUME