[vorbis-dev] Uncompressed size in bytes + memory buffer
Andrew Csikvari
csiki at mail.datanet.hu
Wed Jul 30 00:03:31 PDT 2003
Arrgh.
int MBSeek(void *datasource, ogg_int64_t offset, int whence)
{
MemBuffer& mb=*(MemBuffer*) datasource;
uint32 npos;
if (whence==SEEK_SET) npos=(uint32) offset; else
if (whence==SEEK_CUR) npos=mb.pos+(int32) offset; else
// was whence=SEEK_CUR...
if (whence==SEEK_END) npos=mb.size+(int32) offset; else return
-1;
if (npos>mb.size) return -1;
mb.pos=npos;
return 0;
}
Thanks,
Csiki
<p><p>--- >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