diff options
-rw-r--r-- | audio/softsynth/mt32/Part.cpp | 16 | ||||
-rw-r--r-- | audio/softsynth/mt32/Part.h | 5 | ||||
-rw-r--r-- | audio/softsynth/mt32/TVA.cpp | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp index 852319be70..0c9e576100 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 5c59c6d61f..7ae73a818c 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 7aadd64522..19a01cfc73 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) { |