Browse Source

Added an assertion to catch VSTs being loaded on a background thread.

tags/2021-05-28
jules 13 years ago
parent
commit
049065dc9c
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp

+ 8
- 0
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -891,6 +891,14 @@ void VSTPluginInstance::initialise()
if (initialised || effect == 0) if (initialised || effect == 0)
return; return;
#if JUCE_WINDOWS
// On Windows it's highly advisable to create your plugins using the message thread,
// because many plugins need a chance to create HWNDs that will get their
// messages delivered by the main message thread, and that's not possible from
// a background thread.
jassert (MessageManager::getInstance()->isThisTheMessageThread());
#endif
log ("Initialising VST: " + module->pluginName); log ("Initialising VST: " + module->pluginName);
initialised = true; initialised = true;


Loading…
Cancel
Save