zoom-video-sdk-android-2.2.10
I’m trying to enable auto adjust mic volume in my app, but it seems to have no effect on the volume received by other users. All the users in the test setup are using the same app build.
I’ve tried setting this when joining the session as below:
val sdk = ZoomVideoSDK.getInstance()
val sessionContext = ZoomVideoSDKSessionContext().apply {
audioOption = ZoomVideoSDKAudioOption().apply {
connect = true
mute = false
isMyVoiceInMix = false
autoAdjustSpeakerVolume = normaliseSpeakers.value
}
videoOption = ZoomVideoSDKVideoOption().apply {
localVideoOn = true
}
sessionName = iglooID
userName = familyID
token = jwtToken
virtualAudioMic = ZoomAudioCapturer(activity.applicationContext)
virtualAudioSpeaker = audioRenderer!!
externalVideoSource = videoCapturer!!
}
sdk.audioSettingHelper.apply {
enableMicOriginalInput(false) // keep Zoom processing on
enableAutoAdjustMicVolume(true) // AGC on
}
activity.runOnUiThread {
sdk.joinSession(sessionContext)
callbacks.onConnectSuccess()
}
This thread EnableAutoAdjustMic and IsAutoAdjustMicEnabled not working suggests that the state of the meeting must be at least “connecting” for the settings changes to work, so to test that I have instead put this code in the onSessionJoined listener.
private val zoomListener = object : ZoomVideoSDKDelegate {
override fun onSessionJoin() {
Timber.i("Joined zoom session")
val sdk = ZoomVideoSDK.getInstance()
sdk.audioSettingHelper.apply {
enableMicOriginalInput(false) // keep Zoom processing on
enableAutoAdjustMicVolume(true) // AGC on
}
}
This also had no effect. Finally, I bound this to a button click, so it could be controlled during a call.
Button(
onClick = {
normaliseMics = !normaliseMics
val sdk = ZoomVideoSDK.getInstance()
sdk.audioSettingHelper.apply {
enableMicOriginalInput(false) // keep Zoom processing on
enableAutoAdjustMicVolume(normaliseMics) // AGC on
}
val autoMic = sdk.audioSettingHelper.isAutoAdjustMicVolumeEnabled
Timber.i("Auto mic enabled: $autoMic")
}
) {
Text("Norm Mic")
}
The log messages print the expected value for autoMic
but no changes to the sound are observed.
What are the requirements for when these settings can be changed, and is there something missing from my code? I’m using a custom audio capturer and renderer, however neither is doing any kind of gain control that could conflict with these settings. Do we expect this to work with custom capturers/renderers?
Thanks,
Michael