Skip to main content

stream_to_wav_bytes

Function stream_to_wav_bytes 

Source
pub fn stream_to_wav_bytes(
    stream: &StreamValue,
    spec: PcmSpec,
) -> Result<(Vec<u8>, PcmPumpSummary)>
Expand description

Drains a PCM stream and encodes it as canonical PCM16 WAV bytes.

Returns the encoded bytes together with a summary of the pumped PCM.