From 3ce9ebeaf168a6d142fc259298214f9d35195a70 Mon Sep 17 00:00:00 2001 From: wonjang <48057918+wonjangcloud9@users.noreply.github.com> Date: Sat, 14 Nov 2026 03:48:05 +0000 Subject: [PATCH] fix(lint): say the audio overlap warning is about a shared Studio lane (#7700) duplicate_audio_track said two overlapping clips on one data-track-index "cause layered audio playback" and suggested moving one to another track. The render's mixer never reads data-track-index (every audible clip is its own amix input) and the docs call the attribute a Studio lane only, so the two clips are layered whatever their tracks: rendering a whoosh and a hit on track 6, then with the hit on track 7, gives byte-identical audio. The message now says both play and that the overlap is two clips sharing one Studio lane; the hint says splitting tracks leaves the mix unchanged, and that a leftover duplicate should be removed or moved. lint-rules.mdx said the audio "doubles up"; it now says the same as the message. Co-authored-by: Claude Opus 5.5 --- docs/reference/lint-rules.mdx | 4 ++-- packages/lint/src/project.test.ts | 17 +++++++++++++++++ packages/lint/src/project.ts | 5 +++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/reference/lint-rules.mdx b/docs/reference/lint-rules.mdx index b8aad8358d..c6e287daf1 100644 --- a/docs/reference/lint-rules.mdx +++ b/docs/reference/lint-rules.mdx @@ -916,9 +916,9 @@ Source: the project lint pass in `packages/lint/src/project.ts`, `packages/lint/ ### `duplicate_audio_track` -**Warning.** Two audible elements overlap on the same track index, so their audio doubles up. +**Warning.** Two audible clips overlap in time on the same `data-track-index`. Both play at once: the render mixes every audible clip whatever its track, and `data-track-index` only picks the Studio lane, so Studio draws the two over each other in that lane. An overlap like this is either an accidental duplicate or two sounds sharing one lane. -**Fix:** Use non-overlapping time windows or different track indices. +**Fix:** If both should sound (a whoosh into a hit), give one its own `data-track-index`; the mix does not change. If one is a leftover duplicate, remove it or move it so the windows do not overlap. ### `texture_mask_asset_not_found` diff --git a/packages/lint/src/project.test.ts b/packages/lint/src/project.test.ts index fb8fb638ad..9b0be9176e 100644 --- a/packages/lint/src/project.test.ts +++ b/packages/lint/src/project.test.ts @@ -1307,6 +1307,23 @@ describe("audio-aware project rules", () => { expect(codes).toContain("duplicate_audio_track"); }); + it("says both clips still play, since the track index only picks the Studio lane", async () => { + const sfx = (id: string, start: string, duration: string) => + ``; + const project = makeProject( + composition(sfx("whoosh", "5.13", "0.7") + sfx("land", "5.79", "0.34")), + ); + const { results } = await lintProject(project); + const finding = results + .flatMap((result) => result.result.findings) + .find((f) => f.code === "duplicate_audio_track"); + expect(finding?.message).toContain("whoosh.wav at 5.13-5.83s and land.wav at 5.79-6.13s"); + expect(finding?.message).toContain("Both play at once whatever their track"); + expect(finding?.fixHint).toContain( + "give one its own data-track-index; the mix does not change", + ); + }); + it("stays quiet when one of the overlapping videos is muted", async () => { const codes = await codesFor( composition(video('data-has-audio="true"', 0) + video("muted", 2)), diff --git a/packages/lint/src/project.ts b/packages/lint/src/project.ts index 1d53f08578..e7aee0d622 100644 --- a/packages/lint/src/project.ts +++ b/packages/lint/src/project.ts @@ -929,8 +929,9 @@ function lintDuplicateAudioTracks(projectDir: string, rootHtml: string): Hyperfr findings.push({ code: "duplicate_audio_track", severity: "warning", - message: `Multiple audible