mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
MP Mixer X: Fix double->UINT32 cast (buildbots)
This commit is contained in:
parent
000873cf50
commit
3ec85a69ff
1 changed files with 2 additions and 2 deletions
|
|
@ -806,7 +806,7 @@ UINT32 I_GetSongLength(void)
|
||||||
#ifdef HAVE_MIXERX
|
#ifdef HAVE_MIXERX
|
||||||
double xlength = Mix_GetMusicTotalTime(music);
|
double xlength = Mix_GetMusicTotalTime(music);
|
||||||
if (xlength >= 0)
|
if (xlength >= 0)
|
||||||
return (UINT32)floor(xlength * 1000.);
|
return (UINT32)(xlength*1000);
|
||||||
#endif
|
#endif
|
||||||
// VERY IMPORTANT to set your LENGTHMS= in your song files, folks!
|
// VERY IMPORTANT to set your LENGTHMS= in your song files, folks!
|
||||||
// SDL mixer can't read music length itself.
|
// SDL mixer can't read music length itself.
|
||||||
|
|
@ -953,7 +953,7 @@ UINT32 I_GetSongPosition(void)
|
||||||
#ifdef HAVE_MIXERX
|
#ifdef HAVE_MIXERX
|
||||||
double xposition = Mix_GetMusicPosition(music);
|
double xposition = Mix_GetMusicPosition(music);
|
||||||
if (xposition >= 0)
|
if (xposition >= 0)
|
||||||
return (UINT32)floor(xposition * 1000.);
|
return (UINT32)(xposition*1000);
|
||||||
#endif
|
#endif
|
||||||
return music_bytes/44100.0L*1000.0L/4; //assume 44.1khz
|
return music_bytes/44100.0L*1000.0L/4; //assume 44.1khz
|
||||||
// 4 = byte length for 16-bit samples (AUDIO_S16SYS), stereo (2-channel)
|
// 4 = byte length for 16-bit samples (AUDIO_S16SYS), stereo (2-channel)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue