From f0f41b700fd1ca7296f6d6037cd0ee902c1b4d80 Mon Sep 17 00:00:00 2001 From: Vincent Berthiaume Date: Tue, 9 Jul 2024 15:16:18 -0400 Subject: [PATCH] remove another lock --- source/DSP/ProPhatSynthesiser.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source/DSP/ProPhatSynthesiser.h b/source/DSP/ProPhatSynthesiser.h index 6c82179c..dc65a21a 100644 --- a/source/DSP/ProPhatSynthesiser.h +++ b/source/DSP/ProPhatSynthesiser.h @@ -169,15 +169,10 @@ void ProPhatSynthesiser::setEffectParam ([[maybe_unused]] juce::StringRef par template void ProPhatSynthesiser::noteOn (const int midiChannel, const int midiNoteNumber, const float velocity) { - { - //TODO lock in the audio thread?? - const juce::ScopedLock sl (lock); - - //don't start new voices in current buffer call if we have filled all voices already. - //voicesBeingKilled should be reset after each renderNextBlock call - if (voicesBeingKilled.size () >= Constants::numVoices) - return; - } + //don't start new voices in current buffer call if we have filled all voices already. + //voicesBeingKilled should be reset after each renderNextBlock call + if (voicesBeingKilled.size() >= Constants::numVoices) + return; Synthesiser::noteOn (midiChannel, midiNoteNumber, velocity); }