Skip to content

Fix bounded Opus packet-loss concealment in embedded Linux audio - #959

Merged
capy-ai[bot] merged 1 commit into
devfrom
capy/linux-opus-plc-review
Sep 16, 2026
Merged

capy-ai[bot] merged 1 commit into
devfrom
capy/linux-opus-plc-review

Conversation

@zortos293

Copy link
Copy Markdown
Collaborator

Changes

Preserve sender SSRC and RTP timestamp through the embedded Linux audio handoff. Measure unrecovered loss from the RTP timeline and synthesize Opus concealment in valid sample chunks, capped at 100 ms and the existing PCM buffer capacity.

Reset Opus state when the sender source changes, including when a bounded queue drops the first packet from the new source. Decode RED-recovered packets normally without duplicate concealment.

Verification

This republishes unchanged commit d41f07c9ad48fd00bf33ec41346f818eda513234 from #955 after the user-authorized repair of an accidental direct push to dev. The remote target has been restored to 7a76b0c965087750d46411901ce8d04ba1b2524a. This replacement requires review; GitHub's historical merged status on #955 does not mean this change remains on dev.

The orchestrator independently reviewed and tested this exact implementation before the branch repair:

  • Real-libopus Linux audio tests: 19 passed, 2 existing device-dependent tests ignored.
  • Audio transport regressions: 11 passed.
  • Full native streamer workspace tests passed, including 192 transport and 102 Linux platform tests.
  • Workspace formatting and Clippy passed.

Regressions cover RTP wrap, short/burst loss, varying packet durations, backward timestamps, source reset, a dropped first packet after source change, and RED recovery. CI will run again on this replacement PR.

Limits

No live GFN session, hardware decode, or real playback-device packet-loss test was available. The evidence is transport and real-libopus regression testing, not live gameplay validation. Audio-only failure isolation is a separate dependent change. No UI or FFI ABI changes.

Open in Capy

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2fd848ba-76b7-4ada-a5ea-efef98c8af3a

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

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

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

@capy-ai capy-ai Bot 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.

Capy found no issues.

View 2 other findings in Capy.

Open in Capy

@capy-ai
capy-ai Bot merged commit b757abc into dev Sep 16, 2026
26 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