[Scummvm-cvs-logs] SF.net SVN: scummvm: [31365] scummvm/trunk/engines/agi/sound.cpp
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Thu Apr 3 16:33:53 CEST 2008
Revision: 31365
http://scummvm.svn.sourceforge.net/scummvm/?rev=31365&view=rev
Author: buddha_
Date: 2008-04-03 07:33:53 -0700 (Thu, 03 Apr 2008)
Log Message:
-----------
Fix Apple IIGS midi playing speed (Based on tests with Apple IIGS KQ1 and SQ1 under MESS 0.124a)
Modified Paths:
--------------
scummvm/trunk/engines/agi/sound.cpp
Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp 2008-04-02 21:19:17 UTC (rev 31364)
+++ scummvm/trunk/engines/agi/sound.cpp 2008-04-03 14:33:53 UTC (rev 31365)
@@ -554,8 +554,8 @@
}
uint8 deltaTime = readByte;
- uint32 bpm = 120; // Don't know if this is correct
- g_midiMillis += (deltaTime * 1000) / bpm;
+ double bpm = 58.25; // Approximation based on tests with Apple IIGS KQ1 and SQ1 under MESS 0.124a
+ g_midiMillis += (uint32) ((deltaTime * 1000) / bpm);
// Check for end of MIDI sequence marker (This time it after reading delta-time)
if (*p == MIDI_BYTE_STOP_SEQUENCE) {
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