1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

AudioProcessorGraph: Immediately rebuild the graph if topology changes on the message thread

This commit is contained in:
reuk 2020-02-10 14:36:28 +00:00 committed by Tom Poole
parent f9532f609e
commit 68b02efea1

View file

@ -27,6 +27,14 @@
namespace juce
{
static void updateOnMessageThread (AsyncUpdater& updater)
{
if (MessageManager::getInstance()->isThisTheMessageThread())
updater.handleAsyncUpdate();
else
updater.triggerAsyncUpdate();
}
template <typename FloatType>
struct GraphRenderSequence
{
@ -901,7 +909,7 @@ void AudioProcessorGraph::topologyChanged()
sendChangeMessage();
if (isPrepared)
triggerAsyncUpdate();
updateOnMessageThread (*this);
}
void AudioProcessorGraph::clear()
@ -1262,10 +1270,7 @@ void AudioProcessorGraph::prepareToPlay (double sampleRate, int estimatedSamples
clearRenderingSequence();
if (MessageManager::getInstance()->isThisTheMessageThread())
handleAsyncUpdate();
else
triggerAsyncUpdate();
updateOnMessageThread (*this);
}
bool AudioProcessorGraph::supportsDoublePrecisionProcessing() const