Skip to content

Commit

Permalink
remove another lock
Browse files Browse the repository at this point in the history
  • Loading branch information
vberthiaume committed Jul 9, 2024
1 parent 5aa09b4 commit f0f41b7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions source/DSP/ProPhatSynthesiser.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,10 @@ void ProPhatSynthesiser<T>::setEffectParam ([[maybe_unused]] juce::StringRef par
template <std::floating_point T>
void ProPhatSynthesiser<T>::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);
}

0 comments on commit f0f41b7

Please sign in to comment.