cubos::core::al::MiniaudioContext class

Audio device implementation using miniaudio.

Base classes

class AudioContext
Audio context that contains audio devices;.

Public functions

auto createDevice(unsigned int listenerCount, const std::string& specifier) -> AudioDevice override
Creates a new audio device.
auto createBuffer(const void* data, size_t dataSize) -> Buffer override
Creates a new audio buffer.
void enumerateDevices(std::vector<std::string>& devices) override
Enumerates the available devices.

Function documentation

AudioDevice cubos::core::al::MiniaudioContext::createDevice(unsigned int listenerCount, const std::string& specifier) override

Creates a new audio device.

Parameters
listenerCount Number of audio listeners to be supported by the device.
specifier Identifier of the audio device.
Returns Handle of the new device

Buffer cubos::core::al::MiniaudioContext::createBuffer(const void* data, size_t dataSize) override

Creates a new audio buffer.

Parameters
data Data to be written to the buffer, either .wav, .mp3 or .flac.
dataSize Size of the data to be written.
Returns Handle of the new buffer.

void cubos::core::al::MiniaudioContext::enumerateDevices(std::vector<std::string>& devices) override

Enumerates the available devices.

Parameters
devices out Vector to fill with the available device's specifiers.