Browse Source

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

tags/2021-05-28
reuk Tom Poole 6 years ago
parent
commit
68b02efea1
1 changed files with 10 additions and 5 deletions
  1. +10
    -5
      modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp

+ 10
- 5
modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp 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


Loading…
Cancel
Save