Skip to content

Suppress underrun events when a format change is pending#954

Open
sbooth wants to merge 7 commits into
mainfrom
pending
Open

Suppress underrun events when a format change is pending#954
sbooth wants to merge 7 commits into
mainfrom
pending

Conversation

@sbooth

@sbooth sbooth commented Jul 12, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 12, 2026 18:22

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.

Pull request overview

This PR aims to reduce spurious renderBufferUnderrun events during playback transitions by tracking when a ring buffer / processing-graph format change is in progress and suppressing underrun reporting during that window.

Changes:

  • Add a new internal Flags::pendingFormatChange bit to track when a ring buffer format transition is pending.
  • Set/clear pendingFormatChange during non-gapless join handling in the decoding thread.
  • Suppress renderBufferUnderrun event enqueuing when a short read occurs while pendingFormatChange is set.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Sources/CSFBAudioEngine/Player/AudioPlayer.mm Sets/clears a new “pending format change” flag around reconfiguration and gates underrun event generation on it.
Sources/CSFBAudioEngine/Player/AudioPlayer.h Introduces pendingFormatChange flag and shifts renderEventDropped to the next bit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Sources/CSFBAudioEngine/Player/AudioPlayer.mm
Comment thread Sources/CSFBAudioEngine/Player/AudioPlayer.mm Outdated
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.

2 participants