Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Route-change handling can still overwrite host-managed channel preferences when renderer activation is disabled.
1 open issue
What changed in this PR
This PR adds host control over renderer audio-session activation and moves category validation into the process-wide transition queue.
Changes:
- Add a default-enabled activation flag for renderer loads and interruption recovery.
- Coalesce concurrent category setup and revalidate settings on later loads.
- Add ownership tests and document activation, configuration, and deactivation responsibilities.
| File | Description |
|---|---|
| Tests/AetherEngineTests/SharedOutputCoordinatorTests.swift | Test configuration coalescing, revalidation, and activation ownership. |
| Sources/AetherEngine/SharedOutputCoordinator.swift | Serialize and coalesce category configuration. |
| Sources/AetherEngine/AetherEngine+Loading.swift | Gate renderer activation with the new ownership flag. |
| Sources/AetherEngine/AetherEngine.swift | Expose the flag and validate category settings at load. |
| README.md | Update category-configuration timing documentation. |
| docs/formats.md | Clarify load-time audio-session setup. |
| docs/api.md | Document host-managed activation and lifecycle responsibilities. |
| CHANGELOG.md | Announce activation control and shared category setup. |
Review effort: Balanced
| /// iOS/tvOS 27 flag it as a hang risk on the main thread (AE#538): the same reasoning that moved `setCategory` off-main | ||
| /// in #114 and the teardown deactivation in #215. Only the track lookup, which reads published state, stays here. | ||
| func activateRendererAudioSession(audioSourceStreamIndex: Int32? = nil) async { | ||
| guard rendererAudioSessionActivationEnabled else { return } |
jonluca
force-pushed
the
feat/host-audio-session-activation
branch
from
October 25, 2026 18:27
1a3975d to
3057c8a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Let hosts coordinating audible focus across several players own renderer audio-session activation. Coalesce concurrent category setup through the existing process-wide transition queue and validate current settings on later loads, avoiding repeated configuration of an already matching session.
What changed
rendererAudioSessionActivationEnabled, defaulting to true. When disabled before load, renderer loads and interruption recovery skip activation and channel preference changes.SharedOutputCoordinator.Test plan
-warnings-as-errors.git diff --checkpass.Checklist
CHANGELOG.mdupdated