From f08482d0ce88424f6bb4b4844aa6888f699ef705 Mon Sep 17 00:00:00 2001 From: Jerome Fisher Date: Mon, 15 Nov 2004 12:39:08 +0000 Subject: - 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 --- backends/midi/mt32.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backends') 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; -- cgit v1.2.3