Fix: Move plugin scan to background thread, scan on button click not on editor open
Browse files
Source/PluginBridgeEditor.h
CHANGED
|
@@ -16,7 +16,7 @@ public:
|
|
| 16 |
|
| 17 |
private:
|
| 18 |
void timerCallback() override;
|
| 19 |
-
void
|
| 20 |
void showPluginMenu();
|
| 21 |
void loadPluginByIndex(int index);
|
| 22 |
|
|
@@ -28,12 +28,12 @@ private:
|
|
| 28 |
juce::Label portLabel;
|
| 29 |
juce::Label pluginLabel;
|
| 30 |
juce::TextButton pluginButton{"Select Plugin..."};
|
| 31 |
-
juce::TextEditor searchBox;
|
| 32 |
|
| 33 |
-
// Scanned plugins
|
| 34 |
juce::KnownPluginList knownPlugins;
|
| 35 |
juce::AudioPluginFormatManager scanFormatManager;
|
| 36 |
-
bool
|
|
|
|
| 37 |
|
| 38 |
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeEditor)
|
| 39 |
};
|
|
|
|
| 16 |
|
| 17 |
private:
|
| 18 |
void timerCallback() override;
|
| 19 |
+
void scanAndShowMenu();
|
| 20 |
void showPluginMenu();
|
| 21 |
void loadPluginByIndex(int index);
|
| 22 |
|
|
|
|
| 28 |
juce::Label portLabel;
|
| 29 |
juce::Label pluginLabel;
|
| 30 |
juce::TextButton pluginButton{"Select Plugin..."};
|
|
|
|
| 31 |
|
| 32 |
+
// Scanned plugins (persists across editor open/close via static)
|
| 33 |
juce::KnownPluginList knownPlugins;
|
| 34 |
juce::AudioPluginFormatManager scanFormatManager;
|
| 35 |
+
bool scanComplete = false;
|
| 36 |
+
bool scanning = false;
|
| 37 |
|
| 38 |
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginBridgeEditor)
|
| 39 |
};
|