pub fn encode_pcm_with_dither(
audio: &Audio,
format: SampleFormat,
endian: Endian,
dither: Dither,
) -> Result<Vec<u8>>Expand description
Encode interleaved PCM with optional seeded noise at the final integer quantizer.
The seed restarts on each call. For chunked input, use
crate::stream::PcmEncoder::with_dither to retain its state across chunks.
Float and G.711 samples reject enabled dither with
crate::ErrorCode::InvalidArgument.