voice.h
| File Path | engine/include/conjure/audio/voice.h |
| API ↗ | Playing sounds |
Voice identity and parameters.
Structs
| File | Description |
|---|---|
play_params |
Everything play() needs. Values outside the documented ranges are clamped at the API boundary; NaN becomes the default. |
voice_id |
Handle of a voice: the slot key of the engine's voice table. 8 bytes, trivially copyable, mirrored by the C# AudioSource struct. A stale id is rejected by every engine call. |
voice_info |
Main-thread mirror of a voice, refreshed by audio_engine::update() and end_frame(). |
Functions
Public
clamp_play_params
clamp_play_params[[nodiscard]] CONJURE_API play_params clamp_play_params(
const play_params ¶ms) noexcept;Clamp rules applied to every field: volume [0, 2], pitch [0.25, 4], pan [-1, 1], minDistance >= 0.01, maxDistance >= minDistance, rolloff [0, 10], startSeconds >= 0; NaN becomes the field's default.
clamp_volume
clamp_volumeIndividual clamp helpers shared by play_params and the engine setters.