AudioDeviceHandler

Manages and initializes audio devices.

Important: Only one instance should be made.

Constructors

this
this(int channelLayout, int slmpFreq, int frameSize, int nOfFrames)

Creates an instance, and detects all drivers.

Destructor

~this
~this()

Destructor

Members

Functions

getBufferSize
size_t getBufferSize()

Returns the buffer size in units.

getChannels
int getChannels()

Returns the number of audio channels.

getDevices
string[] getDevices()

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

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.

Variables

channelLayout
int channelLayout;

Requested channel layout

frameSize
int frameSize;

Requested/given buffer base size / frame length (in samples)

nOfFrames
int nOfFrames;

Requested/given number of frames before they get sent to the output

slmpFreq
int slmpFreq;

Requested/given sampling frequency

Meta