Change microphone issue

Options
STak4
STak4
edited February 2023 in Photon Voice

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

  • vadim
    Options

    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()

  • STak4
    STak4
    edited February 2023
    Options

    @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!