Skip to content

fix: use max priority for audio capturing to reduce cutting - #374

Merged
iparaskev merged 2 commits into
mainfrom
audio_cutting_improvement
Aug 3, 2026
Merged

fix: use max priority for audio capturing to reduce cutting#374
iparaskev merged 2 commits into
mainfrom
audio_cutting_improvement

Conversation

@iparaskev

@iparaskev iparaskev commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Improvements
    • Improved microphone capture reliability by prioritizing audio capture processing.
    • Reduced unnecessary alert-level logging for minor remote audio timing differences.

Gives maximum priority to the capturing thread. This was an issue when
the capturer's cpu was overloaded.
@netlify

netlify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy Preview for hoppdocs ready!

Name Link
🔨 Latest commit e83d581
🔍 Latest deploy log https://app.netlify.com/projects/hoppdocs/deploys/6a70ed576a9c2a0008a5551a
😎 Deploy Preview https://deploy-preview-374--hoppdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: acd6a990-af43-42e7-ac43-9d5991616ca0

📥 Commits

Reviewing files that changed from the base of the PR and between 28bb274 and e83d581.

📒 Files selected for processing (2)
  • core/src/audio/capturer.rs
  • core/src/livekit/audio.rs

📝 Walkthrough

Walkthrough

The capture thread now attempts maximum priority at startup and continues if priority configuration fails. Remote audio drift above 50 ms now uses debug-level logging.

Changes

Audio runtime adjustments

Layer / File(s) Summary
Capture thread priority
core/src/audio/capturer.rs
The capture thread imports thread-priority APIs and attempts maximum priority at startup. It logs success or a warning and continues when configuration fails.
Remote drift logging
core/src/livekit/audio.rs
Remote audio drift above 50 ms now uses debug-level logging instead of warning-level logging.

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

Possibly related PRs

  • gethopp/hopp#293: Modifies the microphone capture thread in the same file for disconnect and crash handling.
🚥 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 and concisely describes the primary change: assigning maximum priority to the audio capture thread to reduce audio cutting.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch audio_cutting_improvement

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.

@iparaskev
iparaskev merged commit 173ce37 into main Aug 3, 2026
20 checks passed
@iparaskev
iparaskev deleted the audio_cutting_improvement branch August 3, 2026 20:11
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