[Scummvm-cvs-logs] SF.net SVN: scummvm: [25631] scummvm/trunk/engines/agos

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Feb 16 14:41:39 CET 2007


Revision: 25631
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25631&view=rev
Author:   fingolfin
Date:     2007-02-16 05:41:38 -0800 (Fri, 16 Feb 2007)

Log Message:
-----------
AGOS: Send GM System Enable/On upon startup

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.cpp
    scummvm/trunk/engines/agos/midi.cpp
    scummvm/trunk/engines/agos/midi.h

Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp	2007-02-16 13:30:41 UTC (rev 25630)
+++ scummvm/trunk/engines/agos/agos.cpp	2007-02-16 13:41:38 UTC (rev 25631)
@@ -73,7 +73,7 @@
 #endif
 
 AGOSEngine::AGOSEngine(OSystem *syst)
-	: Engine(syst), midi(syst) {
+	: Engine(syst), midi() {
 	_vcPtr = 0;
 	_vc_get_out_of_code = 0;
 	_gameOffsetsPtr = 0;

Modified: scummvm/trunk/engines/agos/midi.cpp
===================================================================
--- scummvm/trunk/engines/agos/midi.cpp	2007-02-16 13:30:41 UTC (rev 25630)
+++ scummvm/trunk/engines/agos/midi.cpp	2007-02-16 13:41:38 UTC (rev 25631)
@@ -36,7 +36,7 @@
 // and just provide a factory function.
 extern MidiParser *MidiParser_createS1D();
 
-MidiPlayer::MidiPlayer(OSystem *system) {
+MidiPlayer::MidiPlayer() {
 	// Since initialize() is called every time the music changes,
 	// this is where we'll initialize stuff that must persist
 	// between songs.
@@ -72,6 +72,12 @@
 	if (ret)
 		return ret;
 	_driver->setTimerCallback(this, &onTimer);
+
+	// General MIDI System On message
+	// Resets all GM devices to default settings
+	_driver->sysEx((const byte *)"\x7E\x7F\x09\x01", 4);
+	g_system->delayMillis(200);
+
 	return 0;
 }
 

Modified: scummvm/trunk/engines/agos/midi.h
===================================================================
--- scummvm/trunk/engines/agos/midi.h	2007-02-16 13:30:41 UTC (rev 25630)
+++ scummvm/trunk/engines/agos/midi.h	2007-02-16 13:41:38 UTC (rev 25631)
@@ -84,7 +84,7 @@
 	bool _enable_sfx;
 
 public:
-	MidiPlayer(OSystem *system);
+	MidiPlayer();
 	virtual ~MidiPlayer();
 
 	void loadSMF(Common::File *in, int song, bool sfx = false);


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