Second Player joining no sound

Deadking99
edited May 2017 in Photon Voice
The second player joining the room is not giving any sound output. In the default animation I can clearly see that the sound is working but no audio is there. I have added two audio listeners one in player and other in the room. Player1 to all player or individual is working but not from the players to the first player or to other players (not player 1) Previously it was working but not now. Before I tried adding ptt private btn gameobject from the prefab for individual talk btn. I removed thinking it caused the error but it is not working even after removing. what should I do

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited May 2017
    The title of this discussion "Second Player joining in ptt demo no sound" suggests that there is an issue with the PTT demo itself. Which is not the case, that's why I will change it.

    I can't understand what you are describing here.
    Maybe a code snippet, screenshots or a video would help.

    You are opening multiple discussions (3 up until now) for the problem you are facing. Please keep the discussion in a single place.
    I already posted a proposed solution for your use case here. From this post it looks like you did not follow what I suggested.
    If I understand correctly you want all players other than player 1 to be able to talk to player 1 and only player 1 can hear everyone else.
    No need to use everything from the PTT demo or keep same exact logic.

    1. When player 1 joins the voice room, player 1 subscribes to one audio group of your choice, e.g. 1:
    byte groupToListenTo = 1;
    PhotonVoiceNetwork.Client.ChangeAudioGroups(new byte[0], new byte[1] {groupToListenTo});
    2. You need a single button displayed for all players except player 1.
    3. When you click on this button from any player other than player 1 you call this to transmit to player 1:
    byte targetAudioGroup = 1;
    photonVoiceRecorder.AudioGroup = targetAudioGroup;
    photonVoiceRecorder.Transmit = true;
    Please note that the demos are there to expose features and are meant to be an example and not a template.
  • Deadking99
    edited May 2017
    okay
  • @JohnTube Thanks I understand and I will keep in mind for posting only here now. It would be better if you see yourself. Can you tell me an email so I can send a sample project for you to see
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited June 2017
    Hi @Deadking99,

    I apologize about the delay.
    Let's start by answering your questions I don't think you need to send us the project yet.
    I think I got your use case and I explained to you the approach I suggested.
    So what is still missing and preventing you from achieving what you want?
  • @JohnTube Hey, I have another question, if the distance for the player is increased from one another is the voice going to be low from both sides, And if yes then how can I make the voice volume same for all the players
  • JohnTube
    JohnTube ✭✭✭✭✭
    You need to change the settings of the AudioSource component of the GameObject where PhotonVoiceSpeaker is attached. We consider this a Unity question.