Whole document tree
ov_read()declared in "vorbis/vorbisfile.h"; This is the main function used to decode a Vorbis file within a loop. This function deals with more complicated bitstream chaining issues. Up to this point, everything could more or less hide the multiple logical bitstream nature of chaining from the toplevel application if the toplevel application didn't particularly care. However, when we actually read audio back, we must be aware that multiple bitstream sections do not necessarily have to have the same number of channels or sampling rate. ov_read() passes back the index of the sequential logical bitstream currently being decoded along with the PCM data in order that the toplevel application can take action on channel/sample rate changes. This number will be incremented at chaining boundaries even for non-seekable streams. For seekable streams, it represents the actual chaining index within the physical bitstream. ov_read() passes back the logical bitstream number currently being decoded along with the PCM data in order that the toplevel application can take action on channel/sample rate changes.
Parameters
Return Values
NotesTypical usage: bytes_read = ov_read(&vf, buffer, 4096,0,2,1,¤t_section)This reads up to 4096 bytes into a buffer, with signed 16-bit little-endian samples.
|