Green privacy indicator give false feedback when muted (Vivox)

Hello,

We have a problem in our anrdoid game. We’re using vivox. When we join a channel, the green light that indicate to the user the mic is used by the application is turn on even if the mic is mutted. It should be turned off because we’re not using the mic. I tested by leaving the channel and the light turn off. Is there a way to stay in the channel without the green light activated when our mic is mutted because it’s indicate that we use the mic when it’s not.

Is there a known issue? Didn’t find anything about it.

Regards,
Tommy Sirois

Hey Tommy,
“Muting” in the SDK doesn’t stop using the capture device, it only stops the packets from being sent out. This is why the Android microphone indicator stays on. (This enables the case to know if the user is speaking while muted, for example)

To achieve a muting that would turn the indicator off, you would have to change the capture device to “No device”. This page describes audio selection.

The code for the Unity SDK would be:

string noDevice = "No Device";
await VivoxService.Instance.SetActiveInputDeviceAsync(VivoxService.Instance.AvailableInputDevices.Where(device => device.DeviceName == noDevice).First());

Note that this might have a side effect on the audio at the time of reconfiguration. For example, if you’re using a Bluetooth device, doing the above would cause a switch between the Hands-Free-Profile (HFP) to the Advanced Audio Distribution Profile (A2DP) which will change the audio quality to be a bit better and could cause a volume change. The inverse would also be true when setting the capture device back.

Thank you for your quick response and sorry for my late response.

Look like it work but like you said, I’ve the side effect of loosing quality. But we’re still on the 16.0.1 version. We manage Bluetooth directly with Android cause it don’t look like when we connect Bluetooth, some devices and we here the little lady say that the conversation just ended.

Am I missing something about Bluetooth functionalities right now? I’ve seen in 16.0.3 you’ve some Bluetooth functionalities but we would try to not update for now because it’s not possible for the moment.

Regards,
Tommy Sirois

I just realize that even if i’m not using any bluetooth device. switching between “No Device” and “Default System Device” have a big difference on quality sound of the game. When my active input is “No Device” The sound is really clear/clean. When I use “Default System Device”, we lost a little bit of quality. If I use bluetooth, it’s worst.Is it a normal behaviour?

Hey Tommy,

By default, the Bluetooth Hands Free Profile (HFP) is used. This mode allows the usage of the bluetooth device microphone at the cost of lower quality audio.
When you use “No device” as input device, the mode switches to Advanced Audio Distribution Profile (A2DP), which can be used when the Bluetooth device is not used to capture audio, and has better audio quality.

In 16.3.0, we added a new API to the Vivox Unity SDK to allow setting which profile of Bluetooth should be preferred. VivoxConfigurationOptions.BluetoothProfile is the new option.

Hope this helps,
Vincent Gauthier

Hello Vincent,

for us, if we just use vivox, some bluetooth don’t connect to our game. I tried to manage it with native code but still have some problem like sound goind out the phone speaker.

Hi Tommy,

There were improvements to Bluetooth audio for Android since version 16.2.0. Did you update to 16.2.0 or later yet? If a Bluetooth device cannot use the Hands-Free Profile, then on versions before 16.2.0 it likely routes to speakerphone as the next alternative. It’s also possible that if the game’s app doesn’t have Bluetooth permissions it would also route to speakerphone before 16.2.0.

Hey Mhakala,

So I just updated to 16.3.0 because it look like we had bad sound quality even in bluetooth. I will test the result today and will give you update about it.

Thanks

So upgrading to 16.3.0 make the sound perfect IF I don’t update the current input device myself when I mute/unmute to “no device” or “Default System Device”. So I can’t remove the green led when I mute my player. If I do, the sound have weird behavior (The phone speaker selected look to be the earpiece) and in Bluetooth, the quality is bad as it’s not completely stereo anymore.