The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on Voice.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Android Volume Controls Broken By Photon Voice

2020-10-08 22:52:36


I am developing for Oculus Quest and have just updated to Photon Voice 2. If I use a voice recorder with the Photon microphone type, the hardware volume controls do not work.

I can use the Unity microphone type, but I thought this should be reported.


2020-10-13 13:07:41

Hi @Mandelboxed,

Thank you for choosing Photon and for your report!

What Photon Voice version is this?
When you use Photon microphone type for Android, what options do you enable from the Recorder?
You can set those in Recorder Inspector or via Recorder.SetAndroidNativeMicrophoneSettings.
The ones available (and disabled/off/false by default) are: Acoustic Echo Cancellation, Automatic Gain Control and Noise Suppression.

2020-10-27 01:16:02

I'm getting the same problem. On Photon mic type it just doesn't work no matter how many times I try.
If I switch to Unity, it doesn't work on the first run. But if I close the app and try again it works. Might be because the first run I have to accept the mic permissions.

2020-11-02 14:21:52

I'm running into the same problems. Buttons not responding at all when mic is in 'Photon' mode. When in 'Unity' mode, the buttons only work the second time the app is launched (and microphone permission is granted).
I'd love to download the previous version of Photon Voice 2 to see if this fixes the problem, but there doesn't seem to be a download archive available.

My settings:

2020-11-03 17:04:50

Hi @michiel,

Thank you for choosing Photon!

@ everyone:

This could be by design when using Photon microphone type, as it's a compromise (to be able to achieve audio effects AGC, AEC, etc., the app needs to have control over system volume?) in native Android plugin when using certain Android API values/calls.
my colleague @vadim will take a look when possible and see if we can avoid this.

Thank you for your patience and understanding!

2020-11-23 21:54:11

@JohnTube any update on this issue? I thought I fixed this by having the permissions show up before you connect to photon, but now I have another problem. The volume cannot be adjusted any time the game is launched if I DO NOT accept the mic permissions.

2020-11-25 20:07:55

@CheeseBrownie wrote: »

@JohnTube any update on this issue? I thought I fixed this by having the permissions show up before you connect to photon, but now I have another problem. The volume cannot be adjusted any time the game is launched if I DO NOT accept the mic permissions.

Seems like I was able to do a band-aid fix by disabling the gameobject with my Photon Speaker component. I'm able to adjust volume with mic permissions off but I'm not able to hear other people talk anymore.

2020-11-27 15:37:21

Hi all,

I'm forwarding my colleague @vadim's input here:

There are several volume sliders (4) on Android.

  • Media volume: Music, videos, games, other media
  • Call volume: Volume of the other person during a call
  • Ring volume: Phone calls, notifications
  • Alarm volume

Depending on audio session mode, the system chooses automatically which slider to assign to hardware buttons. Read more here.

Photon mic type switches device to voice call mode to be able to use hardware AEC.
I suspect that in this case volume buttons adjust Call volume.
This volume does not affect Unity output which is most likely controlled by Media volume.

You could try to switch to the Media volume slider when changing volume.

You could also use Unity microphone type with WebRtcAudioDsp, it has AEC, NoiseSuppression, AGC and even a better VAD.

2020-12-11 13:22:52

I created an Android library (aar) and added it to the Unity project. It cycles through all available volume control streams, but the ability to change the volume using the headset buttons never works. So it doesn't appear to be an issue with that..

Java code:

Unity code:

2020-12-13 22:45:30

Hi @michiel,

Thanks for your report and your efforts to try to work around this.
My colleague @vadim will take a look and chime in.

2021-02-05 19:49:16

Can confirm this still is an issue in latest version of PhotonVoice, on Oculus Quest (which only has one hardware option for volume control) Using microphone type 'Photon'

2021-02-05 20:59:46

@michiel script also did not work for me

2021-02-19 16:46:37

we have added this to the documentation here.
but @vadim just made an Android plugin that makes media volume follow call volume when using Photon microphone type and Recorder 'is recording'. So when you use Photon mic and change volume via hardware buttons all output volume should be updated accordingly (media + call).
I hope this is the behaviour you were looking for.
Although it's not the Android's normal behaviour.
Anyway, we were hoping you could test this on your end on Oculus and see if it works and if you are happy with it.
if it's the case we could improve it a bit more to work only when needed (when Recorder is recording and when Photon mic is used)
grab files here: just add AndroidVolumeSync component next to Recorder and build again.
there is a demo video to show behaviour.
you need Unity 2018.2+

2021-02-26 21:24:51

I'm using this fix for a Oculus Quest build with Voice 2, it seems to be working but every time you press the volume up/down button, the meter on the on screen display goes up or down by 3 instead of 1. This only happens with new app install, after you quit the app and play again everything's fine.

2021-03-10 08:44:45

And I will add that if you try to connect the headphones (via Bluetooth or the standard one) they will not work. And it's the issue.

2021-08-12 10:37:22

Hello, since latest oculus firmware update V31, whenever you press the volume buttons both AudioManager.STREAM_MUSIC and AudioManager.STREAM_VOICE_CALL change volume at the same time. This makes the trick of 'making media volume follow call volume' not working anymore.
Additionally it seems that volume buttons only command the STREAM_MUSIC, and something internally oculus side tries to replicate the change onto other streams (my logs inside the observer declared in AndroidVolumeSync).

Unfortunately, now, it seems that the call volume does not go down for real anymore.

@JohnTube @vadim could you please update your oculus quest and check how is the situation now? It would be much appreciated.

2021-08-12 13:57:53

Hi @max_one,

Thank you for choosing Photon and for reporting this.

We will take a look but I can't promise anything and this may take a while.
So we rely on your patience and understanding.

Meanwhile you could try to adjust @vadim's script if possible or find an alternative solution.

And I think, just to confirm, you can still use Unity microphone type right?
With WebRtcAudioDsp next to Recorder, you're good to go?
So this is not a blocker.

Back to top