Ejemplo n.º 1
0
    // Token: 0x06000057 RID: 87 RVA: 0x000033B4 File Offset: 0x000015B4
    private void linkVoice(int playerId, byte voiceId, VoiceInfo voiceInfo, PhotonVoiceSpeaker speaker)
    {
        speaker.OnVoiceLinked(voiceInfo.SamplingRate, voiceInfo.Channels, voiceInfo.FrameDurationSamples, PhotonVoiceSettings.Instance.PlayDelayMs);
        KeyValuePair <int, byte> key = new KeyValuePair <int, byte>(playerId, voiceId);
        PhotonVoiceSpeaker       x;

        if (this.voiceSpeakers.TryGetValue(key, out x))
        {
            if (x == speaker)
            {
                return;
            }
            Debug.LogFormat("PUNVoice: Player {0} voice #{1} speaker replaced.", new object[]
            {
                playerId,
                voiceId
            });
        }
        else
        {
            Debug.LogFormat("PUNVoice: Player {0} voice #{1} speaker created.", new object[]
            {
                playerId,
                voiceId
            });
        }
        this.voiceSpeakers[key] = speaker;
    }
Ejemplo n.º 2
0
 private void linkVoice(int playerId, byte voiceId, Voice.VoiceInfo voiceInfo, PhotonVoiceSpeaker speaker)
 {
     speaker.OnVoiceLinked(voiceInfo.SamplingRate, voiceInfo.Channels, voiceInfo.FrameDurationSamples, PhotonVoiceSettings.Instance.PlayDelayMs);
     var key = new VoiceIdPair(playerId, voiceId);
     PhotonVoiceSpeaker oldSpeaker;
     if (this.voiceSpeakers.TryGetValue(key, out oldSpeaker))
     {
         if (oldSpeaker == speaker)
         {
             return;
         }
         else
         {
             Debug.LogFormat("PUNVoice: Player {0} voice #{1} speaker replaced.", playerId, voiceId);
         }
     }
     else
     {
         Debug.LogFormat("PUNVoice: Player {0} voice #{1} speaker created.", playerId, voiceId);
     }
     this.voiceSpeakers[key] = speaker;
 }
Ejemplo n.º 3
0
    private void linkVoice(int playerId, byte voiceId, Voice.VoiceInfo voiceInfo, PhotonVoiceSpeaker speaker)
    {
        speaker.OnVoiceLinked(voiceInfo.SamplingRate, voiceInfo.Channels, voiceInfo.EncoderDelay, PhotonVoiceSettings.Instance.PlayDelayMs);
        var key = new VoiceIdPair(playerId, voiceId);
        PhotonVoiceSpeaker oldSpeaker;

        if (this.voiceSpeakers.TryGetValue(key, out oldSpeaker))
        {
            if (oldSpeaker == speaker)
            {
                return;
            }
            else
            {
                Debug.Log("PUNVoice: Player " + playerId + " voice #" + voiceId + " speaker replaced");
            }
        }
        else
        {
            Debug.Log("PUNVoice: Player " + playerId + " voice #" + voiceId + " speaker created");
        }
        this.voiceSpeakers[key] = speaker;
    }