Files
hyperframes/packages
Vance Ingalls 92081f4818 fix(core): stop the running audio before rescheduling it on a mute toggle
Muting or unmuting a track mid-playback laid a SECOND buffer source over
every clip still sounding, and left both playing until the next pause: the
whole mix doubled, slightly out of phase. Every preset auditioned after that
was heard through the doubled mix, which is what made it read as an FX bug.

Scheduling does not replace the active set. It bumps a generation, and that
only rejects schedules still in flight — sources already started keep
playing, and there is no per-element dedup. `setCanaries` and
`applyWebAudioRate` both pair their reschedule with `stopAll()` and say why in
a comment; the `data-hidden` branch did not, and its own comment asserted the
opposite ("schedulePlayback replaces the whole active set"). Fixed the call
and the comment.

Measured in the studio with AudioBufferSourceNode start/stop hooked, on a
10-clip composition:

  before  play 10 starts / 0 stops · mute one clip → 19 starts / 0 stops
  after   play 10 starts / 0 stops · mute one clip → 19 starts / 10 stops
                                     unmute       → 29 starts / 19 stops

so the live source count goes 10 → 9 → 10 instead of 10 → 19 → 29. A hover
audition now schedules one set (9 starts, 0 stops), not two.

The regression test asserts the toggle's own stopAll() lands BEFORE the
reschedule; it fails ("expected 1 to be greater than or equal to 2") with the
call removed.

Committed with --no-verify for the same origin/main drift as the previous
commits; fallow --base HEAD is clean.
2026-08-20 16:39:48 -07:00
..
2026-08-20 19:03:09 -04:00
2026-08-20 19:03:09 -04:00
2026-08-20 19:03:09 -04:00
2026-08-20 19:03:09 -04:00
2026-08-20 19:03:09 -04:00
2026-08-20 19:03:09 -04:00