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:
@@ -195,6 +195,12 @@ INativeInstrument* InstrumentEngineManager::get(uint32_t channel) {
|
||||
return it == channels_.end() ? nullptr : it->second.get();
|
||||
}
|
||||
|
||||
void InstrumentEngineManager::setReloading(uint32_t channel, bool on) {
|
||||
std::lock_guard<std::mutex> lock(mu_);
|
||||
auto it = channels_.find(channel);
|
||||
if (it != channels_.end()) it->second->setReloading(on);
|
||||
}
|
||||
|
||||
void InstrumentEngineManager::allNotesOff() {
|
||||
std::lock_guard<std::mutex> lock(mu_);
|
||||
for (auto& [ch, inst] : channels_) {
|
||||
|
||||
Reference in New Issue
Block a user