Go to file
byrongamatos a332c35c9b fix(audio): close the PR #107 review findings
Seven fixes on top of the audio-engine TLC branch, each with the gate that
catches its regression.

Blocking:

- Monitor-mute suppression leaked its refcount. setMonitorMuteSuppressed()
  became a refcounted acquire/release, but screen.js's callers are
  deliberately unpaired: resolveChainRebuildGuard() leaves the suppression on
  when a rebuild yields an empty chain, and returns early without releasing
  while a provider route is still resolving. Harmless against the old latched
  bool, a permanent +1 each against a refcount — after a failed tone rebuild
  the count never returned to zero and monitor mute was silently dead for the
  rest of the session. The renderer now holds at most one suppression.

- Slot ids are monotonic HANDLES (nextSlotId, never reset by clear()), not
  bounded indices, so argSlotId's 4096 ceiling meant that once a session
  created its 4096th processor EVERY guarded binding — setBypass,
  setParameter, remove/moveProcessor, open/closePluginEditor — silently
  no-opped for the rest of the run. Ceiling removed (same for
  SetMultiBypass's hardcoded 4096); unknown ids are still rejected by
  SignalChain::findSlotIndex.

- clearChain / removeProcessor / moveProcessor took chainMutationMutex with a
  blocking lock_guard on the N-API thread — Electron's main thread, and on
  macOS also the JUCE message thread. LoadPreset/LoadVST hold that mutex
  across an unbounded plugin init (done->wait() has no timeout by design), so
  a slow plugin froze the whole main process, every IPC channel with it. They
  now queue on a libuv worker via queueChainMutation() and resolve a promise;
  the bridge awaits them so callers still observe the mutation applied.

Also:

- getChainState() dereferenced raw ProcessorSlot* returned by getAllSlots()
  after the lock was dropped — a concurrent clear() frees them under the
  reader. Replaced with SignalChain::getSlotSummaries(), which copies under
  the lock. getAllSlots() is gone (it had one caller).
- The device-settings migration removed the localStorage copy even when the
  file-store save failed or was unavailable, losing the user's settings.
- SetSlotState and GetParameters kept the raw Int32Value() path: IsNumber()
  is true for NaN, so setSlotState(NaN) wrote onto slot 0 — the same
  coercion class the rest of the branch fixed.
- RendererBus flushed to the LIVE writeIndex, so a disable→re-enable with no
  pull in between discarded the freshly pushed audio along with the stale
  tail. It now snapshots the flush target at disable time.
- LoadPreset's rebuild barrier is now released by a scope guard, so a throw
  between arming it and Queue() can't block editor opens forever.

Gates: new renderer-bus case (fails on the old flush), new slot-id-handle
case (fails on the old ceiling). ctest 9/9, npm test 79 pass / 0 fail,
chain-mutation storm green, addon export contract unchanged.
2026-07-14 14:29:03 +02:00
.claude/skills Clean release snapshot 2026-06-16 18:48:12 +02:00
.devcontainer ci: repoint desktop build off the deleted slopsmith org 2026-06-17 00:47:43 +02:00
.github/workflows fix(nightly): dedupe publish assets across overlapping globs 2026-07-12 23:09:11 +02:00
.packages Clean release snapshot 2026-06-16 18:48:12 +02:00
.specify Clean release snapshot 2026-06-16 18:48:12 +02:00
cmake Clean release snapshot 2026-06-16 18:48:12 +02:00
docs docs: commit the audio-engine TLC findings + plan this branch implements 2026-07-14 03:24:46 +02:00
JUCE@9971c75b2c Clean release snapshot 2026-06-16 18:48:12 +02:00
resources fix(ci): rename entitlements file — vpk requires .entitlements extension 2026-07-10 15:04:31 +02:00
scripts feat(build): bundle bongocat plugin 2026-07-13 22:01:52 +02:00
src fix(audio): close the PR #107 review findings 2026-07-14 14:29:03 +02:00
tests fix(audio): close the PR #107 review findings 2026-07-14 14:29:03 +02:00
.build-config.json fix(build): make the local + CI Linux build work off main (#26) 2026-06-20 14:32:01 +02:00
.gitignore Clean release snapshot 2026-06-16 18:48:12 +02:00
.gitmodules Clean release snapshot 2026-06-16 18:48:12 +02:00
CMakeLists.txt Clean release snapshot 2026-06-16 18:48:12 +02:00
CONTRIBUTORS.md Clean release snapshot 2026-06-16 18:48:12 +02:00
LICENSE Clean release snapshot 2026-06-16 18:48:12 +02:00
package.json feat(panes): pane pop-out windows + the system tray 2026-07-12 17:22:44 -04:00
THIRD_PARTY_LICENSES.md Clean release snapshot 2026-06-16 18:48:12 +02:00
tsconfig.json Clean release snapshot 2026-06-16 18:48:12 +02:00
WINDOWS_BUILD_REQUIREMENTS.md Repoint dead slopsmith URLs -> got-feedback 2026-06-17 11:02:09 +02:00