[Scummvm-cvs-logs] CVS: scummvm/backends/midi mt32.cpp,1.1,1.2
Eugene Sandulenko
sev at users.sourceforge.net
Fri Nov 5 18:39:55 CET 2004
Update of /cvsroot/scummvm/scummvm/backends/midi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3572/backends/midi
Modified Files:
mt32.cpp
Log Message:
Improve reporting (OSD messages, file open errors) and fix typos.
Forgot to mention:
o waveforms.raw is autogenerated if not present
Index: mt32.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mt32.cpp 6 Nov 2004 01:41:29 -0000 1.1
+++ mt32.cpp 6 Nov 2004 02:20:43 -0000 1.2
@@ -118,7 +118,30 @@
//
////////////////////////////////////////
-void report(int type, ...) {}
+static void report(void *userData, MT32Emu::ReportType type, void *reportData) {
+ switch(type) {
+ case MT32Emu::ReportType_lcdMessage:
+ g_system->displayMessageOnOSD((char *)reportData);
+ break;
+ case MT32Emu::ReportType_errorPreset1:
+ error("Couldn't open Preset1.syx file");
+ break;
+ case MT32Emu::ReportType_errorPreset2:
+ error("Couldn't open Preset2.syx file");
+ break;
+ case MT32Emu::ReportType_errorDrumpat:
+ error("Couldn't open drumpat.rom file");
+ break;
+ case MT32Emu::ReportType_errorPatchlog:
+ error("Couldn't open patchlog.cfg file");
+ break;
+ case MT32Emu::ReportType_errorMT32ROM:
+ error("Couldn't open MT32_PCM.ROM file");
+ break;
+ default:
+ break;
+ }
+}
MidiDriver_MT32::MidiDriver_MT32(SoundMixer *mixer) : MidiDriver_Emulated(mixer) {
_channel_mask = 0xFFFF; // Permit all 16 channels by default
@@ -159,6 +182,7 @@
prop.RevLevel = 3;
prop.userData = (void *)1;
prop.printDebug = &vdebug;
+ prop.report = &report;
prop.openFile = MT32_OpenFile;
_synth = new MT32Emu::Synth();
if (!_synth->open(prop))
More information about the Scummvm-git-logs
mailing list