mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
* Ogg codec fix regarding ogg files in pk3s (Tr3b)
This commit is contained in:
parent
e31156e586
commit
b5a220359b
1 changed files with 7 additions and 3 deletions
|
@ -198,15 +198,19 @@ int S_OGG_Callback_close(void *datasource)
|
|||
// ftell() replacement
|
||||
long S_OGG_Callback_tell(void *datasource)
|
||||
{
|
||||
snd_stream_t *stream;
|
||||
|
||||
// check if input is valid
|
||||
if(!datasource)
|
||||
{
|
||||
errno = EBADF;
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// we keep track of the file position in stream->pos
|
||||
return (long) (((snd_stream_t *) datasource) -> pos);
|
||||
// snd_stream_t in the generic pointer
|
||||
stream = (snd_stream_t *) datasource;
|
||||
|
||||
return (long) FS_FTell(stream->file);
|
||||
}
|
||||
|
||||
// the callback structure
|
||||
|
|
Loading…
Reference in a new issue