pub(super) fn write<F: Frame>(audio: Audio<F>, filename: &str) -> io::Result<()>
where
    Ch16: From<F::Chan>,
{
    let audio =
        Audio::<Stereo16>::with_stream(audio.sample_rate().floor(), &audio);
    let mut buf = vec![];
    write_header(&mut buf, &audio);
    write_fmt_header(&mut buf, &audio);
    write_audio_data(&mut buf, &audio);
    fs::write(filename, buf)
}
/// Write a 16-bit PCM WAV file
Write a 16-bit PCM WAV file
Write a 16 - bit PCM WAV file
pub(super) fn write<F: Frame>(audio: Audio<F>, filename: &str) -> io::Result<()>
where
    Ch16: From<F::Chan>,
{
    let audio =
        Audio::<Stereo16>::with_stream(audio.sample_rate().floor(), &audio);
    let mut buf = vec![];
    write_header(&mut buf, &audio);
    write_fmt_header(&mut buf, &audio);
    write_audio_data(&mut buf, &audio);
    fs::write(filename, buf)
}
pub ( super ) fn write < F : Frame > ( audio : Audio < F > , filename : & str ) -> io :: Result < ( ) > where Ch16 : From < F :: Chan > , { let audio = Audio :: < Stereo16 > :: with_stream ( audio . sample_rate ( ) . floor ( ) , & audio ) ; let mut buf = vec ! [ ] ; write_header ( & mut buf , & audio ) ; write_fmt_header ( & mut buf , & audio ) ; write_audio_data ( & mut buf , & audio ) ; fs :: write ( filename , buf ) }
Write a 16-bit PCM WAV file
Write a 16 - bit PCM WAV file
audio
Audio<F>
filename
&str
audio
Audio<F>
filename
&str