[vorbis] ov_read not returning amount requested

Rik Hemsley rik at kde.org
Tue Mar 6 20:18:53 PST 2001



#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.

Rik

--- >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