Expand description
The audio plane of a scene. Audio model: clips, tracks, and the leaf mixer.
Audio never enters the per-frame evaluation pipeline. Tracks are declared
next to visual animations and share the same absolute scene seconds, but
their content is baked once at seal time —
RanimScene::seal walks the tree and mixes
leaf by leaf into one interleaved stereo buffer — instead of per-frame
pulls. Consumers (video muxing, preview playback) read the baked buffer;
the visual evaluation stack is untouched.
Structs§
- Audio
Clip - Decoded audio: interleaved
f32PCM samples. - Audio
Error - An error produced while decoding an
AudioClipfrom a file. - Audio
Track - A sound’s content data: the clip plus how to play it.
Constants§
- MASTER_
CHANNELS - Master channel count; mixed buffers are interleaved stereo.
- MASTER_
SAMPLE_ RATE - Master sample rate every mixed buffer lives on.
Functions§
- decode 🔒
audio-decode - Decode interleaved
f32PCM from encoded audio bytes. - resample_
to_ 🔒master audio-decode - Resample interleaved master-stereo PCM to
MASTER_SAMPLE_RATEwith rubato’s FFT (synchronous) resampler in one offline pass. - write_
wav - Encode interleaved
f32PCM as a RIFF/WAVE file (IEEE float format).