Change microphone issue
The whole answer can be found below.
Try Our
Documentation
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.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Change microphone issue
STak4
2023-02-24 00:54:51
Hi.
I found an issue about changing microphone on latest Photon Voice.
A micropone seems to be switched, but no audio is heared after noises.
Photon.Voice.Unity.Recorder.MicrophoneDevice = new DeviceInfo(Microphone.devices[index]);
A minimum reproducible project(Unity2020.3.40f1) is here.
https://mega.nz/file/MjBkGbTT#MFSAscjHMfeQBaJcVUE9KlFOncY7EzCx0rKG7Ajz7q4
The scene name is SwitchMicrophoneIssue.unity(Assets/SwitchMicrophoneIssue.unity)
Please set your PUN Ids for voice chat.
The project based on Photon Voice Package's demo(DemoVoiceMinimal)
Environments:
Unity 2020.3.40f1
Photon Voice 2.51
Standalone(.exe/Editor)
Comments
Hi,
Do you have any errors or warnings in the log?
A microphone device from the Unity microphone list (Microphone.devices) is good only for Unity mic type. Make sure that recorder.MicrophoneType is set to Unity.
In Photon mic type mode, use the device enumerator provided by Photon: Platform.CreateAudioInEnumerator()
@vadim
In Photon mic type mode, use the device enumerator provided by Photon: Platform.CreateAudioInEnumerator()
Oh, I didn't know that. It works. Thank you!
Back to top