fn write_pcm(buffer: &Audio<Mono32>) {
    let mut pcm: Vec<u8> = Vec::new();
    for frame in buffer.iter() {
        let sample: f32 = frame.channels()[0].into();
        pcm.extend(sample.to_le_bytes().iter());
    }
    std::fs::write("pcm.raw", pcm.as_slice()).expect("Failed to write file");
}
/// Save a Raw PCM File from an audio buffer.
Save a Raw PCM File from an audio buffer.
Save a Raw PCM File from an audio buffer .
fn write_pcm(buffer: &Audio<Mono32>) {
    let mut pcm: Vec<u8> = Vec::new();
    for frame in buffer.iter() {
        let sample: f32 = frame.channels()[0].into();
        pcm.extend(sample.to_le_bytes().iter());
    }
    std::fs::write("pcm.raw", pcm.as_slice()).expect("Failed to write file");
}
fn write_pcm ( buffer : & Audio < Mono32 > ) { let mut pcm : Vec < u8 > = Vec :: new ( ) ; for frame in buffer . iter ( ) { let sample : f32 = frame . channels ( ) [ 0 ] . into ( ) ; pcm . extend ( sample . to_le_bytes ( ) . iter ( ) ) ; } std :: fs :: write ( " " , pcm . as_slice ( ) ) . expect ( " " ) ; }
Save a Raw PCM File from an audio buffer.
Save a Raw PCM File from an audio buffer .
buffer
&Audio<Mono32>