Skip to content

Commit

Permalink
fixed crash when switching processors while reverb decaying
Browse files Browse the repository at this point in the history
  • Loading branch information
reillypascal committed Jun 6, 2023
1 parent eaa1d28 commit 3895a60
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Source/ConcertHallB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ void LargeConcertHallB::reset()
loopDelayR3.reset();
loopDelayR4.reset();

// prepare allpasses
// reset allpasses
// L
allpassL1.reset();
allpassL2.reset();
Expand All @@ -404,9 +404,9 @@ const juce::String LargeConcertHallB::getName() const { return "LargeConcertHall

//==============================================================================
void LargeConcertHallB::setSize(float newSize) { mSize = newSize * (44.1 / 34.125); }
void LargeConcertHallB::setDecay(float newDecay) { mDecay = pow(newDecay, 0.75) * 1.2; }
void LargeConcertHallB::setDecay(float newDecay) { mDecay = scale(newDecay, 0, 1, 0.25, 1); }
void LargeConcertHallB::setDampingCutoff(float newCutoff) { mDampingCutoff = newCutoff; }
void LargeConcertHallB::setDiffusion(float newDiffusion) { mDiffusion = newDiffusion * 2; }
void LargeConcertHallB::setDiffusion(float newDiffusion) { mDiffusion = newDiffusion * 1.75; }
void LargeConcertHallB::setPreDelay(float newPreDelay) { mPreDelayTime = newPreDelay; }
void LargeConcertHallB::setEarlyLateMix(float newMix) { mEarlyLateMix = newMix; }
void LargeConcertHallB::setDryWetMix(float newMix) { mDryWetMix = newMix; }
17 changes: 9 additions & 8 deletions Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
==============================================================================
TODO:
- Gardner room algorithms
- Set diffusions?
- R channel ringing
- Early reflections are vital!
- Runaway feedback?
- modulation
- split implementation from interface on reverbs
- EQ to wet only!
- louder wet sound on rooms
- EQ to wet only
- Barr allpass ring
- early reflections
- add parallel/series at 0.33/0.67 mark
Expand Down Expand Up @@ -335,6 +329,7 @@ void RSAlgorithmicVerbAudioProcessor::updateGraph()
if (reverbNode->getProcessor()->getName() == "DattorroPlate")
break;

reverbNode->getProcessor()->reset();
mainProcessor->removeNode(reverbNode.get());
}

Expand All @@ -348,6 +343,7 @@ void RSAlgorithmicVerbAudioProcessor::updateGraph()
if (reverbNode->getProcessor()->getName() == "LargeConcertHallB")
break;

reverbNode->getProcessor()->reset();
mainProcessor->removeNode(reverbNode.get());
}

Expand All @@ -361,6 +357,7 @@ void RSAlgorithmicVerbAudioProcessor::updateGraph()
if (reverbNode->getProcessor()->getName() == "GardnerSmallRoom")
break;

reverbNode->getProcessor()->reset();
mainProcessor->removeNode(reverbNode.get());
}

Expand All @@ -374,6 +371,7 @@ void RSAlgorithmicVerbAudioProcessor::updateGraph()
if (reverbNode->getProcessor()->getName() == "GardnerMediumRoom")
break;

reverbNode->getProcessor()->reset();
mainProcessor->removeNode(reverbNode.get());
}

Expand All @@ -387,6 +385,7 @@ void RSAlgorithmicVerbAudioProcessor::updateGraph()
if (reverbNode->getProcessor()->getName() == "GardnerLargeRoom")
break;

reverbNode->getProcessor()->reset();
mainProcessor->removeNode(reverbNode.get());
}

Expand All @@ -400,6 +399,7 @@ void RSAlgorithmicVerbAudioProcessor::updateGraph()
if (reverbNode->getProcessor()->getName() == "Freeverb")
break;

reverbNode->getProcessor()->reset();
mainProcessor->removeNode(reverbNode.get());
}

Expand All @@ -410,6 +410,7 @@ void RSAlgorithmicVerbAudioProcessor::updateGraph()
default:
if (reverbNode != nullptr)
{
reverbNode->getProcessor()->reset();
mainProcessor->removeNode(reverbNode.get());
reverbNode = nullptr;
hasChanged = true;
Expand Down

0 comments on commit 3895a60

Please sign in to comment.