docs(ios): drop stale debug comments + TeamTalk refs from audio router
After the stereo-mic/A2DP debugging settled, the iOS audio code carried leftover TeamTalk5 comparison notes, source-line citations, TEMP DIAGNOSTIC markers, and "this was the bug" narratives that no longer help. Reworded those to state the current rules; kept the comments that document real constraints (the setPreferredInputNumberOfChannels(2) trap, the re-entrancy guard, the ma_context no-session-management config). Comment-only — no behavior change. core builds, ctest --preset dev 21/21.
This commit is contained in:
@@ -16,12 +16,10 @@ final class AudioSessionManager {
|
||||
var activeMicStreamId: UInt32?
|
||||
|
||||
/// Tracks whether WE activated the session. The session must be active whenever the
|
||||
/// AudioEngine is running (for capture OR playback). Previously, the session was only
|
||||
/// activated when the user joined voice (startMicStream), which meant:
|
||||
/// - Remote audio was silent if the user hadn't joined voice yet.
|
||||
/// - Leaving voice (stopMicStream) deactivated the session, killing remote audio.
|
||||
/// Now the session is activated when any audio needs to play (remote stream started OR
|
||||
/// user joins voice) and only deactivated when disconnecting from the server.
|
||||
/// AudioEngine is running (for capture OR playback), so it is activated when any audio
|
||||
/// needs to play (a remote stream started OR the user joins voice) and only deactivated
|
||||
/// when disconnecting from the server — not when leaving voice, since the user may still
|
||||
/// want to hear remote audio.
|
||||
private var isSessionActive = false
|
||||
|
||||
func configure() {
|
||||
@@ -78,12 +76,10 @@ final class AudioSessionManager {
|
||||
logger.info("session deactivated")
|
||||
}
|
||||
|
||||
/// TEMP DIAGNOSTIC (stereo-A2DP fix verification): log the full AVAudioSession state —
|
||||
/// category, mode, options, and active route. The bug was miniaudio resetting the category
|
||||
/// to `Record` (no output) on device open; with the core's ma_context now configured to
|
||||
/// leave the session alone, this should report `AVAudioSessionCategoryPlayAndRecord` with
|
||||
/// `allowBluetoothA2DP` set, and the output route should be the headphones/A2DP device —
|
||||
/// even after the mic engine starts. Remove once verified on-device.
|
||||
/// Log the full AVAudioSession state — category, mode, options, and active route.
|
||||
/// Useful for diagnosing routing issues, e.g. confirming the session stays
|
||||
/// `PlayAndRecord` with `allowBluetoothA2DP` and keeps the A2DP output route even
|
||||
/// after the mic engine starts.
|
||||
func logSessionState(_ when: String) {
|
||||
let s = AVAudioSession.sharedInstance()
|
||||
var opts: [String] = []
|
||||
|
||||
Reference in New Issue
Block a user