[][src]Function puremp3::read_mp3

pub fn read_mp3<R: Read>(
    reader: R
) -> Result<(FrameHeader, impl Iterator<Item = (f32, f32)>), Error>

Convenience method to decode an MP3. Returns the first frame header found in the MP3, and an Iterator that yields MP3 Samples`.

Each Sample represents one left and right sample at the sample rate of the MP3. Any invalid data is ignored. The iterator will provide Samples until there is no more data, or an error occurs.

If you need to handle errors or changes in the format mid-stream, use Mp3Decoder driectly.