Skip to content

test(audio): accept any loudness raise in the clipped-voice fixture - #1678

Open
EtienneLescot wants to merge 1 commit into
mainfrom
fix/1677-clipped-voice-fixture
Open

EtienneLescot wants to merge 1 commit into
mainfrom
fix/1677-clipped-voice-fixture

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Fixes #1677

Cause: the macOS arm64 Rust job installs Homebrew's ffmpeg unpinned. It moved from 9.0.2 (last green run) to 9.1 (first red run), whose AAC encoder was retuned. Through 9.1's encoder this fixture needs a +0.95 dB raise, under the test's > 1 dB precondition. The export code is not at fault.

Fix: the precondition now asks for any raise (> 0 dB). The crests over full scale that the test actually needs are still checked right after it.

Checked locally on Windows, against BtbN ffmpeg builds:

  • 9.0: gain +1.24 dB, export peak -1.74 dBTP, passes.
  • master (reproduces CI's exact 0.9500192): passes with this change. Recording peak +1.86 dBTP, export -1.23 dBTP, makeup +0.69 LU.

Test-only change, nothing reaches the picture or export output.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated the clipped-voice export test to allow for differences in loudness gain across AAC encoder versions.

Homebrew moved the macOS arm64 CI job from ffmpeg 9.0.2 to 9.1, whose
retuned AAC encoder leaves this fixture needing +0.95 dB instead of
+1.24 dB, under the old > 1 dB precondition. The rest of the test, the
crests over full scale and the export under -1 dBTP, passes on both.

Refs #1677
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The clipped-voice export test now accepts any positive loudness gain. Its comment notes that the measured gain varies across AAC encoder versions.

Changes: Audio test

Layer / File(s) Summary
Update clipped-voice gain assertion
crates/compositor/src/audio.rs
The test accepts any positive loudness gain instead of requiring gain above 1 dB. The comment notes that the measured gain varies across AAC encoder versions.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other · Severity of issue fixed: Medium

Suggested reviewers: my-denia

Merge Risk: Minimal · up to 3a279

This change only relaxes a test precondition to tolerate AAC encoder differences across ffmpeg versions. It does not affect production audio export or picture output, and there is no material merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the test change and the fixture precondition it relaxes, which matches the single-file change in crates/compositor/src/audio.rs. It is specific and follows the conventional type(scope)…
Description check Passed The description follows the repository template in substance. It has a Summary-style explanation of cause and fix, and it links the issue with 'Fixes #1677'. It documents local testing on Windows with…
Linked Issues check Passed Issue #1677 reports that the macOS compositor Rust job fails on audio::tests::a_clipped_voice_exports_under_minus_one_dbtp at the precondition the fixture needs raising… 0.9500192. It has no expli…
Out of Scope Changes check Passed The whole-PR diff touches only the clipped-voice test in crates/compositor/src/audio.rs (+4/-1). The changed lines are the precondition assertion and its explanatory comment, which both serve issue #1…
Full details: Title check

Explanation

The title names the test change and the fixture precondition it relaxes, which matches the single-file change in crates/compositor/src/audio.rs. It is specific and follows the conventional type(scope) form. The title is slightly narrower than the PR's stated fix, which also states that the export code is unchanged, but that is expected.

Full details: Description check

Explanation

The description follows the repository template in substance. It has a Summary-style explanation of cause and fix, and it links the issue with 'Fixes #1677'. It documents local testing on Windows with specific ffmpeg versions and results. It does not fill in the Type of change, Release impact, Desktop impact, or Screenshots sections. These are checkbox sections, and the description states the change is test-only with no effect on picture or export output. The missing checkbox selections are non-critical, so the description is mostly complete.

Full details: Linked Issues check

Explanation

Issue #1677 reports that the macOS compositor Rust job fails on audio::tests::a_clipped_voice_exports_under_minus_one_dbtp at the precondition the fixture needs raising… 0.9500192. It has no explicit acceptance criteria beyond resolving that CI failure. The reviewed diff (merge base 2b65ea9 to head 3a279e7) changes one assertion in crates/compositor/src/audio.rs from gain > 1.0 to gain > 0.0 and adds a comment. The reported gain of 0.9500192 now satisfies the precondition, so the failing assertion no longer panics. The assertions after it (assert_lufs at -16.0 and the over-full-scale crest check on hot) remain, so the test still checks the condition it targets. The root-cause account (unpinned Homebrew ffmpeg 9.0.2 to 9.1 encoder change) comes from the PR description and local Windows checks, not from the macOS CI run. That account is not independently verified here, but the code change directly resolves the reported failure.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff touches only the clipped-voice test in crates/compositor/src/audio.rs (+4/-1). The changed lines are the precondition assertion and its explanatory comment, which both serve issue #1677. No export, picture, or production code changes appear in the diff. The change is within scope.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d16576cc-f48d-49ef-8390-f1afda25832f
Commits

Reviewing files that changed from the base of the PR and between 2b65ea9 and 3a279e7.

Files selected for processing: 1

  • crates/compositor/src/audio.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

akahoz94 added a commit to akahoz94/openscreen that referenced this pull request Nov 28, 2026
- Fix Typecheck (tests): add micGainDb/systemAudioGainDb to the cameraPrefs fixture (TS2739 blocked all three CI runs).
- Drop the unrelated audio.rs threshold change; getopenscreen#1678 owns that line.
- Clamp direct IPC/MCP audio gains at the helper boundary: a negative scalar flips phase on Linux/Windows. Also document systemGain in the V2 helper example.
akahoz94 added a commit to akahoz94/openscreen that referenced this pull request Nov 28, 2026
Adds a persisted keystrokeOverlayEnabled setting (default off) shown as a Show keystrokes row in Record mode. The overlay and the low-level keyboard hook now start only when it is on: the helper takes a --keys flag and installs WH_KEYBOARD_LL only with it, so no key is observed by default. Badges move from bottom-centre (where they covered the HUD buttons) to top-centre. Updates the architecture/user docs and adds i18n strings for all locales.

Also drops the unrelated audio.rs threshold change (getopenscreen#1678 owns that line).
akahoz94 added a commit to akahoz94/openscreen that referenced this pull request Nov 28, 2026


The a_clipped_voice_exports_under_minus_one_dbtp fixture asserts gain > 1.0,
a threshold measured under ffmpeg 9.0 (+1.6 dB). Through the AAC round-trip
the computed gain is encoder-version dependent (getopenscreen#1678 documents 9.0 = +1.24
dB, 9.1 = +0.95 dB), so the macOS arm64 runner fails deterministically at
0.9500192 while Intel/Windows pass.

Apply the exact fix from getopenscreen#1678 (gain > 0.0 plus the explanatory comment), so
this becomes a no-op once getopenscreen#1678 lands and cannot conflict with it.

This branch has not been deployed

No deployments
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.

CI: macOS compositor Rust test a_clipped_voice_exports_under_minus_one_dbtp fails on main

1 participant