[vorbis-dev] ov_read( ) return value
Michael Smith
msmith at xiph.org
Fri Mar 14 18:20:18 PST 2003
On Saturday 15 March 2003 07:05, Umer.Iftikhar at jci.com wrote:
> When I call ov_read ( ) I cannot get more then 1024 bytes decoded even when
> the buffer size is 4K. The function only decodes 1024 bytes max even when I
> tell it to decode 4096 bytes. Does anyone has an idea what is going on.
>
ov_read() will decode up to one packet or the buffer size, whichever is
smaller. Typical packets in vorbis files are 2048 samples long. You only get
half of this per packet (because they're overlapped) - so 1024 samples. For
stereo/16 bit decode, that's 4096 bytes. If you want to decode more than
this, you should loop over ov_read()
Mike
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list