direct use of Q_UNUSED on OPUS calls does not suppress the warning under Linux -> go back to previous implementation

This commit is contained in:
Volker Fischer 2020-06-08 22:02:16 +02:00
parent 1880520f77
commit 9c811782dc

View File

@ -758,6 +758,7 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); // TE
*/ */
// Get data from all connected clients ------------------------------------- // Get data from all connected clients -------------------------------------
// some inits // some inits
int iUnused;
int iNumClients = 0; // init connected client counter int iNumClients = 0; // init connected client counter
bool bChannelIsNowDisconnected = false; bool bChannelIsNowDisconnected = false;
bool bUpdateChannelLevels = false; bool bUpdateChannelLevels = false;
@ -911,11 +912,11 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); // TE
// OPUS decode received data stream // OPUS decode received data stream
if ( CurOpusDecoder != nullptr ) if ( CurOpusDecoder != nullptr )
{ {
Q_UNUSED ( opus_custom_decode ( CurOpusDecoder, iUnused = opus_custom_decode ( CurOpusDecoder,
pCurCodedData, pCurCodedData,
iCeltNumCodedBytes, iCeltNumCodedBytes,
&vecvecsData[i][iB * SYSTEM_FRAME_SIZE_SAMPLES * vecNumAudioChannels[i]], &vecvecsData[i][iB * SYSTEM_FRAME_SIZE_SAMPLES * vecNumAudioChannels[i]],
iClientFrameSizeSamples ) ); iClientFrameSizeSamples );
} }
} }
@ -1044,11 +1045,11 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); // TE
opus_custom_encoder_ctl ( CurOpusEncoder, opus_custom_encoder_ctl ( CurOpusEncoder,
OPUS_SET_BITRATE ( CalcBitRateBitsPerSecFromCodedBytes ( iCeltNumCodedBytes, iClientFrameSizeSamples ) ) ); OPUS_SET_BITRATE ( CalcBitRateBitsPerSecFromCodedBytes ( iCeltNumCodedBytes, iClientFrameSizeSamples ) ) );
Q_UNUSED ( opus_custom_encode ( CurOpusEncoder, iUnused = opus_custom_encode ( CurOpusEncoder,
&vecsSendData[iB * SYSTEM_FRAME_SIZE_SAMPLES * vecNumAudioChannels[i]], &vecsSendData[iB * SYSTEM_FRAME_SIZE_SAMPLES * vecNumAudioChannels[i]],
iClientFrameSizeSamples, iClientFrameSizeSamples,
&vecbyCodedData[0], &vecbyCodedData[0],
iCeltNumCodedBytes ) ); iCeltNumCodedBytes );
} }
// send separate mix to current clients // send separate mix to current clients
@ -1076,6 +1077,8 @@ opus_custom_encoder_ctl ( CurOpusEncoder,
// does not consume any significant CPU when no client is connected. // does not consume any significant CPU when no client is connected.
Stop(); Stop();
} }
Q_UNUSED ( iUnused )
} }
/// @brief Mix all audio data from all clients together. /// @brief Mix all audio data from all clients together.