[Scummvm-cvs-logs] SF.net SVN: scummvm: [22907] scummvm/trunk/engines/simon/midi.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Jun 4 02:03:36 CEST 2006
Revision: 22907
Author: kirben
Date: 2006-06-03 17:03:30 -0700 (Sat, 03 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22907&view=rev
Log Message:
-----------
Looping and tempo details in GMF header are used by MIDI sound effects too
Modified Paths:
--------------
scummvm/trunk/engines/simon/midi.cpp
Modified: scummvm/trunk/engines/simon/midi.cpp
===================================================================
--- scummvm/trunk/engines/simon/midi.cpp 2006-06-03 22:00:20 UTC (rev 22906)
+++ scummvm/trunk/engines/simon/midi.cpp 2006-06-04 00:03:30 UTC (rev 22907)
@@ -409,26 +409,25 @@
// 1 BYTE : Minor version
// 1 BYTE : Ticks (Ranges from 2 - 8, always 2 for SFX)
// 1 BYTE : Loop control. 0 = no loop, 1 = loop
- 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);
- }
+ // 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();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list