Struct lewton::inside_ogg::OggStreamReader
[−]
[src]
pub struct OggStreamReader<'a, T: Read + Seek + 'a> { pub ident_hdr: IdentHeader, pub comment_hdr: CommentHeader, pub setup_hdr: SetupHeader, // some fields omitted }
Reading ogg/vorbis files or streams
This is a small helper struct to help reading ogg/vorbis files or streams in that format.
It only supports the main use case of pure audio ogg files streams. Reading a file where vorbis is only one of multiple streams, like in the case of ogv, is not supported.
If you need support for this, you need to use the lower level methods instead.
Fields
ident_hdr: IdentHeader
comment_hdr: CommentHeader
setup_hdr: SetupHeader
Methods
impl<'a, T: Read + Seek + 'a> OggStreamReader<'a, T>
[src]
fn new(rdr: &'a mut PacketReader<'a, T>) -> Result<OggStreamReader<'a, T>, VorbisError>
Constructs a new OggStreamReader from a given PacketReader.
fn read_decompressed_packet(&mut self) -> Result<(Vec<Vec<i16>>, usize), VorbisError>
Reads and decompresses an audio packet from the stream.