aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/softsynth/mt32/Part.cpp6
-rw-r--r--audio/softsynth/mt32/Partial.cpp1
-rw-r--r--audio/softsynth/mt32/Synth.cpp17
-rw-r--r--audio/softsynth/mt32/Synth.h8
-rw-r--r--audio/softsynth/mt32/TVA.cpp6
5 files changed, 6 insertions, 32 deletions
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp
index 62ba346c35..88404316eb 100644
--- a/audio/softsynth/mt32/Part.cpp
+++ b/audio/softsynth/mt32/Part.cpp
@@ -175,6 +175,7 @@ void Part::refresh() {
patchCache[t].reverb = patchTemp->patch.reverbSwitch > 0;
}
memcpy(currentInstr, timbreTemp->common.name, 10);
+ synth->newTimbreSet(partNum, patchTemp->patch.timbreGroup, currentInstr);
updatePitchBenderRange();
}
@@ -207,7 +208,6 @@ void RhythmPart::setTimbre(TimbreParam * /*timbre*/) {
void Part::setTimbre(TimbreParam *timbre) {
*timbreTemp = *timbre;
- synth->newTimbreSet(partNum, timbre->common.name);
}
unsigned int RhythmPart::getAbsTimbreNum() const {
@@ -533,7 +533,6 @@ void Part::playPoly(const PatchCache cache[4], const MemParams::RhythmTemp *rhyt
#if MT32EMU_MONITOR_PARTIALS > 1
synth->printPartialUsage();
#endif
- synth->partStateChanged(partNum, true);
synth->polyStateChanged(partNum);
}
@@ -614,9 +613,6 @@ void Part::partialDeactivated(Poly *poly) {
freePolys.prepend(poly);
synth->polyStateChanged(partNum);
}
- if (activePartialCount == 0) {
- synth->partStateChanged(partNum, false);
- }
}
//#define POLY_LIST_DEBUG
diff --git a/audio/softsynth/mt32/Partial.cpp b/audio/softsynth/mt32/Partial.cpp
index a0aec90ec4..b80a028515 100644
--- a/audio/softsynth/mt32/Partial.cpp
+++ b/audio/softsynth/mt32/Partial.cpp
@@ -87,7 +87,6 @@ void Partial::deactivate() {
if (poly != NULL) {
poly->partialDeactivated(this);
}
- synth->partialStateChanged(this, tva->getPhase(), TVA_PHASE_DEAD);
#if MT32EMU_MONITOR_PARTIALS > 2
synth->printDebug("[+%lu] [Partial %d] Deactivated", sampleNum, debugPartialNum);
synth->printPartialUsage(sampleNum);
diff --git a/audio/softsynth/mt32/Synth.cpp b/audio/softsynth/mt32/Synth.cpp
index b7af992b99..1e1be06bc9 100644
--- a/audio/softsynth/mt32/Synth.cpp
+++ b/audio/softsynth/mt32/Synth.cpp
@@ -201,25 +201,12 @@ void ReportHandler::printDebug(const char *fmt, va_list list) {
printf("\n");
}
-void Synth::partStateChanged(int partNum, bool isPartActive) {
- reportHandler->onPartStateChanged(partNum, isPartActive);
-}
-
void Synth::polyStateChanged(int partNum) {
reportHandler->onPolyStateChanged(partNum);
}
-void Synth::partialStateChanged(const Partial * const partial, int oldPartialPhase, int newPartialPhase) {
- for (int i = 0; i < MT32EMU_MAX_PARTIALS; i++) {
- if (getPartial(i) == partial) {
- reportHandler->onPartialStateChanged(i, oldPartialPhase, newPartialPhase);
- break;
- }
- }
-}
-
-void Synth::newTimbreSet(int partNum, char patchName[]) {
- reportHandler->onProgramChanged(partNum, patchName);
+void Synth::newTimbreSet(int partNum, Bit8u timbreGroup, const char patchName[]) {
+ reportHandler->onProgramChanged(partNum, timbreGroup, patchName);
}
void Synth::printDebug(const char *fmt, ...) {
diff --git a/audio/softsynth/mt32/Synth.h b/audio/softsynth/mt32/Synth.h
index 56e88e6156..b85e7ae507 100644
--- a/audio/softsynth/mt32/Synth.h
+++ b/audio/softsynth/mt32/Synth.h
@@ -249,10 +249,10 @@ protected:
virtual void onNewReverbMode(Bit8u /* mode */) {}
virtual void onNewReverbTime(Bit8u /* time */) {}
virtual void onNewReverbLevel(Bit8u /* level */) {}
- virtual void onPartStateChanged(int /* partNum */, bool /* isActive */) {}
+ virtual void onPartStateChanged(int /* partNum */, bool /* hasActiveNonReleasingPolys */) {}
virtual void onPolyStateChanged(int /* partNum */) {}
virtual void onPartialStateChanged(int /* partialNum */, int /* oldPartialPhase */, int /* newPartialPhase */) {}
- virtual void onProgramChanged(int /* partNum */, char * /* patchName */) {}
+ virtual void onProgramChanged(int /* partNum */, int /* bankNum */, const char * /* patchName */) {}
};
class Synth {
@@ -370,10 +370,8 @@ private:
void printPartialUsage(unsigned long sampleOffset = 0);
- void partStateChanged(int partNum, bool isPartActive);
void polyStateChanged(int partNum);
- void partialStateChanged(const Partial * const partial, int oldPartialPhase, int newPartialPhase);
- void newTimbreSet(int partNum, char patchName[]);
+ void newTimbreSet(int partNum, Bit8u timbreGroup, const char patchName[]);
void printDebug(const char *fmt, ...);
public:
diff --git a/audio/softsynth/mt32/TVA.cpp b/audio/softsynth/mt32/TVA.cpp
index 65e5256048..5438471fa4 100644
--- a/audio/softsynth/mt32/TVA.cpp
+++ b/audio/softsynth/mt32/TVA.cpp
@@ -34,9 +34,6 @@ TVA::TVA(const Partial *usePartial, LA32Ramp *useAmpRamp) :
}
void TVA::startRamp(Bit8u newTarget, Bit8u newIncrement, int newPhase) {
- if (newPhase != phase) {
- partial->getSynth()->partialStateChanged(partial, phase, newPhase);
- }
target = newTarget;
phase = newPhase;
ampRamp->startRamp(newTarget, newIncrement);
@@ -46,9 +43,6 @@ void TVA::startRamp(Bit8u newTarget, Bit8u newIncrement, int newPhase) {
}
void TVA::end(int newPhase) {
- if (newPhase != phase) {
- partial->getSynth()->partialStateChanged(partial, phase, newPhase);
- }
phase = newPhase;
playing = false;
#if MT32EMU_MONITOR_TVA >= 1