Skip to main content

encode

Function encode 

Source
pub fn encode(
    fmt: &AudioFormat,
    chunk_offset: u64,
    input: &[u8],
    out: &mut Vec<u8>,
) -> Option<usize>
Expand description

Encode one chunk of a PCM file.

chunk_offset is where this chunk starts in the file, which is what lets the codec find the frame boundaries inside it. Returns None when there is nothing worth modelling — too few whole frames — so the caller can fall back rather than pay for a pointless pass.