diff options
Diffstat (limited to 'engines/saga/music.cpp')
-rw-r--r-- | engines/saga/music.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index e4a16e27da..199b0dfd8a 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -49,6 +49,7 @@ MusicDriver::MusicDriver() : _isGM(false) { MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM); _driver = MidiDriver::createMidi(dev); + _driverType = MidiDriver::getMusicType(dev); if (isMT32()) _driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); @@ -60,6 +61,19 @@ MusicDriver::~MusicDriver() { delete _driver; } +int MusicDriver::open() { + int retValue = _driver->open(); + if (retValue) + return retValue; + + if (_nativeMT32) + _driver->sendMT32Reset(); + else + _driver->sendGMReset(); + + return 0; +} + void MusicDriver::setVolume(int volume) { volume = CLIP(volume, 0, 255); |