Skip to content

Engine → Audio

audio_device.h

Device descriptions shared by every backend.

Structs

File Description
audio_device_info One playback device as reported by enumerate_devices().
backend_desc What audio_backend::start() needs: the requested mix format (channels fixed at MIX_CHANNELS), the period size (480 = 10 ms at 48 kHz; miniaudio may round), the device name (empty = default) and the callback the backend drives.

Type Aliases

mix_callback

using mix_callback = void (*)(void *user, f32 *output, u32 frameCount) noexcept;

The function a backend drives to pull mixed audio: interleaved f32 frames of MIX_CHANNELS channels at the format negotiated by start(). Called on the device thread (miniaudio) or on the main thread (null); it must not allocate, lock or log.

Constants

Name Type Value Description
NULL_DEVICE_NAME inline constexpr const char * "Null Output" Name the null backend reports for its single virtual device.