pub fn encode_wav(pcm: &[f32], sample_rate: u32) -> Vec<u8> ⓘExpand description
Encode a whole PCM buffer as a WAV file in memory.
For the offline path, where the sample count is known before writing. Streaming synthesis uses
WavWriter, which does not need to know it up front.