How to disable the microphone

I have a requirement where I’m using an iOS app to conduct an RTC video call with another device. During the call, when the microphone mute button is pressed on the iOS app side, I need to implement this functionality. Are there any relevant interfaces in iOS that allow temporarily disabling the microphone? I haven’t found a direct API for this.

In the middle of the call, if I set the audio session mode to .playback, I encounter an error: AURemoteIO.cpp:1668 AUIOClient_StartIO failed (-66637). Therefore, this method does not actually disable the microphone. Could you please advise on how to implement this feature in my app? The call is based on RTC technology.

Hello @v4hadisiv4123, thank you for your post. I would not recommend changing the audio session mode while capturing, or disabling the audio session in the middle of the call, as it might cause errors and interruptions.

What technology are you using to capture audio? Are you using kAudioUnitSubType_RemoteIO directly, AVAudioEngine, or AVCaptureSession?

How to disable the microphone
 
 
Q