/// <summary> /// Used to lazily initialize the decoder to make sure we're /// using the correct output format, this way we don't end up /// creating more decoders than we need. /// </summary> /// <param name="outputFormat"></param> // Token: 0x06000173 RID: 371 RVA: 0x00004C0D File Offset: 0x00002E0D internal void Initialize(AudioFormat outputFormat) { if (this.Decoder != IntPtr.Zero) { Interop.OpusDestroyDecoder(this.Decoder); } this.AudioFormat = outputFormat; this.Decoder = Interop.OpusCreateDecoder(outputFormat); }
/// <summary> /// Disposes of this Opus decoder. /// </summary> // Token: 0x06000174 RID: 372 RVA: 0x00004C3F File Offset: 0x00002E3F public void Dispose() { if (this._isDisposed) { return; } this._isDisposed = true; if (this.Decoder != IntPtr.Zero) { Interop.OpusDestroyDecoder(this.Decoder); } }