Skip to content

feat(editor): mute a recording's own audio - #1440

Closed
My-Denia wants to merge 2 commits into
getopenscreen:mainfrom
My-Denia:feat/1104-mute-recording-audio
Closed

My-Denia wants to merge 2 commits into
getopenscreen:mainfrom
My-Denia:feat/1104-mute-recording-audio

Conversation

@My-Denia

@My-Denia My-Denia commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a project setting that mutes the recording's own audio, the scope agreed in #1104: the preview goes silent, the export follows, and added voiceover and music tracks keep playing. It lives in the Audio pane as a toggle, and Reset audio clears it. It is saved in the project, and setEditorSettings reads and writes it.

A muted export keeps a silent AAC stream instead of dropping the audio stream, which is what the compositor already does for a recording with no sound. Click sounds are not muted, since they are not the recording's audio.

Related issue

Fixes #1104

Type of change

  • Bug fix
  • Feature
  • Enhancement
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging
  • Not platform-specific

Screenshots / video

A new "Mute recording audio" row in the Audio pane.

Testing

Windows 11, real electron . export of a synthetic 4 s project whose recording carries a 440 Hz tone, measured with ffmpeg bandpass + volumedetect:

Project 440 Hz (recording) 2 kHz (music track)
Unmuted -18.2 dB noise floor
Muted -91.0 dB -91.0 dB
Muted, with a music track -72.2 dB -24.1 dB

Computer-use in the dev build: the toggle turns on and the saved project reads recordingAudioMuted: true; Reset audio turns it off and the saved project reads false.

Also run: npx tsc --noEmit, npx tsc -p tsconfig.test.json --noEmit, npm run i18n:check, Biome on the changed files, and npm run test. In that full run the only failures are 4 tests in .github/scripts/stable-release-notes.test.mjs, a file this PR does not touch. It ran on Node 25 with --no-experimental-webstorage, not the pinned Node 22.

Not covered:

  • Hearing the mute in the preview. This dev build could not start the preview (open_input: -2, its addon is older than this tree), so the preview path rests on the unit tests for the audio routing.
  • The Export dialog itself: the export above went through the CLI. The dialog keeps its own copy of the clip list, covered by ExportDialog.params.test.tsx.
  • macOS and Linux. The change is in shared TypeScript, but neither was run.

Summary by CodeRabbit

  • New Features
    • Added an audio setting to mute a recording’s original sound in preview and exports, while keeping music and voiceovers audible.
    • The setting is saved with editor settings, can be undone and redone, and is included in export behavior.
    • Reset audio now also turns recording audio back on.

Add a project setting that silences the recording in the preview and the
export while voiceovers, music and click sounds keep playing. The Audio pane
owns the toggle, its Reset clears it, and setEditorSettings reads and writes it.

Closes getopenscreen#1104
Copilot AI balanced review requested due to automatic review settings October 31, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The editor adds a persisted setting to mute original recording audio in preview and export. Imported music and voiceovers remain audible. The Audio pane, AI settings tool, and localized settings expose the option.

Changes: Recording audio mute

Layer / File(s) Summary
Setting, controls, and integrations
src/lib/ai-edition/store/editorSettings.ts, src/lib/ai-edition/store/*test.ts, src/components/ai-edition/RightPanes.tsx, src/components/ai-edition/RightPanes.audioPane.test.tsx, electron/ai-edition/editor-settings-tool.ts, electron/ai-edition/editor-settings-tool.test.ts, electron/ai-edition/deep-agent/service.ts, src/i18n/locales/*/settings.json, technical-documentation/architecture/mcp-server.md
The editor settings model defaults recordingAudioMuted to false and reads and stores the value. The Audio pane adds a toggle and resets it with audio gain. The AI settings tool accepts and returns the setting. Locale strings and the MCP documentation describe it. Tests cover persistence, undo and redo, reset, and the AI tool.
Preview mute routing
src/components/ai-edition/VirtualPreview.tsx, src/components/ai-edition/VirtualPreview.audio.test.ts, src/components/ai-edition/VirtualPreview.playback.test.tsx
Preview applies the mute setting to Web Audio and direct-output recording paths. It tracks fallback routes, attempts muted fallback routing when source routing fails, and disconnects partial routes when fallback setup also fails. Tests cover mute behavior, source changes, and routing failures.
Export clip audio metadata
src/components/ai-edition/ExportDialog.tsx, src/components/ai-edition/ExportDialog.params.test.tsx, src/native/sceneDescription.ts, src/native/sceneDescription.test.ts, technical-documentation/testing/manual-e2e-checklist.md
Export clip lists and scene descriptions set recording clips’ hasAudio to false when recording audio is muted. Otherwise, they retain the existing optimistic audio default. Tests check muted recordings and included imported tracks. The checklist records a partial Windows 11 test and identifies untested paths.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AudioPane
  participant EditorSettings
  participant VirtualPreview
  User->>AudioPane: Toggle recordingAudioMuted
  AudioPane->>EditorSettings: Save setting
  EditorSettings->>VirtualPreview: Provide current setting
  VirtualPreview->>VirtualPreview: Mute recording audio routes
Loading

Possibly related PRs

  • getopenscreen/openscreen#1383: Both changes affect audio data used to build export scenes. This PR applies the recording mute setting while preserving imported audio tracks.

Suggested reviewers: etiennelescot

Merge Risk: Low · up to 0913d

The recording-mute change is mergeable with minor localization corrections and test follow-ups. Italian and French users currently see missing apostrophes in the new controls; no material playback, export, or persistence failure is established.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

LanguageTool
technical-documentation/testing/manual-e2e-checklist.md

LanguageTool checks are incomplete because the per-file request limit of 5 was reached. Remaining text was skipped; findings from completed checks are retained.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@My-Denia My-Denia closed this Oct 31, 2026
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.

[Feature]: Export without Audio/Sound - AFTER recording WITH sound, for Transcript Captions

2 participants