Skip to content

fix(static): raw stereo loopback capture — no voice-call DSP (tin-can fix)#906

Merged
OmikronApex merged 1 commit into
mainfrom
fix/loopback-raw-audio
Jul 11, 2026
Merged

fix(static): raw stereo loopback capture — no voice-call DSP (tin-can fix)#906
OmikronApex merged 1 commit into
mainfrom
fix/loopback-raw-audio

Conversation

@OmikronApex

@OmikronApex OmikronApex commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Problem

After the loopback-permission fix (feedBack-desktop #100), song-preview audio reached ASIO and the streamer WASAPI output — but sounded like a tin can. Chromium applies voice-call processing (echo cancellation, noise suppression, AGC, mono downmix) to getDisplayMedia audio tracks by default.

Fix

_engageLoopback now requests echoCancellation:false, noiseSuppression:false, autoGainControl:false, channelCount:2, sampleRate:48000. All best-effort (ideal-valued): unsupported constraints degrade silently rather than failing the capture. The [asio-diag] loopback: line now dumps the track's effective getSettings() so tester logs prove which processing applied.

Verification

Packaged portable build (fix16), ASIO4ALL:

[asio-diag] loopback: suppressed= true pageMuted= false rate= 48000 track= {"sampleRate":48000,"channelCount":2,"echoCancellation":false,"noiseSuppression":false,"autoGainControl":false}
[renderer-bus] engaged: app loopback → engine bus

Tester confirms clean preview audio on ASIO + streamer output.

Companion desktop PR: got-feedBack/feedBack-desktop#100.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved desktop audio loopback capture for cleaner stereo music recording.
    • Audio capture now requests reduced processing, including disabled echo cancellation, noise suppression, and automatic gain control.
    • Added best-effort support for two-channel, 48 kHz audio capture.
  • Diagnostics
    • Expanded optional audio diagnostics with detailed capture settings, including sample rate, channel count, and processing flags.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fadb6b2a-27c7-4563-a2eb-3eb0c4ea56b5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Desktop renderer loopback capture now requests raw stereo audio at 48 kHz with audio processing disabled, while ASIO diagnostics log the resulting track settings as structured JSON.

Changes

Renderer audio capture

Layer / File(s) Summary
Loopback constraints and diagnostics
static/js/juce-audio.js
_engageLoopback requests two-channel, 48 kHz audio with echo cancellation, noise suppression, and automatic gain control disabled; ASIO diagnostics log the track settings as JSON.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: raw stereo loopback capture with DSP disabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/loopback-raw-audio

Comment @coderabbitai help to get the list of available commands.

@OmikronApex
OmikronApex force-pushed the fix/loopback-raw-audio branch from 18cf361 to f5d448a Compare July 11, 2026 23:44
Chromium treats a getDisplayMedia audio track as a voice call by
default: echo cancellation, noise suppression, auto gain control and
mono downmix. Music through that pipeline is the tester-reported
"tin can" sound on ASIO/exclusive outputs.

Request the raw path explicitly (EC/NS/AGC off, stereo, 48 kHz) —
all constraints are best-effort so unsupported ones degrade silently
instead of failing the capture. The [asio-diag] loopback line now
dumps track.getSettings() so logs prove which processing actually
applied.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@OmikronApex OmikronApex reopened this Jul 11, 2026
@OmikronApex

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@OmikronApex
OmikronApex merged commit db3ca34 into main Jul 11, 2026
5 checks passed
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