[Scummvm-cvs-logs] SF.net SVN: scummvm:[47194] scummvm/trunk/engines/sci/sound
waltervn at users.sourceforge.net
waltervn at users.sourceforge.net
Sat Jan 9 04:08:51 CET 2010
Revision: 47194
http://scummvm.svn.sourceforge.net/scummvm/?rev=47194&view=rev
Author: waltervn
Date: 2010-01-09 03:08:51 +0000 (Sat, 09 Jan 2010)
Log Message:
-----------
SCI: Cleanup
Modified Paths:
--------------
scummvm/trunk/engines/sci/sound/music.cpp
scummvm/trunk/engines/sci/sound/music.h
Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp 2010-01-09 02:17:17 UTC (rev 47193)
+++ scummvm/trunk/engines/sci/sound/music.cpp 2010-01-09 03:08:51 UTC (rev 47194)
@@ -63,24 +63,10 @@
// SCI sound init
_dwTempo = 0;
- const MidiDriverDescription *md = MidiDriver::findMusicDriver(ConfMan.get("music_driver"));
- _midiType = md ? md->id : MD_AUTO;
+ MidiDriverType midiType = MidiDriver::detectMusicDriver(MDT_PCSPK | MDT_ADLIB);
- if (_midiType == MD_AUTO)
- _midiType = MD_ADLIB;
-
- switch (_midiType) {
+ switch (midiType) {
case MD_ADLIB:
- case MD_PCJR:
- case MD_PCSPK:
- break;
- default:
- warning("Unhandled MIDI type, switching to default");
- _midiType = MD_ADLIB;
- }
-
- switch (_midiType) {
- case MD_ADLIB:
// FIXME: There's no Amiga sound option, so we hook it up to Adlib
if (((SciEngine *)g_engine)->getPlatform() == Common::kPlatformAmiga)
_pMidiDrv = MidiPlayer_Amiga_create();
@@ -96,7 +82,7 @@
//case MD_MT32:
// TODO
default:
- error("Unsupported _midiType setup %d", _midiType);
+ error("Unsupported _midiType setup %d", midiType);
}
if (_pMidiDrv) {
Modified: scummvm/trunk/engines/sci/sound/music.h
===================================================================
--- scummvm/trunk/engines/sci/sound/music.h 2010-01-09 02:17:17 UTC (rev 47193)
+++ scummvm/trunk/engines/sci/sound/music.h 2010-01-09 03:08:51 UTC (rev 47194)
@@ -214,7 +214,6 @@
Audio::Mixer *_pMixer;
MidiPlayer *_pMidiDrv;
- MidiDriverType _midiType;
uint32 _dwTempo;
// Mixed Adlib/MIDI mode: when enabled from the ScummVM sound options screen,
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