Fixed ov_time_seek signature for Tremor
authorSam Lantinga <slouken@libsdl.org>
Tue, 15 Mar 2011 23:11:29 -0700
changeset 5055b24d089d9f5
parent 504 7a95f36a8bbf
child 506 586ae09f8176
Fixed ov_time_seek signature for Tremor
dynamic_ogg.c
dynamic_ogg.h
music_ogg.c
     1.1 --- a/dynamic_ogg.c	Thu Feb 17 13:35:14 2011 -0800
     1.2 +++ b/dynamic_ogg.c	Tue Mar 15 23:11:29 2011 -0700
     1.3 @@ -78,7 +78,11 @@
     1.4  			return -1;
     1.5  		}
     1.6  		vorbis.ov_time_seek =
     1.7 +#ifdef OGG_USE_TREMOR
     1.8 +			(long (*)(OggVorbis_File *,ogg_int64_t))
     1.9 +#else
    1.10  			(int (*)(OggVorbis_File *,double))
    1.11 +#endif
    1.12  			SDL_LoadFunction(vorbis.handle, "ov_time_seek");
    1.13  		if ( vorbis.ov_time_seek == NULL ) {
    1.14  			SDL_UnloadObject(vorbis.handle);
     2.1 --- a/dynamic_ogg.h	Thu Feb 17 13:35:14 2011 -0800
     2.2 +++ b/dynamic_ogg.h	Tue Mar 15 23:11:29 2011 -0700
     2.3 @@ -39,7 +39,11 @@
     2.4  #else
     2.5  	long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream);
     2.6  #endif
     2.7 +#ifdef OGG_USE_TREMOR
     2.8 +	int (*ov_time_seek)(OggVorbis_File *vf,ogg_int64_t pos);
     2.9 +#else
    2.10  	int (*ov_time_seek)(OggVorbis_File *vf,double pos);
    2.11 +#endif
    2.12  } vorbis_loader;
    2.13  
    2.14  extern vorbis_loader vorbis;
     3.1 --- a/music_ogg.c	Thu Feb 17 13:35:14 2011 -0800
     3.2 +++ b/music_ogg.c	Tue Mar 15 23:11:29 2011 -0700
     3.3 @@ -229,7 +229,11 @@
     3.4  /* Jump (seek) to a given position (time is in seconds) */
     3.5  void OGG_jump_to_time(OGG_music *music, double time)
     3.6  {
     3.7 +#ifdef OGG_USE_TREMOR
     3.8 +       vorbis.ov_time_seek( &music->vf, (ogg_int64_t)time );
     3.9 +#else
    3.10         vorbis.ov_time_seek( &music->vf, time );
    3.11 +#endif
    3.12  }
    3.13  
    3.14  #endif /* OGG_MUSIC */