rename a variable

This commit is contained in:
Volker Fischer 2020-08-02 21:09:31 +02:00
parent 2888af4974
commit c22792495f
2 changed files with 14 additions and 16 deletions

View file

@ -1041,6 +1041,7 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); // TE
vecvecdPannings[i], vecvecdPannings[i],
vecNumAudioChannels, vecNumAudioChannels,
vecvecsIntermediateProcBuf[i], vecvecsIntermediateProcBuf[i],
vecvecsSendData[i],
vecvecbyCodedData[i], vecvecbyCodedData[i],
vecChannels[iCurChanID], vecChannels[iCurChanID],
DoubleFrameSizeConvBufOut[iCurChanID], DoubleFrameSizeConvBufOut[iCurChanID],
@ -1050,8 +1051,7 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); // TE
iCeltNumCodedBytes, iCeltNumCodedBytes,
iClientFrameSizeSamples, iClientFrameSizeSamples,
iCurNumAudChan, iCurNumAudChan,
iNumClients, iNumClients );
vecvecsSendData[i] );
// update socket buffer size // update socket buffer size
vecChannels[iCurChanID].UpdateSocketBufferSize(); vecChannels[iCurChanID].UpdateSocketBufferSize();
@ -1091,6 +1091,7 @@ void CServer::MixEncodeTransmitData ( const CVector<CVector<int16_t> >& vecvecsD
const CVector<double>& vecdPannings, const CVector<double>& vecdPannings,
const CVector<int>& vecNumAudioChannels, const CVector<int>& vecNumAudioChannels,
CVector<double>& vecdIntermProcBuf, CVector<double>& vecdIntermProcBuf,
CVector<int16_t>& vecsSendData,
CVector<uint8_t>& vecbyCodedData, CVector<uint8_t>& vecbyCodedData,
CChannel& Channel, CChannel& Channel,
CConvBuf<int16_t>& DoubleFrameSizeConvBufOut, CConvBuf<int16_t>& DoubleFrameSizeConvBufOut,
@ -1100,8 +1101,7 @@ void CServer::MixEncodeTransmitData ( const CVector<CVector<int16_t> >& vecvecsD
const int iCeltNumCodedBytes, const int iCeltNumCodedBytes,
const int iClientFrameSizeSamples, const int iClientFrameSizeSamples,
const int iCurNumAudChan, const int iCurNumAudChan,
const int iNumClients, const int iNumClients )
CVector<int16_t>& vecsOutData )
{ {
int i, j, k, iUnused; int i, j, k, iUnused;
@ -1164,7 +1164,7 @@ void CServer::MixEncodeTransmitData ( const CVector<CVector<int16_t> >& vecvecsD
// convert from double to short with clipping // convert from double to short with clipping
for ( i = 0; i < iServerFrameSizeSamples; i++ ) for ( i = 0; i < iServerFrameSizeSamples; i++ )
{ {
vecsOutData[i] = Double2Short ( vecdIntermProcBuf[i] ); vecsSendData[i] = Double2Short ( vecdIntermProcBuf[i] );
} }
} }
else else
@ -1232,7 +1232,7 @@ void CServer::MixEncodeTransmitData ( const CVector<CVector<int16_t> >& vecvecsD
// convert from double to short with clipping // convert from double to short with clipping
for ( i = 0; i < ( 2 * iServerFrameSizeSamples ); i++ ) for ( i = 0; i < ( 2 * iServerFrameSizeSamples ); i++ )
{ {
vecsOutData[i] = Double2Short ( vecdIntermProcBuf[i] ); vecsSendData[i] = Double2Short ( vecdIntermProcBuf[i] );
} }
} }
@ -1242,12 +1242,12 @@ void CServer::MixEncodeTransmitData ( const CVector<CVector<int16_t> >& vecvecsD
// is false and the Get() function is not called at all. Therefore if the buffer is not needed // is false and the Get() function is not called at all. Therefore if the buffer is not needed
// we do not spend any time in the function but go directly inside the if condition. // we do not spend any time in the function but go directly inside the if condition.
if ( ( iUseDoubleSysFraSizeConvBuf == 0 ) || if ( ( iUseDoubleSysFraSizeConvBuf == 0 ) ||
DoubleFrameSizeConvBufOut.Put ( vecsOutData, SYSTEM_FRAME_SIZE_SAMPLES * iCurNumAudChan ) ) DoubleFrameSizeConvBufOut.Put ( vecsSendData, SYSTEM_FRAME_SIZE_SAMPLES * iCurNumAudChan ) )
{ {
if ( iUseDoubleSysFraSizeConvBuf != 0 ) if ( iUseDoubleSysFraSizeConvBuf != 0 )
{ {
// get the large frame from the conversion buffer // get the large frame from the conversion buffer
DoubleFrameSizeConvBufOut.GetAll ( vecsOutData, DOUBLE_SYSTEM_FRAME_SIZE_SAMPLES * iCurNumAudChan ); DoubleFrameSizeConvBufOut.GetAll ( vecsSendData, DOUBLE_SYSTEM_FRAME_SIZE_SAMPLES * iCurNumAudChan );
} }
for ( int iB = 0; iB < iNumFrameSizeConvBlocks; iB++ ) for ( int iB = 0; iB < iNumFrameSizeConvBlocks; iB++ )
@ -1255,14 +1255,12 @@ void CServer::MixEncodeTransmitData ( const CVector<CVector<int16_t> >& vecvecsD
// OPUS encoding // OPUS encoding
if ( pCurOpusEncoder != nullptr ) if ( pCurOpusEncoder != nullptr )
{ {
// TODO find a better place than this: the setting does not change all the time // TODO find a better place than this: the setting does not change all the time so for speed
// so for speed optimization it would be better to set it only if the network // optimization it would be better to set it only if the network frame size is changed
// frame size is changed opus_custom_encoder_ctl ( pCurOpusEncoder, OPUS_SET_BITRATE ( CalcBitRateBitsPerSecFromCodedBytes ( iCeltNumCodedBytes, iClientFrameSizeSamples ) ) );
opus_custom_encoder_ctl ( pCurOpusEncoder,
OPUS_SET_BITRATE ( CalcBitRateBitsPerSecFromCodedBytes ( iCeltNumCodedBytes, iClientFrameSizeSamples ) ) );
iUnused = opus_custom_encode ( pCurOpusEncoder, iUnused = opus_custom_encode ( pCurOpusEncoder,
&vecsOutData[iB * SYSTEM_FRAME_SIZE_SAMPLES * iCurNumAudChan], &vecsSendData[iB * SYSTEM_FRAME_SIZE_SAMPLES * iCurNumAudChan],
iClientFrameSizeSamples, iClientFrameSizeSamples,
&vecbyCodedData[0], &vecbyCodedData[0],
iCeltNumCodedBytes ); iCeltNumCodedBytes );

View file

@ -306,6 +306,7 @@ protected:
const CVector<double>& vecdPannings, const CVector<double>& vecdPannings,
const CVector<int>& vecNumAudioChannels, const CVector<int>& vecNumAudioChannels,
CVector<double>& vecdIntermProcBuf, CVector<double>& vecdIntermProcBuf,
CVector<int16_t>& vecsSendData,
CVector<uint8_t>& vecbyCodedData, CVector<uint8_t>& vecbyCodedData,
CChannel& Channel, CChannel& Channel,
CConvBuf<int16_t>& DoubleFrameSizeConvBufOut, CConvBuf<int16_t>& DoubleFrameSizeConvBufOut,
@ -315,8 +316,7 @@ protected:
const int iCeltNumCodedBytes, const int iCeltNumCodedBytes,
const int iClientFrameSizeSamples, const int iClientFrameSizeSamples,
const int iCurNumAudChan, const int iCurNumAudChan,
const int iNumClients, const int iNumClients );
CVector<int16_t>& vecsOutData );
virtual void customEvent ( QEvent* pEvent ); virtual void customEvent ( QEvent* pEvent );