Help with Audio Groups

I can't seem to get the following to work.

3 players:
Player A - group 1
Player B - group 2
Player C - group 1

Player A should be able to hear Player C
Player B should be able to hear ALL Players
Player C should be able to hear Player A

This is how I believe it should work but it's not working for me:

Player A:
PhotonVoiceNetwork.Client.GlobalAudioGroup = 1;

Player B:
PhotonVoiceNetwork.Client.GlobalAudioGroup = 2;
// remove all audio groups, and allow player to hear group 1
PhotonVoiceNetwork.Client.ChangeAudioGroups(new byte[0], new byte[1] {1 });

Player C:
PhotonVoiceNetwork.Client.GlobalAudioGroup = 1;

Any ideas why that isn't working? Both Player A and C work fine, but B can't hear A or C even though I have added it.

Comments

  • Hi @SniperED007,

    Thank you for choosing Photon!

    GlobalAudioGroup is meant for incoming and outgoing audio group to be the same.
    Voice Client can subscribe and hear multiple groups but talk to a single group.

    Please try subscribing player B to all audio groups:
    Player B:
    PhotonVoiceNetwork.Client.ChangeAudioGroups(null, new byte[0]);
    
  • I had already tried that, but it didn't work either.
    The wording is confusing, as you say "Voice Client can subscribe and hear multiple groups but talk to a single group"
    If I am in Group 1 and can only talk to a single group (Group 1) then how is it possible for other players in other groups to hear my group, if they could hear my group then surely their isn't actually a limit of talking to a single group?
  • edited May 4
    Ok, got it working, I changed the order like this, my previous one had it the other way around: (as in first setting the ChangeAudioGroups and then the GlobalAudioGroup)

    PhotonVoiceNetwork.Client.GlobalAudioGroup = 2;
    PhotonVoiceNetwork.Client.ChangeAudioGroups(new byte[0], new byte[0]);
Sign In or Register to comment.