You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When CallKit deactivates and later reactivates the audio session (e.g. a
call put on hold and resumed), the audio unit stops but AudioDeviceIOS keeps
treating it as started, so it is never restarted and the call stays silent.
Report an interruption begin on external deactivation, and before the
interruption end on external activation, so the unit is stopped cleanly and
restarted.
Claude-Session: https://claude.ai/code/session_01NAQ1TqkaV8fAgzXw48z9Gp
Magmusacy
changed the title
iOS: restart the audio unit after external audio session changes
iOS: recover call audio after external audio session changes
Oct 7, 2026
AudioUnitGetProperty failures are indistinguishable from a confirmed stopped state here. The caller consequently invokes Stop() and recovery whenever the query fails, which can interrupt a unit that is still running and obscures the actual Core Audio error. Return the OSStatus separately (for example, via a status return plus an out parameter), log it, and skip recovery unless the query succeeded with is_running == 0.
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
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.
Fixes iOS call audio going silent for the rest of a call when other code deactivates the audio session (e.g. expo-audio after playing a sound).
Problem
AVAudioSession.AudioDeviceIOSstill has it marked as started, soUpdateAudioUnitnever restarts it.Fix
VoiceProcessingAudioUnitlistens tokAudioOutputUnitProperty_IsRunningand reports changes throughOnRunningStateChanged().AudioDeviceIOSrestarts a unit that is marked as started but isn't running, throughUpdateAudioUnit(same path as an interruption end).Stop()fails, it logs and leaves the unit alone.The restart respects
canPlayOrRecord. CallKit hold is handled by the app in fishjam-cloud/fishjam-react-native-webrtc#102.Testing
iPhone 16 (iOS 26.6.2), fishjam-chat + browser peer: