|  | @@ -32,6 +32,7 @@ | 
														
													
														
															
																|  |  | # include "extra/FileBrowserDialog.hpp" |  |  | # include "extra/FileBrowserDialog.hpp" | 
														
													
														
															
																|  |  | # include "extra/ScopedPointer.hpp" |  |  | # include "extra/ScopedPointer.hpp" | 
														
													
														
															
																|  |  | # include "extra/Thread.hpp" |  |  | # include "extra/Thread.hpp" | 
														
													
														
															
																|  |  |  |  |  | # include "../../src/extra/SharedResourcePointer.hpp" | 
														
													
														
															
																|  |  | #else |  |  | #else | 
														
													
														
															
																|  |  | # include "extra/Mutex.hpp" |  |  | # include "extra/Mutex.hpp" | 
														
													
														
															
																|  |  | #endif |  |  | #endif | 
														
													
												
													
														
															
																|  | @@ -212,6 +213,13 @@ static void projectLoadedFromDSP(void* ui); | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | static Mutex sPluginInfoLoadMutex; |  |  | static Mutex sPluginInfoLoadMutex; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | #ifndef HEADLESS | 
														
													
														
															
																|  |  |  |  |  | struct JuceInitializer { | 
														
													
														
															
																|  |  |  |  |  | JuceInitializer() { carla_juce_init(); } | 
														
													
														
															
																|  |  |  |  |  | ~JuceInitializer() { carla_juce_cleanup(); } | 
														
													
														
															
																|  |  |  |  |  | }; | 
														
													
														
															
																|  |  |  |  |  | #endif | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  | struct IldaeilModule : Module { |  |  | struct IldaeilModule : Module { | 
														
													
														
															
																|  |  | enum ParamIds { |  |  | enum ParamIds { | 
														
													
														
															
																|  |  | NUM_PARAMS |  |  | NUM_PARAMS | 
														
													
												
													
														
															
																|  | @@ -236,6 +244,10 @@ struct IldaeilModule : Module { | 
														
													
														
															
																|  |  | NUM_LIGHTS |  |  | NUM_LIGHTS | 
														
													
														
															
																|  |  | }; |  |  | }; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | #ifndef HEADLESS | 
														
													
														
															
																|  |  |  |  |  | SharedResourcePointer<JuceInitializer> juceInitializer; | 
														
													
														
															
																|  |  |  |  |  | #endif | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  | CardinalPluginContext* const pcontext; |  |  | CardinalPluginContext* const pcontext; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | const NativePluginDescriptor* fCarlaPluginDescriptor = nullptr; |  |  | const NativePluginDescriptor* fCarlaPluginDescriptor = nullptr; | 
														
													
												
													
														
															
																|  | @@ -936,7 +948,6 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Thread { | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (! idleCallbackActive) |  |  | if (! idleCallbackActive) | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
														
															
																|  |  | carla_juce_init(); |  |  |  | 
														
													
														
															
																|  |  | idleCallbackActive = pcontext->addIdleCallback(this); |  |  | idleCallbackActive = pcontext->addIdleCallback(this); | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
												
													
														
															
																|  | @@ -955,7 +966,6 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Thread { | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
														
															
																|  |  | idleCallbackActive = false; |  |  | idleCallbackActive = false; | 
														
													
														
															
																|  |  | pcontext->removeIdleCallback(this); |  |  | pcontext->removeIdleCallback(this); | 
														
													
														
															
																|  |  | carla_juce_cleanup(); |  |  |  | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (fileBrowserHandle != nullptr) |  |  | if (fileBrowserHandle != nullptr) | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
												
													
														
															
																|  | @@ -1097,15 +1107,19 @@ struct IldaeilWidget : ImGuiWidget, IdleCallback, Thread { | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | const MutexLocker cml(sPluginInfoLoadMutex); |  |  | const MutexLocker cml(sPluginInfoLoadMutex); | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (const uint count = carla_get_cached_plugin_count(fPluginType, path)) |  |  |  | 
														
													
														
															
																|  |  |  |  |  | d_stdout("Will scan plugins now..."); | 
														
													
														
															
																|  |  |  |  |  | const uint count = carla_get_cached_plugin_count(fPluginType, path); | 
														
													
														
															
																|  |  |  |  |  | d_stdout("Scanning found %u plugins", count); | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | if (fDrawingState == kDrawingLoading) | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
														
															
																|  |  | fPlugins = new PluginInfoCache[count]; |  |  |  | 
														
													
														
															
																|  |  |  |  |  | fDrawingState = kDrawingPluginList; | 
														
													
														
															
																|  |  |  |  |  | fPluginSearchFirstShow = true; | 
														
													
														
															
																|  |  |  |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (fDrawingState == kDrawingLoading) |  |  |  | 
														
													
														
															
																|  |  | { |  |  |  | 
														
													
														
															
																|  |  | fDrawingState = kDrawingPluginList; |  |  |  | 
														
													
														
															
																|  |  | fPluginSearchFirstShow = true; |  |  |  | 
														
													
														
															
																|  |  | } |  |  |  | 
														
													
														
															
																|  |  |  |  |  | if (count != 0) | 
														
													
														
															
																|  |  |  |  |  | { | 
														
													
														
															
																|  |  |  |  |  | fPlugins = new PluginInfoCache[count]; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | for (uint i=0, j; i < count && ! shouldThreadExit(); ++i) |  |  | for (uint i=0, j; i < count && ! shouldThreadExit(); ++i) | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
												
													
														
															
																|  | 
 |