diff options
author | Lionel Ulmer | 2002-05-03 21:37:49 +0000 |
---|---|---|
committer | Lionel Ulmer | 2002-05-03 21:37:49 +0000 |
commit | bcae301bf7e2489493b768e770938d0a293e9f85 (patch) | |
tree | d61dfa01d4fe052647cba9866b042b59b0367b7f /sound.cpp | |
parent | aa09cbf8fed6cc9cd8b461fd5f09a979d1f2a218 (diff) | |
download | scummvm-rg350-bcae301bf7e2489493b768e770938d0a293e9f85.tar.gz scummvm-rg350-bcae301bf7e2489493b768e770938d0a293e9f85.tar.bz2 scummvm-rg350-bcae301bf7e2489493b768e770938d0a293e9f85.zip |
Finally easier than what I thought... Removed the last 'float' from
the sound code :-)
People with LoomCD and MP3 tracks should test that I did not break
anything.
svn-id: r4186
Diffstat (limited to 'sound.cpp')
-rw-r--r-- | sound.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -902,8 +902,7 @@ int Scumm::getCachedTrack(int track) { int Scumm::playMP3CDTrack(int track, int num_loops, int start, int delay) { int index; - long offset; - float frame_size; + unsigned int offset; mad_timer_t duration; g_scumm->_vars[g_scumm->VAR_MI1_TIMER] = 0; @@ -919,9 +918,8 @@ int Scumm::playMP3CDTrack(int track, int num_loops, int start, int delay) { if (index < 0) return -1; - // Calc offset - frame_size = (float)(144 * _mad_header[index].bitrate / _mad_header[index].samplerate); - offset = (long)( (float)start / (float)75 * ((float)_mad_header[index].bitrate/(float)8)); + // Calc offset. As all bitrates are in kilobit per seconds, the division by 200 is always exact + offset = (start * (_mad_header[index].bitrate / (8 * 25))) / 3; // Calc delay if (!delay) { |