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.
- auto getMaxListenerCount() const -> int override
- Gets the maximum number of listeners supported by the audio context.
- auto getDefaultDevice() -> std::string override
- Gets the default audio device.
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. |
int cubos:: core:: al:: MiniaudioContext:: getMaxListenerCount() const override
Gets the maximum number of listeners supported by the audio context.
| Returns | Maximum number of listeners. |
|---|
std::string cubos:: core:: al:: MiniaudioContext:: getDefaultDevice() override
Gets the default audio device.
| Returns | Name of the default audio device. |
|---|