[Scummvm-cvs-logs] scummvm master -> a81ff520885533e465e6dd6ecf044b6eec1c4068

bluegr bluegr at gmail.com
Sat Jan 19 14:54:46 CET 2013


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:
a81ff52088 MT32: Sync with the latest changes in munt


Commit: a81ff520885533e465e6dd6ecf044b6eec1c4068
    https://github.com/scummvm/scummvm/commit/a81ff520885533e465e6dd6ecf044b6eec1c4068
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-19T05:53:54-08:00

Commit Message:
MT32: Sync with the latest changes in munt

This syncs our code with munt commits 535bf96, 934c116, 1643d07 and 2eac585

Changed paths:
    audio/softsynth/mt32/Part.cpp
    audio/softsynth/mt32/Part.h
    audio/softsynth/mt32/TVA.cpp



diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp
index 852319b..0c9e576 100644
--- a/audio/softsynth/mt32/Part.cpp
+++ b/audio/softsynth/mt32/Part.cpp
@@ -246,7 +246,7 @@ void Part::backupCacheToPartials(PatchCache cache[4]) {
 	// if so then duplicate the cached data from the part to the partial so that
 	// we can change the part's cache without affecting the partial.
 	// We delay this until now to avoid a copy operation with every note played
-	for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
+	for (PolyList::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
 		(*polyIt)->backupCacheToPartials(cache);
 	}
 }
@@ -446,7 +446,7 @@ void Part::abortPoly(Poly *poly) {
 }
 
 bool Part::abortFirstPoly(unsigned int key) {
-	for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
+	for (PolyList::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
 		Poly *poly = *polyIt;
 		if (poly->getKey() == key) {
 			abortPoly(poly);
@@ -457,7 +457,7 @@ bool Part::abortFirstPoly(unsigned int key) {
 }
 
 bool Part::abortFirstPoly(PolyState polyState) {
-	for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
+	for (PolyList::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
 		Poly *poly = *polyIt;
 		if (poly->getState() == polyState) {
 			abortPoly(poly);
@@ -545,7 +545,7 @@ void Part::playPoly(const PatchCache cache[4], const MemParams::RhythmTemp *rhyt
 void Part::allNotesOff() {
 	// The MIDI specification states - and Mok confirms - that all notes off (0x7B)
 	// should treat the hold pedal as usual.
-	for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
+	for (PolyList::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
 		Poly *poly = *polyIt;
 		// FIXME: This has special handling of key 0 in NoteOff that Mok has not yet confirmed applies to AllNotesOff.
 		// if (poly->canSustain() || poly->getKey() == 0) {
@@ -560,14 +560,14 @@ void Part::allSoundOff() {
 	// MIDI "All sound off" (0x78) should release notes immediately regardless of the hold pedal.
 	// This controller is not actually implemented by the synths, though (according to the docs and Mok) -
 	// we're only using this method internally.
-	for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
+	for (PolyList::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
 		Poly *poly = *polyIt;
 		poly->startDecay();
 	}
 }
 
 void Part::stopPedalHold() {
-	for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
+	for (PolyList::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
 		Poly *poly = *polyIt;
 		poly->stopPedalHold();
 	}
@@ -586,7 +586,7 @@ void Part::stopNote(unsigned int key) {
 	synth->printDebug("%s (%s): stopping key %d", name, currentInstr, key);
 #endif
 
-	for (Common::List<Poly *>::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
+	for (PolyList::iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
 		Poly *poly = *polyIt;
 		// Generally, non-sustaining instruments ignore note off. They die away eventually anyway.
 		// Key 0 (only used by special cases on rhythm part) reacts to note off even if non-sustaining or pedal held.
@@ -608,7 +608,7 @@ unsigned int Part::getActivePartialCount() const {
 
 unsigned int Part::getActiveNonReleasingPartialCount() const {
 	unsigned int activeNonReleasingPartialCount = 0;
-	for (Common::List<Poly *>::const_iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
+	for (PolyList::const_iterator polyIt = activePolys.begin(); polyIt != activePolys.end(); polyIt++) {
 		Poly *poly = *polyIt;
 		if (poly->getState() != POLY_Releasing) {
 			activeNonReleasingPartialCount += poly->getActivePartialCount();
diff --git a/audio/softsynth/mt32/Part.h b/audio/softsynth/mt32/Part.h
index 5c59c6d..7ae73a8 100644
--- a/audio/softsynth/mt32/Part.h
+++ b/audio/softsynth/mt32/Part.h
@@ -24,6 +24,7 @@ namespace MT32Emu {
 
 class PartialManager;
 class Synth;
+typedef Common::List<Poly *> PolyList;
 
 class Part {
 private:
@@ -37,8 +38,8 @@ private:
 
 	unsigned int activePartialCount;
 	PatchCache patchCache[4];
-	Common::List<Poly *> freePolys;
-	Common::List<Poly *> activePolys;
+	PolyList freePolys;
+	PolyList activePolys;
 
 	void setPatch(const PatchParam *patch);
 	unsigned int midiKeyToKey(unsigned int midiKey);
diff --git a/audio/softsynth/mt32/TVA.cpp b/audio/softsynth/mt32/TVA.cpp
index 7aadd64..19a01cf 100644
--- a/audio/softsynth/mt32/TVA.cpp
+++ b/audio/softsynth/mt32/TVA.cpp
@@ -280,7 +280,7 @@ void TVA::nextPhase() {
 	}
 
 	int newTarget;
-	int newIncrement = 0;
+	int newIncrement = 0; // Initialised to please compilers
 	int envPointIndex = phase;
 
 	if (!allLevelsZeroFromNowOn) {






More information about the Scummvm-git-logs mailing list