[Scummvm-cvs-logs] SF.net SVN: scummvm:[46966] scummvm/trunk/engines/sci/sfx/music.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Jan 4 09:28:10 CET 2010


Revision: 46966
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46966&view=rev
Author:   thebluegr
Date:     2010-01-04 08:28:09 +0000 (Mon, 04 Jan 2010)

Log Message:
-----------
SCI/new music code: Now the the music driver to use is  obtained directly from the sound options, instead of asking for a driver which supports the requested MIDI driver flags

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sfx/music.cpp

Modified: scummvm/trunk/engines/sci/sfx/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.cpp	2010-01-04 08:10:29 UTC (rev 46965)
+++ scummvm/trunk/engines/sci/sfx/music.cpp	2010-01-04 08:28:09 UTC (rev 46966)
@@ -64,14 +64,9 @@
 	// SCI sound init
 	_dwTempo = 0;
 
-	_midiType = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PCSPK);
+	const MidiDriverDescription *md = MidiDriver::findMusicDriver(ConfMan.get("music_driver"));
+	_midiType = md ? md->id : MD_AUTO;
 
-	// Sanity check
-	if (_midiType != MD_ADLIB && _midiType != MD_PCJR && _midiType != MD_PCSPK) {
-		warning("Unhandled MIDI type, switching to Adlib");
-		_midiType = MD_ADLIB;
-	}
-
 	switch (_midiType) {
 	case MD_ADLIB:
 		// FIXME: There's no Amiga sound option, so we hook it up to Adlib
@@ -86,7 +81,12 @@
 	case MD_PCSPK:
 		_pMidiDrv = new MidiPlayer_PCSpeaker();
 		break;
+	case MD_MT32:
+		// TODO
 	default:
+		warning("Unhandled MIDI type, switching to Adlib");
+		_midiType = MD_ADLIB;
+		_pMidiDrv = MidiPlayer_Adlib_create();
 		break;
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list