diff --git a/src/client.cpp b/src/client.cpp index bbdff02c..90a25454 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -1094,8 +1094,9 @@ void CClient::ProcessAudioDataIntern ( CVector& vecsStereoSndCrd ) &vecCeltData[0], iCeltNumCodedBytes ); } - else #endif + + if ( eAudioCompressionType == CT_OPUS ) { opus_custom_encode ( OpusEncoderMono, &vecsStereoSndCrd[i * SYSTEM_FRAME_SIZE_SAMPLES], @@ -1116,8 +1117,9 @@ void CClient::ProcessAudioDataIntern ( CVector& vecsStereoSndCrd ) &vecCeltData[0], iCeltNumCodedBytes ); } - else #endif + + if ( eAudioCompressionType == CT_OPUS ) { opus_custom_encode ( OpusEncoderStereo, &vecsStereoSndCrd[i * 2 * SYSTEM_FRAME_SIZE_SAMPLES], @@ -1164,8 +1166,9 @@ void CClient::ProcessAudioDataIntern ( CVector& vecsStereoSndCrd ) iCeltNumCodedBytes, &vecsAudioSndCrdMono[i * SYSTEM_FRAME_SIZE_SAMPLES] ); } - else #endif + + if ( eAudioCompressionType == CT_OPUS ) { opus_custom_decode ( OpusDecoderMono, &vecbyNetwData[0], @@ -1184,8 +1187,9 @@ void CClient::ProcessAudioDataIntern ( CVector& vecsStereoSndCrd ) iCeltNumCodedBytes, &vecsStereoSndCrd[i * 2 * SYSTEM_FRAME_SIZE_SAMPLES] ); } - else #endif + + if ( eAudioCompressionType == CT_OPUS ) { opus_custom_decode ( OpusDecoderStereo, &vecbyNetwData[0], @@ -1208,8 +1212,9 @@ void CClient::ProcessAudioDataIntern ( CVector& vecsStereoSndCrd ) 0, &vecsAudioSndCrdMono[i * SYSTEM_FRAME_SIZE_SAMPLES] ); } - else #endif + + if ( eAudioCompressionType == CT_OPUS ) { opus_custom_decode ( OpusDecoderMono, NULL, @@ -1228,8 +1233,9 @@ void CClient::ProcessAudioDataIntern ( CVector& vecsStereoSndCrd ) 0, &vecsStereoSndCrd[i * 2 * SYSTEM_FRAME_SIZE_SAMPLES] ); } - else #endif + + if ( eAudioCompressionType == CT_OPUS ) { opus_custom_decode ( OpusDecoderStereo, NULL, diff --git a/src/server.cpp b/src/server.cpp index 89128e69..b0d6f3f1 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -759,8 +759,9 @@ void CServer::OnTimer() iCeltNumCodedBytes, &vecvecsData[i][0] ); } - else #endif + + if ( vecChannels[iCurChanID].GetAudioCompressionType() == CT_OPUS ) { opus_custom_decode ( OpusDecoderMono[iCurChanID], &vecbyCodedData[0], @@ -780,8 +781,9 @@ void CServer::OnTimer() iCeltNumCodedBytes, &vecvecsData[i][0] ); } - else #endif + + if ( vecChannels[iCurChanID].GetAudioCompressionType() == CT_OPUS ) { opus_custom_decode ( OpusDecoderStereo[iCurChanID], &vecbyCodedData[0], @@ -805,8 +807,9 @@ void CServer::OnTimer() 0, &vecvecsData[i][0] ); } - else #endif + + if ( vecChannels[iCurChanID].GetAudioCompressionType() == CT_OPUS ) { opus_custom_decode ( OpusDecoderMono[iCurChanID], NULL, @@ -826,8 +829,9 @@ void CServer::OnTimer() 0, &vecvecsData[i][0] ); } - else #endif + + if ( vecChannels[iCurChanID].GetAudioCompressionType() == CT_OPUS ) { opus_custom_decode ( OpusDecoderStereo[iCurChanID], NULL, @@ -888,8 +892,9 @@ void CServer::OnTimer() &vecbyCodedData[0], iCeltNumCodedBytes ); } - else #endif + + if ( vecChannels[iCurChanID].GetAudioCompressionType() == CT_OPUS ) { // TODO find a better place than this: the setting does not change all the time @@ -917,8 +922,9 @@ opus_custom_encoder_ctl ( OpusEncoderMono[iCurChanID], &vecbyCodedData[0], iCeltNumCodedBytes ); } - else #endif + + if ( vecChannels[iCurChanID].GetAudioCompressionType() == CT_OPUS ) { // TODO find a better place than this: the setting does not change all the time