aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/agos.cpp6
-rw-r--r--engines/agos/midi.cpp8
-rw-r--r--engines/agos/midi.h2
3 files changed, 9 insertions, 7 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 670c701198..bbfce5f1a9 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -562,11 +562,11 @@ Common::Error AGOSEngine::init() {
_driver = MidiDriver::createMidi(dev);
- if (_nativeMT32) {
+ if (_nativeMT32)
_driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
- }
- _midi.mapMT32toGM (getGameType() != GType_SIMON2 && !_nativeMT32);
+ _midi.setNativeMT32(_nativeMT32);
+ _midi.mapMT32toGM(getGameType() != GType_SIMON2 && !_nativeMT32);
_midi.setDriver(_driver);
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index ab5bfc4c94..858307685c 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -77,10 +77,10 @@ int MidiPlayer::open() {
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(20);
+ if (_nativeMT32)
+ _driver->sendMT32Reset();
+ else
+ _driver->sendGMReset();
return 0;
}
diff --git a/engines/agos/midi.h b/engines/agos/midi.h
index d4c09118f6..d76997737a 100644
--- a/engines/agos/midi.h
+++ b/engines/agos/midi.h
@@ -61,6 +61,7 @@ protected:
MidiDriver *_driver;
bool _map_mt32_to_gm;
bool _passThrough;
+ bool _nativeMT32;
MusicInfo _music;
MusicInfo _sfx;
@@ -97,6 +98,7 @@ public:
void loadS1D(Common::File *in, bool sfx = false);
void mapMT32toGM(bool map);
+ void setNativeMT32(bool nativeMT32) { _nativeMT32 = nativeMT32; }
void setLoop(bool loop);
void startTrack(int track);
void queueTrack(int track, bool loop);