fix crash daw_vst_bridge khi đóng editor Nexus đang play: reload instance trong close job + silence same-plugin quanh createInstance/createView

This commit is contained in:
2026-08-14 16:52:53 +07:00
parent 0696545ae9
commit af59aaf257
5 changed files with 325 additions and 56 deletions
@@ -41,6 +41,11 @@ public:
// inside processAudioBlock on the same instance).
virtual bool needsReload() const { return false; }
virtual void setReloading(bool /*on*/) {}
// VST3: rebuild the plugin instance (terminate + loadPlugin) on the owning
// apartment thread. The bridge calls it after tearing an editor down so the
// audio loop never processes an instance whose editor was dropped without
// view->removed(). Non-VST engines: no-op.
virtual bool reload() { return true; }
// VST3: split openGUI so instance teardown/reload runs on the owning
// apartment thread while view->attached() may run on a temporary thread
// with the channel worker pumping messages (see bridge main.cpp).