dsdl2.mixer

Members

Classes

Channel
class Channel

D class that acts as a proxy for a mixer audio channel from a channel ID

Chunk
class Chunk

D class that wraps Mix_Chunk storing an audio chunk for playback

Music
class Music

D class that wraps Mix_Music storing music for playback

Enums

Fading
enum Fading

D enum that wraps Mix_Fading

MusicType
enum MusicType

D enum that wraps Mix_MusicType

Functions

allocateChannels
void allocateChannels(uint channels)

Wraps Mix_AllocateChannels which changes the amount of track channels managed by SDL_mixer

getChannels
const(Channel[]) getChannels()

Gets dsdl2.mixer.Channel proxy instances of the available audio channels provided by SDL_mixer

getMasterVolume
ubyte getMasterVolume()

Wraps Mix_MasterVolume (from SDL_mixer 2.6) which gets the master volume

getVersion
Version getVersion()

Wraps Mix_Linked_Version which gets the version of the linked SDL2_mixer library

init
void init(bool flac, bool mod, bool mp3, bool ogg, bool mid, bool opus, bool everything)

Wraps Mix_Init which initializes selected SDL2_mixer audio format subsystems

load
Chunk load(string file)

Wraps Mix_LoadWAV which loads an audio file from the filesystem to a dsdl2.mixer.Chunk

loadMusic
Music loadMusic(string file)

Wraps Mix_LoadMUS which loads an audio file from the filesystem to a dsdl2.mixer.Music

loadMusicRaw
Music loadMusicRaw(void[] data)

Wraps Mix_LoadMUS_RW which loads an audio file from a buffer to a dsdl2.mixer.Music

loadMusicRaw
Music loadMusicRaw(void[] data, MusicType type)

Wraps Mix_LoadMUSType_RW which loads a typed audio file from a buffer to a dsdl2.mixer.Music

loadPCM
Chunk loadPCM(void[] pcm)

Wraps Mix_QuickLoad_RAW which loads raw PCM audio data to a dsdl2.mixer.Chunk

loadRaw
Chunk loadRaw(void[] data)

Wraps Mix_LoadWAV_RW which loads an audio file from a buffer to a dsdl2.mixer.Chunk

loadSO
void loadSO(string libName)

Loads the SDL2_mixer shared dynamic library, which wraps bindbc-sdl's loadSDLMixer function

openAudio
void openAudio(uint frequency, AudioFormat format, uint channels, uint chunkSize)

Wraps Mix_OpenAudio which opens the default audio device for playback by SDL_mixer

openAudioDevice
void openAudioDevice(uint frequency, AudioFormat format, uint channels, uint chunkSize, string deviceName, bool allowFrequencyChange, bool allowFormatChange, bool allowChannelsChange, bool allowSamplesChange, bool allowAnyChange)

Wraps Mix_OpenAudioDevice (from SDL_mixer 2.0.2) which opens a selected audio device for playback by SDL_mixer

querySpec
MixerSpec querySpec()

Wraps Mix_QuerySpec which queries the default audio device information

quit
void quit()

Wraps Mix_Quit which entirely deinitializes SDL2_mixer

reserveChannels
void reserveChannels(uint channels)

Wraps Mix_ReserveChannels which reserves the first track channels managed by SDL_mixer for the application

setMasterVolume
void setMasterVolume(ubyte newVolume)

Wraps Mix_MasterVolume (from SDL_mixer 2.6) which sets the master volume

Manifest constants

channels
enum channels;

Alias to MIX_CHANNELS

defaultFormat
enum defaultFormat;

Alias to MIX_DEFAULT_FORMAT

defaultFrequency
enum defaultFrequency;

Alias to MIX_DEFAULT_FREQUENCY

maxVolume
enum maxVolume;

Alias to MIX_MAX_VOLUME

Meta

Authors

Avaxar <avaxar@nekkl.org>