Engine → Audio → audio_engine.h
audio_settings
| Type | Struct |
| Namespace | conjure::audio |
| Include File Path | engine/include/conjure/audio/audio_engine.h |
| Source File Path | engine/src/audio/audio_engine.cpp |
| API ↗ | Clips and decoding, Audio, Playing sounds |
Syntax
Variables
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| public | backend | audio_backend_kind | audio_ | Requested backend. AUTO allows normal backend selection; NULL_BACKEND selects deterministic headless playback. |
| public | deviceName | std::string | {} | Requested playback device name. An empty name selects the default device. |
| public | doppler | f32 | 0.0f | Doppler scale; zero disables the effect. The supported range is zero to ten. |
| public | groups | std::vector<group_desc> | {} | Groups created at construction. Their parents are resolved by name. |
| public | jobs | core::jobs::job_system * | nullptr | Optional job system for streaming decode work. A null pointer runs decoding inline during update(). |
| public | masterGain | f32 | 1.0f | Initial gain for the master mix group. |
| public | max | u32 | 5 | Number of failed restart attempts allowed before falling back to the null backend. |
| public | periodFrames | u32 | 480 | Requested number of frames per device callback; it must be non-zero. |
| public | recovery | f32 | 1.0f | Frame-time delay between device-recovery attempts. |
| public | sampleRate | u32 | 48000 | Requested mix rate in Hz. validate() checks it against MIN_SAMPLE_RATE and MAX_SAMPLE_RATE. |
| public | speedOfSound | f32 | DEFAULT_ | Speed of sound used by Doppler calculations, in world-distance units per second. |
Functions
Public
validate
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.