Function openAudio

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

void openAudio (
  uint frequency,
  AudioFormat format,
  uint channels,
  uint chunkSize
) @trusted;

Parameters

NameDescription
frequency audio playback frequency in Hz
format dsdl2.AudioFormat enumeration indicating the scalar type of each audio sample
channels channels for Chunk playback (1 for mono; 2 for stereo)
chunkSize audio buffer size

Throws

dsdl2.SDLException if failed to open default audio device