fix(bridge): one editor at a time + guard reload race
- Close other channels' editor windows before attaching a new one (Option B) - needsReload()/setReloading() guard: skip processAudioBlock during terminate+reload teardown to avoid UAF/hang when reopening GUI - Wait for editor registry cleanup (5s timeout) before creating window
This commit is contained in:
@@ -26,6 +26,8 @@ public:
|
||||
void pitchBend(uint32_t channel, uint32_t bend14) override;
|
||||
bool openGUI(void* parentWindowHandle) override;
|
||||
void closeGUI() override;
|
||||
bool needsReload() const override { return hasAttachedOnce_ && !guiAttached_; }
|
||||
void setReloading(bool on) override { reloading_ = on; }
|
||||
void processAudioBlock(float* outputL, float* outputR, uint32_t numSamples) override;
|
||||
|
||||
private:
|
||||
@@ -37,6 +39,7 @@ private:
|
||||
bool loaded_;
|
||||
bool guiAttached_;
|
||||
bool hasAttachedOnce_;
|
||||
bool reloading_; // guarded by InstrumentEngineManager::mu_ (set via setReloading)
|
||||
bool reload();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user