Prepared memory transport¶
MemoryPlayback copies an explicitly supplied finite interleaved f32 clip during
preparation. It accepts 1..64 channels, 1..768,000 Hz metadata, at most 16,777,216
samples (64 MiB), and 1..65,536 frames per render. Decode files on the worker side
before constructing it; empty/nonfinite/partial-frame clips reject.
Exclusive audio-thread commands provide play, pause, stop, frame seek and a half-open loop range. Pause retains position; stop rewinds to the loop start or zero. Seek allows EOF; with a loop, positions outside it normalize to its start. Loop boundaries wrap exactly, including after a block's final copied frame. Render fills all samples, zeroes paused/end suffixes, counts source frames/wraps and stops at EOF. Invalid output shapes/capacities silence the buffer and preserve transport state. Zero-frame render preserves play/pause. Invalid seeks/loops preserve configuration and position.
After preparation these operations use no heap, blocking or file I/O. Drop frees clip storage outside audio. Caller serializes commands and matches the output sample rate; there is no resampling, crossfade, command mailbox, streaming seek, UI or device-clock alignment. Loop/seek boundaries can click. The synthetic WAV example decodes first, then verifies stereo looping and silent pause:
CARGO_BUILD_JOBS=2 cargo run -p ravet-audio-file --example transport --locked
Fixtures validate variable block/loop boundaries, EOF/paused silence, malformed commands, and 10,000 prepared operations with no Rust heap activity. See decision 0038.