aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/midi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos/midi.cpp')
-rw-r--r--engines/agos/midi.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index f636c1348a..d11ff201ea 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -623,26 +623,27 @@ void MidiPlayer::loadSMF(Common::File *in, int song, bool sfx) {
// 1 BYTE : Major version
// 1 BYTE : Minor version
// 1 BYTE : Ticks (Ranges from 2 - 8, always 2 for SFX)
- // 1 BYTE : Loop control. 0 = no loop, 1 = loop
-
- // In the original, the ticks value indicated how many
- // times the music timer was called before it actually
- // did something. The larger the value the slower the
- // music.
- //
- // We, on the other hand, have a timer rate which is
- // used to control by how much the music advances on
- // each onTimer() call. The larger the value, the
- // faster the music.
- //
- // It seems that 4 corresponds to our base tempo, so
- // this should be the right way to calculate it.
- timerRate = (4 * _driver->getBaseTempo()) / p->data[5];
-
- // According to bug #1004919 calling setLoop() from
- // within a lock causes a lockup, though I have no
- // idea when this actually happens.
- _loopTrack = (p->data[6] != 0);
+ // 1 BYTE : Loop control. 0 = no loop, 1 = loop (Music only)
+ if (!sfx) {
+ // In the original, the ticks value indicated how many
+ // times the music timer was called before it actually
+ // did something. The larger the value the slower the
+ // music.
+ //
+ // We, on the other hand, have a timer rate which is
+ // used to control by how much the music advances on
+ // each onTimer() call. The larger the value, the
+ // faster the music.
+ //
+ // It seems that 4 corresponds to our base tempo, so
+ // this should be the right way to calculate it.
+ timerRate = (4 * _driver->getBaseTempo()) / p->data[5];
+
+ // According to bug #1004919 calling setLoop() from
+ // within a lock causes a lockup, though I have no
+ // idea when this actually happens.
+ _loopTrack = (p->data[6] != 0);
+ }
}
MidiParser *parser = MidiParser::createParser_SMF();