Skip to content

Engine → Audio → audio_engine.h

audio_settings

Syntax

struct CONJURE_API audio_settings

Variables

AccessNameTypeDefaultDescription
publicbackendaudio_backend_kindaudio_backend_kind::AUTORequested backend. AUTO allows normal backend selection; NULL_BACKEND selects deterministic headless playback.
publicdeviceNamestd::string{}Requested playback device name. An empty name selects the default device.
publicdopplerFactorf320.0fDoppler scale; zero disables the effect. The supported range is zero to ten.
publicgroupsstd::vector<group_desc>{}Groups created at construction. Their parents are resolved by name.
publicjobscore::jobs::job_system *nullptrOptional job system for streaming decode work. A null pointer runs decoding inline during update().
publicmasterGainf321.0fInitial gain for the master mix group.
publicmaxRecoveryAttemptsu325Number of failed restart attempts allowed before falling back to the null backend.
publicperiodFramesu32480Requested number of frames per device callback; it must be non-zero.
publicrecoveryBackoffSecondsf321.0fFrame-time delay between device-recovery attempts.
publicsampleRateu3248000Requested mix rate in Hz. validate() checks it against MIN_SAMPLE_RATE and MAX_SAMPLE_RATE.
publicspeedOfSoundf32DEFAULT_SPEED_OF_SOUNDSpeed of sound used by Doppler calculations, in world-distance units per second.

Functions

Public

validate

[[nodiscard]] core::result<void> validate() const;

INVALID_SETTINGS when the sample rate is outside [MIN_SAMPLE_RATE, MAX_SAMPLE_RATE], the period is 0, a group name is null or duplicated, a parent name is unknown, the group tree has a cycle or exceeds MAX_GROUP_DEPTH, or more than MAX_GROUPS - 1 groups are listed.