private void Awake() { USpeakerList.Add(this); if (base.audio == null) { base.gameObject.AddComponent <AudioSource>(); } base.audio.clip = AudioClip.Create("vc", this.audioFrequency * 10, 1, this.audioFrequency, this._3DMode == ThreeDMode.Full3D, false); base.audio.loop = true; this.receivedData = new float[this.audioFrequency * 10]; this.codecMgr = USpeakCodecManager.Instance; this.lastBandMode = this.BandwidthMode; this.lastCodec = this.Codec; this.last3DMode = this._3DMode; }
void Awake() { USpeakerList.Add(this); if (audio == null) { gameObject.AddComponent <AudioSource>(); } audio.clip = AudioClip.Create("vc", audioFrequency * 10, 1, audioFrequency, (_3DMode == ThreeDMode.Full3D), false); audio.loop = true; receivedData = new float[audioFrequency * 10]; codecMgr = USpeakCodecManager.Instance; lastBandMode = BandwidthMode; lastCodec = Codec; last3DMode = _3DMode; }
// Token: 0x06004CAC RID: 19628 RVA: 0x0019B62C File Offset: 0x00199A2C public static USpeakCodecManager CreateNewInstance() { if (USpeakCodecManager.sDefaultInstance == null) { USpeakCodecManager.sDefaultInstance = (USpeakCodecManager)Resources.Load("CodecManager"); } USpeakCodecManager uspeakCodecManager = UnityEngine.Object.Instantiate <USpeakCodecManager>(USpeakCodecManager.sDefaultInstance); if (uspeakCodecManager == null) { Debug.LogError("USpeakCodecManager: Could not find resource called 'CodecManager' which is required to load codecs!"); } if (Application.isPlaying) { uspeakCodecManager.Codecs = new ICodec[uspeakCodecManager.CodecNames.Length]; for (int i = 0; i < uspeakCodecManager.Codecs.Length; i++) { uspeakCodecManager.Codecs[i] = (ICodec)Activator.CreateInstance(Type.GetType(uspeakCodecManager.CodecNames[i])); } } return(uspeakCodecManager); }
private void Awake() { USpeaker.USpeakerList.Add(this); if (base.audio == null) { base.gameObject.AddComponent<AudioSource>(); } base.audio.clip = AudioClip.Create("vc", this.audioFrequency * 10, 1, this.audioFrequency, this._3DMode == ThreeDMode.Full3D, false); base.audio.loop = true; this.receivedData = new float[this.audioFrequency * 10]; this.codecMgr = USpeakCodecManager.Instance; this.lastBandMode = this.BandwidthMode; this.lastCodec = this.Codec; this.last3DMode = this._3DMode; }