Skip to content

Commit 155c933

Browse files
committed
Fix deadlock
1 parent e4f7246 commit 155c933

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

plugin/Source/PluginProcessor.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -942,14 +942,15 @@ bool WavetableAudioProcessor::isBusesLayoutSupported (const BusesLayout& layout)
942942
void WavetableAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer, juce::MidiBuffer& midi)
943943
{
944944
juce::ScopedNoDenormals noDenormals;
945+
946+
if (buffer.getNumChannels() != 2)
947+
return;
948+
945949
if (! dspLock.tryEnter())
946950
{
947951
blockMissed = true;
948952
return;
949953
}
950-
951-
if (buffer.getNumChannels() != 2)
952-
return;
953954

954955
if (midiLearn)
955956
midiLearn->processBlock (midi, buffer.getNumSamples());

0 commit comments

Comments
 (0)