[Scummvm-cvs-logs] SF.net SVN: scummvm:[46843] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jan 1 20:23:23 CET 2010


Revision: 46843
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46843&view=rev
Author:   thebluegr
Date:     2010-01-01 19:23:23 +0000 (Fri, 01 Jan 2010)

Log Message:
-----------
SCI/new music code: The MIDI driver is now reset whenever the game's VM respawns, like what the old music code does. Fixes the MIDI music in KQ5CD, Lonbgow and perhaps others

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/sfx/music.cpp
    scummvm/trunk/engines/sci/sfx/soundcmd.cpp
    scummvm/trunk/engines/sci/sfx/soundcmd.h

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-01-01 18:57:14 UTC (rev 46842)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-01-01 19:23:23 UTC (rev 46843)
@@ -1812,6 +1812,8 @@
 			game_init(s);
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 			s->_sound.sfx_reset_player();
+#else
+			s->_soundCmd->resetDriver();
 #endif
 			_init_stack_base_with_selector(s, s->_kernel->_selectorCache.play);
 

Modified: scummvm/trunk/engines/sci/sfx/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.cpp	2010-01-01 18:57:14 UTC (rev 46842)
+++ scummvm/trunk/engines/sci/sfx/music.cpp	2010-01-01 19:23:23 UTC (rev 46843)
@@ -163,7 +163,6 @@
 	_pMidiDrv->close();
 	_pMidiDrv->open();
 	_pMidiDrv->setTimerCallback(this, &miditimerCallback);
-	_dwTempo = _pMidiDrv->getBaseTempo();
 }
 
 static int f_compare(const void *arg1, const void *arg2) {

Modified: scummvm/trunk/engines/sci/sfx/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.cpp	2010-01-01 18:57:14 UTC (rev 46842)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.cpp	2010-01-01 19:23:23 UTC (rev 46843)
@@ -1010,4 +1010,10 @@
 #endif
 }
 
+void SoundCommandParser::resetDriver() {
+#ifndef USE_OLD_MUSIC_FUNCTIONS
+	_music->resetDriver();
+#endif
+}
+
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/soundcmd.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.h	2010-01-01 18:57:14 UTC (rev 46842)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.h	2010-01-01 19:23:23 UTC (rev 46843)
@@ -58,6 +58,7 @@
 	void syncPlayList(Common::Serializer &s);
 	void reconstructPlayList(int savegame_version);
 	void printPlayList(Console *con);
+	void resetDriver();
 
 #ifndef USE_OLD_MUSIC_FUNCTIONS
 	/**


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