diff --git a/src/client.cpp b/src/client.cpp index 01239a46..54bfc0bd 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -92,8 +92,8 @@ CClient::CClient ( const quint16 iPortNumber, opus_custom_encoder_ctl ( OpusEncoderMono, OPUS_SET_APPLICATION ( OPUS_APPLICATION_RESTRICTED_LOWDELAY ) ); -#ifdef USE_LOW_COMPLEXITY_CELT_ENC - // set encoder low complexity +#if ( SYSTEM_FRAME_SIZE_SAMPLES == 128 ) + // set encoder low complexity for legacy 128 samples frame size opus_custom_encoder_ctl ( OpusEncoderMono, OPUS_SET_COMPLEXITY ( 1 ) ); #endif @@ -115,8 +115,8 @@ CClient::CClient ( const quint16 iPortNumber, opus_custom_encoder_ctl ( OpusEncoderStereo, OPUS_SET_APPLICATION ( OPUS_APPLICATION_RESTRICTED_LOWDELAY ) ); -#ifdef USE_LOW_COMPLEXITY_CELT_ENC - // set encoder low complexity +#if ( SYSTEM_FRAME_SIZE_SAMPLES == 128 ) + // set encoder low complexity for legacy 128 samples frame size opus_custom_encoder_ctl ( OpusEncoderStereo, OPUS_SET_COMPLEXITY ( 1 ) ); #endif diff --git a/src/global.h b/src/global.h index a6fa0b90..6e2040ab 100755 --- a/src/global.h +++ b/src/global.h @@ -129,9 +129,6 @@ LED bar: lbr #define FRAME_SIZE_FACTOR_DEFAULT 2 // 256 (for frame size 128), 128 (for frame size 64) #define FRAME_SIZE_FACTOR_SAFE 4 // 512 (for frame size 128), 256 (for frame size 64) -// low complexity CELT encoder (if defined) -#define USE_LOW_COMPLEXITY_CELT_ENC - // define the minimum allowed number of coded bytes for CELT (the encoder // gets in trouble if the value is too low) #define CELT_MINIMUM_NUM_BYTES 10 diff --git a/src/server.cpp b/src/server.cpp index 5bc68531..3cdcb096 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -266,8 +266,8 @@ CServer::CServer ( const int iNewMaxNumChan, opus_custom_encoder_ctl ( OpusEncoderMono[i], OPUS_SET_APPLICATION ( OPUS_APPLICATION_RESTRICTED_LOWDELAY ) ); -#ifdef USE_LOW_COMPLEXITY_CELT_ENC - // set encoder low complexity +#if ( SYSTEM_FRAME_SIZE_SAMPLES == 128 ) + // set encoder low complexity for legacy 128 samples frame size opus_custom_encoder_ctl ( OpusEncoderMono[i], OPUS_SET_COMPLEXITY ( 1 ) ); #endif @@ -289,8 +289,8 @@ CServer::CServer ( const int iNewMaxNumChan, opus_custom_encoder_ctl ( OpusEncoderStereo[i], OPUS_SET_APPLICATION ( OPUS_APPLICATION_RESTRICTED_LOWDELAY ) ); -#ifdef USE_LOW_COMPLEXITY_CELT_ENC - // set encoder low complexity +#if ( SYSTEM_FRAME_SIZE_SAMPLES == 128 ) + // set encoder low complexity for legacy 128 samples frame size opus_custom_encoder_ctl ( OpusEncoderStereo[i], OPUS_SET_COMPLEXITY ( 1 ) ); #endif