Skip to content

fix(core,studio): silence hidden audio in preview, and call it mute - #3275

Open
vanceingalls wants to merge 1 commit into
wa-21a-preset-primaryfrom
wa-21b-audio-mute
Open

fix(core,studio): silence hidden audio in preview, and call it mute#3275
vanceingalls wants to merge 1 commit into
wa-21a-preset-primaryfrom
wa-21b-audio-mute

Conversation

@vanceingalls

Copy link
Copy Markdown
Collaborator

Summary

  • Preview scheduled every audio[data-start] regardless of data-hidden, so a hidden audio track was silent in the export but audible in preview — render was already correct (isHidden in audioMixer.ts); this restores parity. Ships unflagged since it's a bugfix, not a new behavior.
  • Web Audio scheduling (scheduleWebAudioForActiveClips in init.ts) now skips any audio clip under a data-hidden ancestor, and re-syncs (batched, one call per visibility pass) when the attribute flips mid-playback.
  • The HTMLMedia per-tick volume path (media.ts) folds the same check into effectiveVolumeel.muted is untouched, since that flag is the transport's playback-ownership signal, not author intent.
  • Relabels the eye control as Mute/Muted on audio-only track rows (icon swap, struck-through label, "Mute/Unmute track N" undo-history copy), gated behind the new audio-track-mute canary (0%) since it's a copy/UX change, kept separate from the unflagged behavior fix above.

Depends on

Stacks on #3274 (A1) — review/merge that first.

Test plan

  • bun run build (core changed)
  • cd packages/core && bun run test — 2339/2339 pass
  • cd packages/studio && bun run test — 4244/4244 pass
  • bunx oxfmt / bunx oxlint clean on changed files
  • New tests: hidden audio excluded from WebAudio scheduling + batched mid-playback reschedule (init.test.ts); effectiveVolume zeroed under data-hidden without touching el.muted (media.test.ts); audio-only track gets Mute/Unmute labels, mixed track keeps Hide/Show (timelineTrackVisibility.test.ts)
  • Manual: hyperframes preview a composition with music, hide the music track, press play — silence in preview; toggle the eye mid-playback and confirm it silences without the transport restarting

🤖 Generated with Claude Code

Preview scheduled every audio[data-start] regardless of data-hidden, so a
hidden audio track was silent in the export but audible in preview — render
was already correct, this was a preview-only parity bug. Web Audio scheduling
now skips (and re-syncs on toggle) any audio clip under a data-hidden
ancestor; the HTMLMedia per-tick volume path folds the same check into
effectiveVolume without touching el.muted (transport-owned). Ships unflagged
since it's a bugfix restoring parity.

Also relabels the eye as Mute/Muted on audio-only track rows (icon,
strikethrough label, undo-history copy), gated behind the new
audio-track-mute canary — the relabel is a copy/UX change, kept separate from
the behavior fix above.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant