-
Notifications
You must be signed in to change notification settings - Fork 33
Description
We encountered an audio issue when using WebRTC-SDK (version 137.7151.01) to implement video conferencing.
• On the first join to a meeting, everything works as expected;
• After leaving and rejoining the meeting, the microphone fails to start;
• Console error output:
(voice_processing_audio_unit.mm:402 Start): Failed to start audio unit. Error=561145187 (audio_device_ios.mm:335 StartRecording): StartRecording failed to start audio unit, reason 561145187
Error Analysis:
The error code 561145187 corresponds to '!pri' (kAudioUnitErr_CannotDoInCurrentContext), which means AudioUnit could not operate in the current context. Possible reasons include:
• Audio resources (e.g., AudioUnit) not released properly after first session;
• AVAudioSession was not reactivated before restarting audio;
• Audio device module may have retained static/shared state;
• Audio stack was not reset properly after background/interrupt state;
Expected Behavior:
• Microphone should work correctly on every room entry;
• Rejoining a room should not cause audio unit startup failure;
Reproduction Steps:
1. Launch the app and join a room (microphone works fine);
2. Leave the room, cleaning up PeerConnection and Factory;
3. Join the room again;
4. Observe error Failed to start audio unit and no mic input;
SDK Version & Environment:
• SDK: WebRTC-SDK 137.7151.01
• Integration: CocoaPods (source 'https://github.com/webrtc-sdk/Specs.git')
• Language: Objective-C
• Tested on: iOS 15+, real device
Suggestion / Request:
Please help check whether the SDK properly releases/cleans up the audio resources (such as AudioUnit, AVAudioSession, etc.) when leaving a room, and whether shared/static audio states persist across sessions.