Quantcast
Channel: Photon Voice — Photon Engine
Viewing all articles
Browse latest Browse all 671

Unable to hear voice across Oculus Quests or Oculus Quest and PC-Unity

$
0
0
Hi,

I am using both PUN2 and Photon Voice to create a multiplayer unity experience.

My setup consists of a Lobby Scene, where the players automatically join or create a room and then load a new Unity Scene, containing the multiplayer environment.

The lobby scene creates the connection following the tutorials and finally the masterClient, during the OnJoinedRoom() function call, calls
- PhotonNetwork.LoadLevel("LR Tanker");

My LR Tanker Scene has a "Voice" gameObject, pretty much copied from DemoVoicePun containing the following components:
* Photon Voice Network
- AutoConnect And Join = true;
- AutoLeave And Disconnect = true;
- Create Speaker if Not Found = true;
- DDOL = true;
- Primary Recorder = "Voice (Recorder)" (the voice component in the same gameObject)

* Recorder
- Transmit Enabled = true;
- Auto Start = true;
- Debug Echo = true;

My Player Prefab is a OVR Dummy made up of 3 networked individual objects, Left and Right hand, both with a photon view component and a Head with:
- Photon View
- Audio Source
- Photon Voice View
- Recorder
- Speaker
- Mic Amplifier
replicating the components appearing in the ZomBear, ZomBunny, ... of the Voice Demo.

I instantiate the object as such:
- GameObject PLM = PhotonNetwork.Instantiate("NetworkedPlayerMaster", spawnPos, Quaternion.identity, 0);

I am logging the following fields in my instantiated prefabs (clients)
Start()
{
photonVoiceView = GetComponent<PhotonVoiceView>();
punVoiceNetwork = PhotonVoiceNetwork.Instance;
recorder = Voice.GetComponent<Recorder>();

PhotonView pv = GetComponent<PhotonView>();

photonVoiceView.Init();
recorder.StopRecording();
recorder.StartRecording();

Debug.LogWarningFormat("PhotonView ViewId {0}", pv.ViewID);

Debug.LogWarningFormat("PunVoiceNetwork isActiveAndEnabled {0}", punVoiceNetwork.isActiveAndEnabled);
Debug.LogWarningFormat("PunVoiceNetwork clientState {0}", punVoiceNetwork.ClientState);

Debug.LogWarningFormat("PhotonVoiceView isSetup {0}", photonVoiceView.IsSetup);
Debug.LogWarningFormat("PhotonVoiceView isRecorder {0}", photonVoiceView.IsRecorder);
Debug.LogWarningFormat("PhotonVoiceView isSpeaker {0}", photonVoiceView.IsSpeaker);

Debug.LogWarningFormat("Recorder IsInitialized {0}", recorder.IsInitialized);
Debug.LogWarningFormat("Recorder IsRecording {0}", recorder.IsRecording);
Debug.LogWarningFormat("Recorder TransmitEnabled {0}", recorder.TransmitEnabled);
Debug.LogWarningFormat("Recorder IsCurrentlyTransmitting {0}", recorder.IsCurrentlyTransmitting);

Debug.LogWarningFormat("PhotonVoiceView isSpeakerLinked {0}", photonVoiceView.SpeakerInUse.IsLinked);

Speaker sp = GetComponent<Speaker>();
Debug.LogWarningFormat("Speaker isLinked {0}", sp.IsLinked);
}

Also the same Logs in the Update method, except for the Init() and Stop/Start Recording calls.
Once the "clientState" is "joined" my logs read the following.

PhotonView ViewId 1002

PunVoiceNetwork isActiveAndEnabled True
PunVoiceNetwork clientState Joined

PhotonVoiceView isSetup True
PhotonVoiceView isRecorder False
PhotonVoiceView isSpeaker True

Recorder IsInitialized True
Recorder IsRecording True
Recorder TransmitEnabled True
Recorder IsCurrentlyTransmitting False

PhotonVoiceView isSpeakerLinked False
Speaker isLinked False


At best I hear about one second of audio via the Debug Echo, at the beginning, which then loops indefinitely.
I cannot hear audio across devices.

I have tried multiple things and I am running out of ideas. Some help would be appreciated.

Viewing all articles
Browse latest Browse all 671

Trending Articles