Android speakerphone audio: Mono or stereo

On Android, Vivox downmixes stereo output into mono output when it detects that the speakerphone is in use. Vivox downmixes the audio output because many Android devices play mono in speakerphone mode. Some devices only play one channel when provided with stereo audio, which makes the panning of 3D channels detrimental.

You can control whether speakerphone downmixing occurs for all devices by providing a list of exceptions by listing which brands, models, and devices to exclude. To change the default speakerphone downmix behavior, add an Android meta-data name-value pair to your application's AndroidManifest.xml. You can learn more about Android meta-data tags in the official Android documentation (Android Developer Documentation).

The metadata name to use is:

"com.vivox.sdk.downmix_speakerphone_enabled"

Note: There's a default exception that disables speakerphone downmix for Meta/Oculus devices. Changing this value overwrites this default exception. The value must be a string starting with either true or false. To add a list of exceptions, add a comma after true or false and start a comma-delimited list of substrings to search for in the string generated for the current device, formatted as "BRAND MODEL DEVICE". The value string is case-insensitive.

The following are examples of valid value strings:

  • "true"
  • "false"
  • "true,brand,brand_two model,model_two"
  • "false,model_three device,device_two"

Note: Replace the example brands, models, and devices with values retrieved by android.os.Build.* strings.

The following is an example of disabling downmixing on Samsung devices:

“true,samsung"

To modify your application's AndroidManifest.xml, refer to the Unity documentation on Overriding the Android app manifest.