Skip to content

Engine → Audio

audio_backend.h

The backend interface: the piece that owns a device (or a virtual clock) and drives the mix callback. Implementations: miniaudio (real devices, device thread) and null (headless, main thread). Every method is main-thread only except state().

Classes

File Description
audio_backend

Functions

Public

create_backend

[[nodiscard]] CONJURE_API core::result<std::unique_ptr<audio_backend>> create_backend(
    audio_backend_kind kind);

Creates a stopped backend. AUTO = MINIAUDIO when a device backend is compiled in, else NULL_BACKEND. Fails with UNSUPPORTED (core) when the requested kind is not compiled in.

is_backend_compiled

[[nodiscard]] CONJURE_API bool is_backend_compiled(
    audio_backend_kind kind) noexcept;

True when a backend of this kind is compiled into the library (AUTO and NULL_BACKEND always).