From 903b368a603e4bb6d0c7e7a9ecf30ade8ddcecb4 Mon Sep 17 00:00:00 2001 From: Christian Haase Date: Thu, 22 Oct 2026 16:12:25 +0200 Subject: [PATCH] Call prepare and release on main thread for VST3 ExtremeTests were calling prepareToPlay and releaseResources directly on the VST3 instances, which is not allowed by the VST3 spec. Use the call[...]OnMessageThreadIfVST3 helpers like the rest of the tests do. --- source/tests/ExtremeTests.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/tests/ExtremeTests.cpp b/source/tests/ExtremeTests.cpp index 51305802..28f1e933 100644 --- a/source/tests/ExtremeTests.cpp +++ b/source/tests/ExtremeTests.cpp @@ -32,7 +32,7 @@ struct AllocationsInRealTimeThreadTest : public PluginTest const std::vector& blockSizes = ut.getOptions().blockSizes; jassert (sampleRates.size() > 0 && blockSizes.size() > 0); - instance.prepareToPlay (sampleRates[0], blockSizes[0]); + callPrepareToPlayOnMessageThreadIfVST3 (instance, sampleRates[0], blockSizes[0]); const int numBlocks = 10; auto r = ut.getRandom(); @@ -44,8 +44,8 @@ struct AllocationsInRealTimeThreadTest : public PluginTest ut.logMessage (juce::String ("Testing with sample rate [SR] and block size [BS]") .replace ("SR",juce::String (sr, 0), false) .replace ("BS",juce::String (bs), false)); - instance.releaseResources(); - instance.prepareToPlay (sr, bs); + callReleaseResourcesOnMessageThreadIfVST3 (instance); + callPrepareToPlayOnMessageThreadIfVST3 (instance, sr, bs); const int numChannelsRequired = juce::jmax (instance.getTotalNumInputChannels(), instance.getTotalNumOutputChannels()); juce::AudioBuffer ab (numChannelsRequired, bs); @@ -126,8 +126,8 @@ struct LargerThanPreparedBlockSizeTest : public PluginTest .replace ("SR",juce::String (sr, 0), false) .replace ("BSP",juce::String (processingBlockSize), false) .replace ("BS",juce::String (preparedBlockSize), false)); - instance.releaseResources(); - instance.prepareToPlay (sr, preparedBlockSize); + callReleaseResourcesOnMessageThreadIfVST3 (instance); + callPrepareToPlayOnMessageThreadIfVST3 (instance, sr, preparedBlockSize); const int numChannelsRequired = juce::jmax (instance.getTotalNumInputChannels(), instance.getTotalNumOutputChannels()); juce::AudioBuffer ab (numChannelsRequired, processingBlockSize);