Skip to content

Commit

Permalink
Fixed ov_time_seek signature for Tremor
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 16, 2011
1 parent 37bd335 commit 30f5df9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dynamic_ogg.c
Expand Up @@ -78,7 +78,11 @@ int Mix_InitOgg()
return -1;
}
vorbis.ov_time_seek =
#ifdef OGG_USE_TREMOR
(long (*)(OggVorbis_File *,ogg_int64_t))
#else
(int (*)(OggVorbis_File *,double))
#endif
SDL_LoadFunction(vorbis.handle, "ov_time_seek");
if ( vorbis.ov_time_seek == NULL ) {
SDL_UnloadObject(vorbis.handle);
Expand Down
4 changes: 4 additions & 0 deletions dynamic_ogg.h
Expand Up @@ -39,7 +39,11 @@ typedef struct {
#else
long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
#endif
#ifdef OGG_USE_TREMOR
int (*ov_time_seek)(OggVorbis_File *vf,ogg_int64_t pos);
#else
int (*ov_time_seek)(OggVorbis_File *vf,double pos);
#endif
} vorbis_loader;

extern vorbis_loader vorbis;
Expand Down
4 changes: 4 additions & 0 deletions music_ogg.c
Expand Up @@ -229,7 +229,11 @@ void OGG_delete(OGG_music *music)
/* Jump (seek) to a given position (time is in seconds) */
void OGG_jump_to_time(OGG_music *music, double time)
{
#ifdef OGG_USE_TREMOR
vorbis.ov_time_seek( &music->vf, (ogg_int64_t)time );
#else
vorbis.ov_time_seek( &music->vf, time );
#endif
}

#endif /* OGG_MUSIC */

0 comments on commit 30f5df9

Please sign in to comment.