Skip to content

Stop AVAudioEngine when the configuration changes#907

Merged
sbooth merged 4 commits into
mainfrom
avaeccn
May 10, 2026
Merged

Stop AVAudioEngine when the configuration changes#907
sbooth merged 4 commits into
mainfrom
avaeccn

Conversation

@sbooth
Copy link
Copy Markdown
Owner

@sbooth sbooth commented May 4, 2026

No description provided.

@sbooth
Copy link
Copy Markdown
Owner Author

sbooth commented May 6, 2026

Link to developer forums inquiry: https://developer.apple.com/forums/thread/825253

@sbooth sbooth marked this pull request as ready for review May 10, 2026 15:23
Copilot AI review requested due to automatic review settings May 10, 2026 15:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates AudioPlayer’s AVAudioEngineConfigurationChangeNotification handling to explicitly stop a running AVAudioEngine before reconfiguring the main mixer → output node connection, preventing exceptions during disconnect/reconnect when configuration changes race with restarts.

Changes:

  • Clarifies the meaning of Flags::engineIsRunning around configuration changes.
  • Ensures AVAudioEngine is stopped (if running) before disconnecting/reconnecting the output bus format during configuration-change handling.

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

@sbooth sbooth merged commit 17a97b3 into main May 10, 2026
2 checks passed
@sbooth sbooth deleted the avaeccn branch May 10, 2026 15:45
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