Example #1
0
        // Token: 0x0600015C RID: 348 RVA: 0x000046B8 File Offset: 0x000028B8
        public static IntPtr OpusCreateDecoder(AudioFormat audioFormat)
        {
            OpusError opusError;
            IntPtr    result = Interop._OpusCreateDecoder(audioFormat.SampleRate, audioFormat.ChannelCount, out opusError);

            if (opusError != OpusError.Ok)
            {
                throw new Exception(string.Format("Could not instantiate Opus decoder: {0} ({1}).", opusError, (int)opusError));
            }
            return(result);
        }