G3.2+G3.3: classify hang/crash vs audio stall + SEH per-channel plugin crash isolation (mute channel)

This commit is contained in:
2026-08-16 10:23:08 +07:00
parent 30fa98a441
commit 0b8e80fe2c
6 changed files with 186 additions and 8 deletions
@@ -119,6 +119,13 @@ public:
// worker thread): real-time code drops MIDI for it. Channel-level flag —
// survives the instance swap (the per-instance flag dies with the object).
bool isReloading(uint32_t channel) const;
// G3.3: mark a channel whose plugin crashed inside processAudioBlock
// (SEH access violation). The channel is muted (real-time dispatch +
// renderAll skip it) until the next assign() — the plugin's state is
// undefined after a fault, so re-processing would fault again.
void markCrashed(uint32_t channel);
bool isCrashed(uint32_t channel) const;
// Editor-open predicate: while any VST editor is attached, channels whose
// plugin DLL path has an open editor count as quiet (same-plugin channels
// too -- the worker pumps the editor's window proc inside the DLL while the
@@ -146,6 +153,8 @@ private:
std::vector<float> scratchL_, scratchR_;
// Channel-level reload flag (see isReloading) — indexed by MIDI channel.
bool reloadingCh_[16] = {};
// G3.3: channel muted after a plugin fault inside processAudioBlock.
bool crashedCh_[16] = {};
// True when the channel's plugin DLL has an attached editor (or its reload
// is in progress): real-time code drops MIDI and skips rendering. Lowercased
// compare inside -- Windows plugin paths are case-insensitive.