* Ogg codec fix regarding ogg files in pk3s (Tr3b)

This commit is contained in:
Tim Angus 2008-03-02 15:28:39 +00:00
parent e31156e586
commit b5a220359b

View file

@ -198,15 +198,19 @@ int S_OGG_Callback_close(void *datasource)
// ftell() replacement // ftell() replacement
long S_OGG_Callback_tell(void *datasource) long S_OGG_Callback_tell(void *datasource)
{ {
snd_stream_t *stream;
// check if input is valid // check if input is valid
if(!datasource) if(!datasource)
{ {
errno = EBADF; errno = EBADF;
return -1; return -1;
} }
// we keep track of the file position in stream->pos // snd_stream_t in the generic pointer
return (long) (((snd_stream_t *) datasource) -> pos); stream = (snd_stream_t *) datasource;
return (long) FS_FTell(stream->file);
} }
// the callback structure // the callback structure