AUDIO
Source snapshot · 11 November 2026

API reference / ravet_audio_file::decode_compressed

Function decode_compressed 

pub fn decode_compressed(
    encoded: &[u8],
    maximum_frames: usize,
) -> Result<DecodedClip, AudioFileError>
Expand description

Decode the single default audio track from explicitly supplied encoded bytes. Requires the optional compressed feature (pinned Symphonia). Input is copied and limited to 64 MiB; output is limited by caller frames and 16,777,216 samples (64 MiB), channels 1..64 and integer rates 1..768000. At most 1,048,576 packets are processed; decoded packet capacity is limited to 65536 frames. Backend metadata/visual limits are 64 KiB/0; decoder internal allocations remain backend-owned, not a total-memory or deadline guarantee. Gapless trims are enabled. Decode errors, nonfinite samples, changing audio configuration and chained stream resets reject the entire clip. No partial output is returned, no encoder/network/file I/O occurs and no audio callback use is permitted. Metadata and channel speaker positions are not exposed.