Function wav::read[][src]

pub fn read<R>(reader: &mut R) -> Result<(Header, BitDepth)> where
    R: Read + Seek

Reads in the given reader and attempts to extract the audio data and header from it.

Errors

This function fails under the following circumstances:

  • Any error occurring from the reader parameter during reading.
  • The data isn’t RIFF data.
  • The wave header specifies a compressed data format.
  • The wave header specifies an unsupported bit-depth.
  • The wave data is malformed, or otherwise couldn’t be parsed into samples.