[vorbis] ov_read not returning amount requested
Monty
xiphmont at xiph.org
Wed Mar 7 11:20:32 PST 2001
On Wed, Mar 07, 2001 at 04:18:53AM +0000, Rik Hemsley wrote:
> #if Lance
> > When I am using vorbisfile on a disk file, ov_read does not always (in
> > fact - most of the time) read the number of bytes I request.
> > It doesn't seem to be dependent on the number I ask for, and the ratio
> > between what I request and what is read varies.
> > Can somebody tell me what's going on here?
>
> On a multiprocessing system, another task may be requesting resources
> such as the disks at the same time as yours. Unless you're running
> as a realtime process, the kernel will, at some point, stop your
> process running, and give time to another. This means that you don't
> get all the bytes you requested during a single read() operation.
> Just keep asking until you have enough.
That has nothing to do with it in this case. ov_read decodes, at
most, one complete vorbis packet to audio behund the scenes per call,
and that determines the maximum amount of data returned. This is to
avoid wastefull buffering within vorbis/vorbisfile.
Monty
--- >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-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
mailing list