aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-07-29 00:05:19 +0000
committerMax Horn2003-07-29 00:05:19 +0000
commitc62b74a08fa055b0c9bdd9e9719a54edeff98b12 (patch)
tree7c04412995a763a2cac875a025e72164acdc03d9
parent83940e186727f8309b8b2b5335470decd6bc14d1 (diff)
downloadscummvm-rg350-c62b74a08fa055b0c9bdd9e9719a54edeff98b12.tar.gz
scummvm-rg350-c62b74a08fa055b0c9bdd9e9719a54edeff98b12.tar.bz2
scummvm-rg350-c62b74a08fa055b0c9bdd9e9719a54edeff98b12.zip
Added FIXME
svn-id: r9265
-rw-r--r--scumm/sound.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 9be43dc403..8a308c3d69 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -1791,19 +1791,19 @@ int MP3TrackInfo::play(SoundMixer *mixer, int startFrame, int duration) {
// Calc offset. As all bitrates are in kilobit per seconds, the division by 200 is always exact
offset = (startFrame * (_mad_header.bitrate / (8 * 25))) / 3;
+ _file->seek(offset, SEEK_SET);
// Calc delay
if (!duration) {
+ // FIXME: Using _size here is a problem if offset (or equivalently
+ // startFrame) is non-zero.
mad_timer_set(&durationTime, (_size * 8) / _mad_header.bitrate,
(_size * 8) % _mad_header.bitrate, _mad_header.bitrate);
} else {
mad_timer_set(&durationTime, duration / 75, duration % 75, 75);
- }
-
-printf("startFrame %d, duration %d\n", startFrame, duration);
- // Go
- _file->seek(offset, SEEK_SET);
+ }
+ // Play it
return mixer->playMP3CDTrack(NULL, _file, durationTime);
}