AudioDeviceHandler

Manages and initializes audio devices.

Only one instance should be made.

Constructors

this
this(int slmpFreq, ubyte channels, ushort buffSize)

Creates an instance, and detects all drivers.

Destructor

~this
~this()

Destructor

Members

Functions

getChannels
ubyte getChannels()

Returns the number of audio channels.

getDevices
string[] getDevices()

Return an array with the names of the available audio devices.

getDrivers
string[] getDrivers()

Returns an array with the names of the available audio drivers.

getFormat
SDL_AudioFormat getFormat()

Returns the available format.

getSamplingFrequency
int getSamplingFrequency()

Returns the available sampling frequency.

initAudioDevice
void initAudioDevice(int id)

Opens a specific audio device for audio playback by ID, then sets the values for buffer sizes etc.

initAudioDriver
void initAudioDriver(int id)

Initializes an audio driver by ID.

Variables

devices
const(char)*[] devices;

Names of the devices

drivers
const(char)*[] drivers;

Names of the drivers

given
SDL_AudioSpec given;

Given audio specs

openedDevice
SDL_AudioDeviceID openedDevice;

The ID of the opened audio device

req
SDL_AudioSpec req;

Requested audio specs

Meta