Skip to content
Permalink
Browse files

Fixed ov_time_seek signature for Tremor

  • Loading branch information
slouken committed Mar 16, 2011
1 parent 37bd335 commit 30f5df9c27b757ec1be757bb6f02461c14ab71fb
Showing with 12 additions and 0 deletions.
  1. +4 −0 dynamic_ogg.c
  2. +4 −0 dynamic_ogg.h
  3. +4 −0 music_ogg.c
@@ -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);
@@ -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;
@@ -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.