Fixed envelopes not reseting

This commit is contained in:
Roland Rabien 2023-09-20 22:08:18 -07:00
commit 6898ef0dac
3 changed files with 15 additions and 1 deletions

View file

@ -723,7 +723,16 @@ void WavetableAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer, ju
{ {
juce::ScopedNoDenormals noDenormals; juce::ScopedNoDenormals noDenormals;
if (! dspLock.tryEnter()) if (! dspLock.tryEnter())
{
blockMissed = true;
return; return;
}
if (blockMissed)
{
blockMissed = false;
turnOffAllVoices (false);
}
startBlock(); startBlock();
setMPE (globalParams.mpe->isOn()); setMPE (globalParams.mpe->isOn());

View file

@ -269,6 +269,7 @@ public:
gin::StepLFO modStepLFO; gin::StepLFO modStepLFO;
juce::AudioPlayHead* playhead = nullptr; juce::AudioPlayHead* playhead = nullptr;
bool blockMissed = false;
struct CurTable struct CurTable
{ {

View file

@ -52,13 +52,17 @@ void WavetableVoice::noteStarted()
for (auto& osc : oscillators) for (auto& osc : oscillators)
osc.noteOn(); osc.noteOn();
noise.noteOn(); noise.noteOn();
sub.noteOn(); sub.noteOn();
filterADSR.noteOn(); filterADSR.noteOn();
for (auto& a : modADSRs) for (auto& a : modADSRs)
a.noteOn(); {
a.reset();
a.noteOn();
}
for (auto& l : modLFOs) for (auto& l : modLFOs)
l.noteOn(); l.noteOn();