// Message sent by PhotonVoiceRecorder void PhotonVoiceCreated(PhotonVoiceRecorder.PhotonVoiceCreatedParams p) { if (p.Voice is Voice.LocalVoiceAudioFloat) { ((Voice.LocalVoiceAudioFloat)p.Voice).AddPreProcessor(new ProcessorFloat(p.AudioSource.SamplingRate / 2, 0.3f)); UnityEngine.Debug.Log("DelayProcessor: ProcessorFloat added to local voice pipeline"); } else if (p.Voice is Voice.LocalVoiceAudioShort) { ((Voice.LocalVoiceAudioShort)p.Voice).AddPreProcessor(new ProcessorShort(p.AudioSource.SamplingRate / 2, 0.3f)); UnityEngine.Debug.Log("DelayProcessor: ProcessorShort added to local voice pipeline"); } else { UnityEngine.Debug.LogError("DelayProcessor: Only float and short voices are supported. Trying to add processor to " + p.Voice.GetType()); } }
// Token: 0x0600008F RID: 143 RVA: 0x000042F0 File Offset: 0x000024F0 private void PhotonVoiceCreated(PhotonVoiceRecorder.PhotonVoiceCreatedParams p) { if (p.Voice is LocalVoiceAudioFloat) { ((LocalVoiceAudioFloat)p.Voice).AddPreProcessor(new LocalVoiceFramed <float> .IProcessor[] { new DelayProcessor.ProcessorFloat(p.AudioSource.SamplingRate / 2, 0.3f) }); Debug.Log("DelayProcessor: ProcessorFloat added to local voice pipeline"); return; } if (p.Voice is LocalVoiceAudioShort) { ((LocalVoiceAudioShort)p.Voice).AddPreProcessor(new LocalVoiceFramed <short> .IProcessor[] { new DelayProcessor.ProcessorShort(p.AudioSource.SamplingRate / 2, 0.3f) }); Debug.Log("DelayProcessor: ProcessorShort added to local voice pipeline"); return; } Debug.LogError("DelayProcessor: Only float and short voices are supported. Trying to add processor to " + p.Voice.GetType()); }
void PhotonVoiceCreated(PhotonVoiceRecorder.PhotonVoiceCreatedParams p) { this.PhotonVoiceCreated(p.Voice); }