-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Legacy mute causes audio session switch #619
Comments
Hi @dfed I'll investigate this today. I've already tested this case so I wonder what's going on 🤔 |
Hi @hiroshihorie I've also noticed this issue. I've also noticed that the muted state will have it's own volume level that the app will "remember". I'll expand @dfed's repro steps to show what I mean:
Sharing in case it's useful! |
Fascinating observation! I believe that would indicate we’re changing the the audio session configuration when disabling the microphone. |
Thank you, @dfed and @sergeyphi. Yes, the audio session switch is causing the volume level change. When legacyMuteMode is enabled, muting shuts down the recording, which then switches to I’ll implement a fix or provide an option to modify this behavior. In a mute/unmute scenario you probably just want to keep it on |
Hi, I'm working on fix in #621 but I've discovered the following. When maintaining category:
If I switch to another mode, even with same category ( Example: So I'm a little stuck at the moment. Another option is to keep the recording on (mic indicator on) but disregard local audio buffers (mute) which I'm sure will work. |
Ahhhhhh right I remember hitting this before we adopted LiveKit – turning off voice processing enables you to turn off the audio indicator but it also makes all audio playback quite quiet. Dropping output volume is a no-go, since there's no way for the user to work around it. Switching modes changes the volume, which is not great, but at least the user can fix it + develop a mental model around it. I think this is the preferred approach.
I agree this'll work, but I also agree that this doesn't feel viable. Edit: what I don't understand is how the modern mute mode avoids this pitfall. What's the setting in the audio stack that enables us to have both consistent volume across mute/unmute as well as voice processing? |
The "modern mute mode" is using isVoiceProcessingInputMuted which is exactly for this purpose. But unfortunately plays a sound effect, probably for privacy reasons. 🤔 |
Describe the bug
Muting the local participant's microphone when
isLegacyMuteMode
is enabled mutes all audio, including agent audio and other sound effects being played byAVAudioEngine
SDK Version
2.2.1. This is a regression from 2.0.19. I have not tested releases between these.
iOS/macOS Version
Reproduced on iOS 17.7.2 and iOS 18.4b1
Xcode Version
16.2.0 (Swift 6 mode)
Steps to Reproduce
AudioManager.shared.isLegacyMuteMode = true
room.localParticipant.setMicrophone(enabled: false)
Expected behavior
Microphone input is muted, and other audio is not muted.
The text was updated successfully, but these errors were encountered: