diff options
author | Max Horn | 2011-03-25 11:14:21 +0100 |
---|---|---|
committer | Max Horn | 2011-03-25 14:15:47 +0100 |
commit | 9ffc4e015138098fa21d234bb195c99a29b17380 (patch) | |
tree | 01663eb25a4c4157b5c21ae1368c9ed30d0bec14 /engines/parallaction/sound_br.cpp | |
parent | 6bf4745a1bdd2116702e8b53107315ed621c6627 (diff) | |
download | scummvm-rg350-9ffc4e015138098fa21d234bb195c99a29b17380.tar.gz scummvm-rg350-9ffc4e015138098fa21d234bb195c99a29b17380.tar.bz2 scummvm-rg350-9ffc4e015138098fa21d234bb195c99a29b17380.zip |
PARALLACTION: Move MidiDriver creation into MidiPlayer(_MSC) constructors
Diffstat (limited to 'engines/parallaction/sound_br.cpp')
-rw-r--r-- | engines/parallaction/sound_br.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp index 1bc085fd34..9f807f5c73 100644 --- a/engines/parallaction/sound_br.cpp +++ b/engines/parallaction/sound_br.cpp @@ -204,7 +204,7 @@ MidiParser *createParser_MSC() { class MidiPlayer_MSC : public Audio::MidiPlayer { public: - MidiPlayer_MSC(MidiDriver *driver); + MidiPlayer_MSC(); ~MidiPlayer_MSC(); void play(Common::SeekableReadStream *stream); @@ -227,9 +227,11 @@ private: -MidiPlayer_MSC::MidiPlayer_MSC(MidiDriver *driver) +MidiPlayer_MSC::MidiPlayer_MSC() : _midiData(0), _paused(false) { - _driver = driver; + + MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM); + _driver = MidiDriver::createMidi(dev); assert(_driver); int ret = _driver->open(); @@ -333,8 +335,8 @@ void MidiPlayer_MSC::timerCallback(void *p) { player->updateTimer(); } -DosSoundMan_br::DosSoundMan_br(Parallaction_br *vm, MidiDriver *driver) : SoundMan_br(vm) { - _midiPlayer = new MidiPlayer_MSC(driver); +DosSoundMan_br::DosSoundMan_br(Parallaction_br *vm) : SoundMan_br(vm) { + _midiPlayer = new MidiPlayer_MSC(); assert(_midiPlayer); } |