Skip to content

Commit

Permalink
Attempted fix for #234
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Nov 19, 2022
1 parent 8afa344 commit 29aaf69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/processors/chain/ChainIOProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ dsp::AudioBlock<float> ChainIOProcessor::processAudioInput (const AudioBuffer<fl
if (oversampling.updateOSFactor())
{
sampleRateChanged = true;
latencyChangedCallbackFunc ((int) oversampling.getLatencySamples());
mainThreadAction->call ([this]
{
latencyChangedCallbackFunc ((int) oversampling.getLatencySamples());
}, true);
}

const auto useStereo = processChannelInputs (buffer);
Expand Down
2 changes: 2 additions & 0 deletions src/processors/chain/ChainIOProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@ class ChainIOProcessor

bool isPrepared = false;

chowdsp::SharedDeferredAction mainThreadAction;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChainIOProcessor)
};

0 comments on commit 29aaf69

Please sign in to comment.