Photon voice's big bug!!!!!!!!!!!I cannot be heard when re-joining the room.
Options
harlan
✭
My test has two users, when they first join the room ,all things are fine, they can hear each other .And the two persons' photon view IDs are 1001 and 2001.But when someone quits the room and rejoin, this person's voice cannot be heard by the first person(that is always in the room),because the following codes cannot be reached:
internal void OnRemoteVoiceInfo(VoiceInfo voiceInfo, ref RemoteVoiceOptions options)
{
options.OnDecodedFrameFloatAction += this.OnAudioFrame;
options.OnRemoteVoiceRemoveAction += this.OnRemoteVoiceRemove;
this.audioOutput.Start(voiceInfo.SamplingRate, voiceInfo.Channels, voiceInfo.FrameDurationSamples, this.PlayDelayMs);
}
And the cause is that the rejoiner's photon view ID is not got by the first person correctly, now the rejoiner's photon view ID becomes to 3001, but the ID transferred to the first person is still 2001, so the follow warning happens:
internal override Speaker SimpleSpeakerFactory(int playerId, byte voiceId, object userData)
{
..........
PhotonView photonView = PhotonView.Find(photonViewId);
if (photonView == null)
{
if (this.Logger.IsWarningEnabled)
{
// the following warning happens.
this.Logger.LogWarning("No PhotonView with ID {0} found. Remote voice {1}/{2} not linked.", userData, playerId, voiceId);
}
return null;
}
}
So I want to know why the Photon server cannot update the photon View ID correctly??We user self hosted Photon Server ,PUN2 and photon voice 2
internal void OnRemoteVoiceInfo(VoiceInfo voiceInfo, ref RemoteVoiceOptions options)
{
options.OnDecodedFrameFloatAction += this.OnAudioFrame;
options.OnRemoteVoiceRemoveAction += this.OnRemoteVoiceRemove;
this.audioOutput.Start(voiceInfo.SamplingRate, voiceInfo.Channels, voiceInfo.FrameDurationSamples, this.PlayDelayMs);
}
And the cause is that the rejoiner's photon view ID is not got by the first person correctly, now the rejoiner's photon view ID becomes to 3001, but the ID transferred to the first person is still 2001, so the follow warning happens:
internal override Speaker SimpleSpeakerFactory(int playerId, byte voiceId, object userData)
{
..........
PhotonView photonView = PhotonView.Find(photonViewId);
if (photonView == null)
{
if (this.Logger.IsWarningEnabled)
{
// the following warning happens.
this.Logger.LogWarning("No PhotonView with ID {0} found. Remote voice {1}/{2} not linked.", userData, playerId, voiceId);
}
return null;
}
}
So I want to know why the Photon server cannot update the photon View ID correctly??We user self hosted Photon Server ,PUN2 and photon voice 2
0
Comments
-
Hi @harlan,
Thank you for choosing Photon!
We have fixed this already.
Did you update to Photon Voice 2.1?
If that's the case, does this happen with our DemoVoicePun scene?
The Recorder needs to be initialized properly with the correct ViewID when the local player enters the room.0 -
Hi @harlan,Does photon server side have updates?IWhat do you mean? You mean self-hosted Photon Server SDK? Yes we will release an update to that SDK at some point. If you mean Photon Cloud then of course we constantly update and improve it with fixes, enhancements and sometimes new features.0
-
Hi @harlan,
No need to import PUN2 and Photon Voice 2 separately.
Photon Voice 2 already includes PUN2 and with each Photon Voice2 update we try to include the most up-to-date PUN2 version.
The recommended approach is to import Photon Voice 2 only and use the PUN2 version that comes with it for 100% compatibility.
I see that you do not use the latest Photon Server SDK version, any reason preventing you from updating?
It should work and as you say "it seems OK" then it does work.0 -
@JohnTube thanks,We will upgrade server soon.
public const string PunVersion = "2.4";
I saw that the Photon voice 2.1.1 now use PUN2.4 but not PUN 2.5 as the Photon voice release notes said:
- Fixed Unity Editor freezing when using Voice 2 with PUN 2
- Updated PUN 2 to 2.5
Another question, when someone speaks to me, can I get his voice volume in Speaker?0 -
hi @harlan,
I see, thanks for your report.
We will update Photon Voice soon and fix the PUN version soon.
Sorry for the inconvenience.Another question, when someone speaks to me, can I get his voice volume in Speaker?Yes but it's not available out-of-the-box, you need to sync a value (send it to all other players you are talking to) that is available in theRecorder.LevelMeter.CurrentAvgAmp
.0 -
hi @harlan,Did I get the right package??Yes.
There are different versions for different things:
- PhotonSocketServer (Core)
- PhotonControl
- Photon Server SDK (SDK)
For simplicity, we ask for the latter only which should be in the file name or in the "version.txt" under "deploy/bin_XXX" folder.0