示例#1
0
        /// <summary> Gets or sets whether Forward Error Correction is enabled. </summary>
        public void SetBitrate(int value)
        {
            int result = Opus.EncoderCtl(_ptr, OpusCtl.SetBitrateRequest, value * 1000);

            if (result < 0)
            {
                throw new Exception(((OpusError)result).ToString());
            }
        }
示例#2
0
        /// <summary> Gets or sets whether Forward Error Correction is enabled. </summary>
        public void SetForwardErrorCorrection(bool value)
        {
            int result = Opus.EncoderCtl(_ptr, OpusCtl.SetInbandFECRequest, value ? 1 : 0);

            if (result < 0)
            {
                throw new Exception(((OpusError)result).ToString());
            }
        }