miniature-air-74519
09/24/2025, 10:16 PMtall-airline-16756
09/24/2025, 10:16 PMtall-airline-16756
09/24/2025, 10:16 PMsetMicrophone in the iOS SDK, you can easily do this by configuring the AudioManager to use a mute mode that prevents the sound effect from playing.
By default, the mute mode .voiceProcessing triggers a sound effect when the microphone is muted. To skip this sound, you have two great options:
• `.restart`: This restarts the internal AVAudioEngine without mic input when muted. It might be a bit slower, but it guarantees no sound effect will play.
• `.inputMixer`: This mutes the output of the input mixer. The mic indicator stays on, and no sound effect is played.
You can set the mute mode like this:
try AudioManager.shared.set(microphoneMuteMode: .restart)
or
try AudioManager.shared.set(microphoneMuteMode: .inputMixer)
Just a quick tip: be sure to set this mode before connecting to the room or calling setMicrophone, as it controls how microphone muting works at the engine level. If you have any questions or need further help, feel free to ask!
Sources: Sources/LiveKit/Participant/LocalParticipant.swift | README.mdminiature-air-74519
09/24/2025, 10:18 PMtall-airline-16756
09/24/2025, 10:18 PM.voiceProcessing. This is the default setting and it makes sure the iOS sound effect plays whenever the microphone is muted.
Here’s a little snippet of code to help you out:
do {
try AudioManager.shared.set(microphoneMuteMode: .voiceProcessing)
} catch {
print("Failed to set microphone mute mode: \(error)")
}
This will bring back the normal behavior you expect. Just a quick reminder—make sure your app has the necessary microphone permissions, and that your AVAudioSession is set up with a recording-capable category like .playAndRecord. This helps avoid any session-related hiccups.
Sources: Tests/LiveKitTests/AudioProcessingTests.swift | LiveKitExample.xcodeproj/project.pbxproj