diff --git a/src/lib/exporter/audioEncoder.test.ts b/src/lib/exporter/audioEncoder.test.ts index 4238b902..f3e8b8f6 100644 --- a/src/lib/exporter/audioEncoder.test.ts +++ b/src/lib/exporter/audioEncoder.test.ts @@ -53,6 +53,18 @@ function fakeAudioBuffer(channels: Float32Array[]): AudioBuffer { } describe("AudioProcessor offline render preparation", () => { + it("routes a muted full-track clip through offline audio rendering", async () => { + const processor = new AudioProcessor(); + const render = vi.spyOn(processor as unknown as OfflineRenderTestHarness, + "renderAndMuxOfflineAudio").mockResolvedValue(); + const clips = [{ id: "clip", startMs: 0, endMs: 1000, sourceStartMs: 0, speed: 1, muted: true }]; + const muxer = {} as never; + await processor.process(null, muxer, "recording.mp4", [], [], undefined, + [], [], undefined, undefined, clips); + expect(render).toHaveBeenCalledWith("recording.mp4", [], [], [], [], + undefined, undefined, clips, muxer); + }); + it("rejects a cancelled chunked render instead of returning a partial WAV", async () => { const processor = new AudioProcessor() as unknown as OfflineRenderTestHarness; vi.spyOn(processor, "prepareOfflineRender").mockResolvedValue({ diff --git a/src/lib/exporter/videoExporter.ts b/src/lib/exporter/videoExporter.ts index 2eaa18f7..d58642c7 100644 --- a/src/lib/exporter/videoExporter.ts +++ b/src/lib/exporter/videoExporter.ts @@ -412,6 +412,7 @@ export class VideoExporter { this.config.sourceAudioFallbackPaths, this.config.sourceAudioFallbackStartDelayMsByPath, this.config.sourceAudioTrackSettings, + this.config.clipRegions, ), "audio processing", "audio",