Quest 2 Device Pause Unity Microphone Error
Since Quest OS Version 39 (now 40) the device pause we had working now fails with the following error
E/Unity: Starting microphone failed: "An error occured that wasn't supposed to. Contact support. " (33) UnityEngine.Microphone:Start(String, Boolean, Int32, Int32) Photon.Voice.Unity.UnityMicrophone:Start(String, Boolean, Int32, Int32) Photon.Voice.Unity.MicWrapper:.ctor(String, Int32, ILogger) Photon.Voice.Unity.Recorder:CreateLocalVoiceAudioAndSource() Photon.Voice.Unity.Recorder:Setup() Photon.Voice.Unity.Recorder:StartRecordingInternal() Photon.Voice.Unity.Recorder:StartRecording()
I am fishing to see if anyone has come across a similar problem. We have spent a few weeks on this and haven't got any closer to a solution. We also can't replicate it outside of our application, which doesn't help.
- Unity 2020.3.35f1
- Photon Voice 2.31
- Quest OS version 40
- Oculus Integration 40
We use the Microphone Type Unity for a variety of reasons, related to previous discussions. However if we switch to Photon for the Microphone Type the application never receives the OnApplicationPause to unpause it.
However, we use the following to manage the state
dependant on logic these on pause call
AudioListener.pause = true; recorder.StopRecording();
on un-pause we call
AudioListener.pause = false; recorder.StartRecording();
At that point we get the error at the start.
Once the error occurs we have no audio and have to restart the application to get it back. Everything else works perfectly.