Room leaving, speaker can't be created again

AndyWasHere
edited July 2018 in Photon Voice
Hello,

Issue: All players are in a room and can hear each other. Then they all leave the room and go back to Lobby. One player creates a new room and joins. Other players will join that new room, but no one can hear each other.

Normally, console would show PUNVoice: Player 2 voice #1 speaker created, PUNVoice: Player 2 voice #1 speaker linked etc.
We found that upon entering another room, the players' speakers are not created, and thus not linked, and so no one can hear each other.

In our scripts, we are not doing anything to interfere with the creation or linking process. The only reference to PhotonVoiceSpeaker is on our character prefabs, of which we're only using to detect if the speaker is saying something via speaker.IsPlaying in an Update. We also have no reference to PhotonVoiceNetwork singleton as we're fine with the default settings (auto-disconnect is checked off).

Is this some sort of timing issue on PhotonVoiceNetwork's end? It takes approximately 10 seconds to load in the scenes. Our character prefabs spawn immediately after loading.

Unity: 2018.1.2f.1
PUNVoice: 1.16

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @AndyWasHere,

    auto-disconnect is checked off
    This could be the issue. Your players are leaving the PUN room but they remain joined to the same voice room because AutoDisconnect is disabled. However, voice client should switch voice rooms as soon as the PUN client joins a new room. We will investigate. In the meantime, you should try setting AutoDisconnect to true and try again to see if that resolves the issue. By the way, is there any reason why AutoDisconnect is off?
  • AndyWasHere
    edited July 2018
    Hi John,

    I see, I believe the reason it was off was due to this reason:
    https://forum.photonengine.com/discussion/10842/opus-egpv-dll-caused-an-access-violation-0xc0000005#latest

    It was a long while ago though. I haven't gone back to fiddling with the settings since everything was fine up until now. I'll re-enable Auto-Disconnect and update on results.
  • Enabling Auto-Disconnect resolved our issue. Thanks for the pointer John!