예제 #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());
            }
        }