aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorMax Horn2011-03-28 18:06:24 +0200
committerMax Horn2011-03-28 18:06:36 +0200
commit8c931fd1e8c0ced874f4cb5fe77197b39b940528 (patch)
tree798b30acf547ec6a277b5063978d99f34a1df2d0 /engines/saga
parenta33ee051d05ffc5e30e4fc4728714128028e89b1 (diff)
downloadscummvm-rg350-8c931fd1e8c0ced874f4cb5fe77197b39b940528.tar.gz
scummvm-rg350-8c931fd1e8c0ced874f4cb5fe77197b39b940528.tar.bz2
scummvm-rg350-8c931fd1e8c0ced874f4cb5fe77197b39b940528.zip
AUDIO: Add Audio::MidiPlayer::createDriver(), let some engines use it
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/music.cpp8
-rw-r--r--engines/saga/music.h2
2 files changed, 3 insertions, 7 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 90e3529472..eb0a911555 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -45,14 +45,10 @@ namespace Saga {
MusicDriver::MusicDriver() : _isGM(false) {
- MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
- _nativeMT32 = ((MidiDriver::getMusicType(dev) == MT_MT32) || ConfMan.getBool("native_mt32"));
+ MidiPlayer::createDriver();
- _driver = MidiDriver::createMidi(dev);
- assert(_driver);
+ MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
_driverType = MidiDriver::getMusicType(dev);
- if (_nativeMT32)
- _driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
int retValue = _driver->open();
if (retValue == 0) {
diff --git a/engines/saga/music.h b/engines/saga/music.h
index 29b6e8fe76..465d61e366 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -52,7 +52,7 @@ public:
virtual void pause();
virtual void resume();
- bool isAdlib() { return _driverType == MT_ADLIB; }
+ bool isAdlib() const { return _driverType == MT_ADLIB; }
// FIXME
bool isPlaying() const { return _parser && _parser->isPlaying(); }