[vorbis] Seekable test

Michael Smith msmith at labyrinth.net.au
Thu Dec 28 16:24:24 PST 2000



>> >I think this should be: if (!offset) or if (offset != 0)
>>
>> Probably so. Every implementation of stdio I've seen actually returns -1
>in
>> this case, though (since that's what lseek returns for the error case, and
>> unixes as well as windows use lseek as the underlying call).
>
>Yes, but if you don't use those calls in normal code and return 1 (as the
>docs say), you get a wrong error.
>Maybe this should be added to the docs?

Yes, should be added to the docs at some point.

>Indeed. Maybe a better seekable test would be:
>To try to seek and check with the tell func if the seek worked.

Not really. The seek test that exists is known to work portably (and
doesn't involve moving around the file). Seek/tell would be slower at best,
and has no advantages that I can think of.

Michael

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