[Scummvm-cvs-logs] CVS: scummvm/backends/midi mt32.cpp,1.6,1.7

Jerome Fisher kingguppy at users.sourceforge.net
Mon Nov 15 04:40:01 CET 2004


Update of /cvsroot/scummvm/scummvm/backends/midi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16589

Modified Files:
	mt32.cpp 
Log Message:
- 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.


Index: mt32.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mt32.cpp	14 Nov 2004 04:13:13 -0000	1.6
+++ mt32.cpp	15 Nov 2004 12:39:08 -0000	1.7
@@ -43,6 +43,7 @@
 
 class MidiDriver_MT32 : public MidiDriver_Emulated {
 private:
+	PlayingSoundHandle _handle;
 	MidiChannel_MT32 _midiChannels[16];
 	uint16 _channelMask;
 	MT32Emu::Synth *_synth;
@@ -192,7 +193,7 @@
 	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 @@
 	_isOpen = false;
 
 	// Detach the premix callback handler
-	_mixer->setupPremix(0);
+	_mixer->stopHandle(_handle);
 
 	_synth->close();
 	delete _synth;





More information about the Scummvm-git-logs mailing list