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:
parent
f9532f609e
commit
68b02efea1
1 changed files with 10 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue