Skip to main content

write_wav_with_options

Function write_wav_with_options 

Source
pub fn write_wav_with_options<W: Write>(
    writer: &mut W,
    wav: &Wav,
    options: WavWriteOptions,
) -> Result<(), WavError>
Expand description

Writes WAV data to a writer with explicit options.

ยงErrors

WavError::InvalidChunk when a derived header field overflows its on-disk width: the data size, the byte rate from sample rate times block align, the RIFF size, or the block align from channels times bytes per sample. In game mode, WavError::MismatchedPayload when the form cannot hold the payload, and WavError::EmptyMp3 for an MP3-in-WAV with no MP3. The payload is built before anything is written, so these leave the writer untouched. WavError::Io when the writer fails.