aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Fisher2004-11-15 12:39:08 +0000
committerJerome Fisher2004-11-15 12:39:08 +0000
commitf08482d0ce88424f6bb4b4844aa6888f699ef705 (patch)
treeb2878735ae2a8a588e525567c574de8108c07b6a
parent6b68feb3606fe66e69ce8aacfbe2a44937ac9820 (diff)
downloadscummvm-rg350-f08482d0ce88424f6bb4b4844aa6888f699ef705.tar.gz
scummvm-rg350-f08482d0ce88424f6bb4b4844aa6888f699ef705.tar.bz2
scummvm-rg350-f08482d0ce88424f6bb4b4844aa6888f699ef705.zip
- Now uses playInputStream to add a channel to the mixer, instead of setting the premixer. There can be only one, and this conflicted with Adlib in multi_midi mode.
svn-id: r15821
-rw-r--r--backends/midi/mt32.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/midi/mt32.cpp b/backends/midi/mt32.cpp
index d9dbf3c9ee..a202ed7bec 100644
--- a/backends/midi/mt32.cpp
+++ b/backends/midi/mt32.cpp
@@ -43,6 +43,7 @@ class MidiChannel_MT32 : public MidiChannel_MPU401 {
class MidiDriver_MT32 : public MidiDriver_Emulated {
private:
+ PlayingSoundHandle _handle;
MidiChannel_MT32 _midiChannels[16];
uint16 _channelMask;
MT32Emu::Synth *_synth;
@@ -192,7 +193,7 @@ int MidiDriver_MT32::open() {
if (!_synth->open(prop))
return MERR_DEVICE_NOT_AVAILABLE;
- _mixer->setupPremix(this);
+ _mixer->playInputStream(&_handle, this, false, 255, 0, -1, false);
return 0;
}
@@ -232,7 +233,7 @@ void MidiDriver_MT32::close() {
_isOpen = false;
// Detach the premix callback handler
- _mixer->setupPremix(0);
+ _mixer->stopHandle(_handle);
_synth->close();
delete _synth;