[Scummvm-cvs-logs] SF.net SVN: scummvm:[54460] scummvm/trunk
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Nov 24 16:12:45 CET 2010
Revision: 54460
http://scummvm.svn.sourceforge.net/scummvm/?rev=54460&view=rev
Author: thebluegr
Date: 2010-11-24 15:12:43 +0000 (Wed, 24 Nov 2010)
Log Message:
-----------
SCI/SOUND: Applied patch #3117577 - "SCI: MT-32 plays "warble" of notes when music resumes", with some slight modifications
This is only used by SCI for now, but it is probably correct to apply this for
all engines, thus an appropriate TODO has been added
Modified Paths:
--------------
scummvm/trunk/engines/sci/sound/music.cpp
scummvm/trunk/sound/midiparser.cpp
scummvm/trunk/sound/midiparser.h
Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp 2010-11-24 14:51:29 UTC (rev 54459)
+++ scummvm/trunk/engines/sci/sound/music.cpp 2010-11-24 15:12:43 UTC (rev 54460)
@@ -416,7 +416,7 @@
uint16 prevLoop = pSnd->loop;
pSnd->loop = 0;
// Fast forward to the last position and perform associated events when loading
- pSnd->pMidiParser->jumpToTick(pSnd->ticker, true);
+ pSnd->pMidiParser->jumpToTick(pSnd->ticker, true, true, true);
// Restore looping
pSnd->loop = prevLoop;
}
Modified: scummvm/trunk/sound/midiparser.cpp
===================================================================
--- scummvm/trunk/sound/midiparser.cpp 2010-11-24 14:51:29 UTC (rev 54459)
+++ scummvm/trunk/sound/midiparser.cpp 2010-11-24 15:12:43 UTC (rev 54460)
@@ -361,7 +361,7 @@
}
}
-bool MidiParser::jumpToTick(uint32 tick, bool fireEvents, bool stopNotes) {
+bool MidiParser::jumpToTick(uint32 tick, bool fireEvents, bool stopNotes, bool dontSendNoteOn) {
if (_active_track >= _num_tracks)
return false;
@@ -402,8 +402,17 @@
_driver->sysEx(info.ext.data, (uint16)info.length-1);
else
_driver->sysEx(info.ext.data, (uint16)info.length);
- } else
- sendToDriver(info.event, info.basic.param1, info.basic.param2);
+ } else {
+ if (info.command() == 0x9 && dontSendNoteOn) {
+ // Don't send note on; doing so creates a "warble" with some instruments on the MT-32.
+ // Refer to patch #3117577
+
+ // TODO: this is currently done by SCI only, but it seems sensible enough to do this
+ // for all engines
+ } else {
+ sendToDriver(info.event, info.basic.param1, info.basic.param2);
+ }
+ }
}
parseNextEvent(_next_event);
Modified: scummvm/trunk/sound/midiparser.h
===================================================================
--- scummvm/trunk/sound/midiparser.h 2010-11-24 14:51:29 UTC (rev 54459)
+++ scummvm/trunk/sound/midiparser.h 2010-11-24 15:12:43 UTC (rev 54460)
@@ -383,7 +383,7 @@
void stopPlaying();
bool setTrack(int track);
- bool jumpToTick(uint32 tick, bool fireEvents = false, bool stopNotes = true);
+ bool jumpToTick(uint32 tick, bool fireEvents = false, bool stopNotes = true, bool dontSendNoteOn = false);
uint32 getPPQN() { return _ppqn; }
virtual uint32 getTick() { return _position._play_tick; }
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