Skip to main content

write_wav

Function write_wav 

Source
pub(crate) fn write_wav(format: AudioFormat, samples: &[f32]) -> Vec<u8> ⓘ
Expand description

Write interleaved samples as a 16-bit PCM RIFF/WAVE file.

Each sample clamps to the unit range and then scales to i16, the same conversion the soundfont pipeline uses for its own files.