Skip to main content

Module audio

Module audio 

Source
Available on crate feature preview and non-target_family=wasm only.
Expand description

Preview audio playback (native only).

The scene’s mixed audio buffer is played through rodio. The player keeps the output device open across play/pause cycles; its position readout is a wall-clock estimate over the playback rate, clamped to the buffer duration — the audio device consumes in real time, so both advance together and never accumulate drift.

Structs§

AudioPlayer 🔒
Owns the output device and the playback sink for one scene’s audio.
MixedAudio 🔒
The scene’s mixed audio buffer, produced in one offline pass and shared with the playback device.
PcmSource 🔒
Interleaved stereo PCM source with sample-accurate absolute seeks.

Enums§

PlayerState 🔒

Constants§

SCRUB_GAIN 🔒
Scrub voices play at reduced volume and silence themselves once the playhead stops moving.
SCRUB_IDLE 🔒