[Scummvm-cvs-logs] scummvm master -> bf180101a696b5def2335ad296dc7949969ebd99
m-kiewitz
m_kiewitz at users.sourceforge.net
Tue Jun 30 16:12:24 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
bf180101a6 GROOVIE: add support for TIMB chunk
Commit: bf180101a696b5def2335ad296dc7949969ebd99
https://github.com/scummvm/scummvm/commit/bf180101a696b5def2335ad296dc7949969ebd99
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-30T16:11:26+02:00
Commit Message:
GROOVIE: add support for TIMB chunk
also fix MT32 instrument filename (which was "fatFAT.MT" by accident)
Changed paths:
engines/groovie/music.cpp
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index f72e3e4..c00290b 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -380,18 +380,16 @@ bool MusicPlayerMidi::loadParser(Common::SeekableReadStream *stream, bool loop)
MusicPlayerXMI::MusicPlayerXMI(GroovieEngine *vm, const Common::String >lName) :
MusicPlayerMidi(vm) {
- // Create the parser
- _midiParser = MidiParser::createParser_XMIDI();
// Create the driver
MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
MusicType musicType = MidiDriver::getMusicType(dev);
_driver = NULL;
- // new Miles Audio support, to enable set milesAudioEnabled to true
- // Attention: MT32 timbre file currently not supported, work in progress
+ // new Miles Audio support, to disable set milesAudioEnabled to false
_milesAudioMode = false;
- bool milesAudioEnabled = false;
+ bool milesAudioEnabled = true;
+ MidiParser::XMidiNewTimbreListProc newTimbreListProc = NULL;
if (milesAudioEnabled) {
// 7th Guest uses FAT.AD/FAT.OPL/FAT.MT
@@ -405,13 +403,17 @@ MusicPlayerXMI::MusicPlayerXMI(GroovieEngine *vm, const Common::String >lName)
break;
case MT_GM:
if (ConfMan.getBool("native_mt32")) {
- _driver = Audio::MidiDriver_Miles_MT32_create(gtlName + "FAT.MT");
+ _driver = Audio::MidiDriver_Miles_MT32_create(gtlName + ".MT");
musicType = MT_MT32;
}
break;
default:
break;
}
+
+ if (musicType == MT_MT32) {
+ newTimbreListProc = Audio::MidiDriver_Miles_MT32_processXMIDITimbreChunk;
+ }
}
if (_driver) {
@@ -425,6 +427,9 @@ MusicPlayerXMI::MusicPlayerXMI(GroovieEngine *vm, const Common::String >lName)
assert(_driver);
+ // Create the parser
+ _midiParser = MidiParser::createParser_XMIDI(NULL, NULL, newTimbreListProc, _driver);
+
_driver->open(); // TODO: Handle return value != 0 (indicating an error)
// Set the parser's driver
More information about the Scummvm-git-logs
mailing list