some small re-ordering of code in the server

This commit is contained in:
Volker Fischer 2020-08-02 11:23:21 +02:00
parent 73ad939352
commit ac0eb73bc6

View file

@ -1003,16 +1003,6 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); // TE
// get number of audio channels of current channel // get number of audio channels of current channel
const int iCurNumAudChan = vecNumAudioChannels[i]; const int iCurNumAudChan = vecNumAudioChannels[i];
// export the audio data for recording purpose
if ( JamController.GetRecordingEnabled() )
{
emit AudioFrame ( iCurChanID,
vecChannels[iCurChanID].GetName(),
vecChannels[iCurChanID].GetAddress(),
iCurNumAudChan,
vecvecsData[i] );
}
// generate a separate mix for each channel // generate a separate mix for each channel
// actual processing of audio data -> mix // actual processing of audio data -> mix
ProcessData ( vecvecsData, ProcessData ( vecvecsData,
@ -1096,17 +1086,27 @@ opus_custom_encoder_ctl ( CurOpusEncoder,
vecvecbyCodedData[i], vecvecbyCodedData[i],
iCeltNumCodedBytes ); iCeltNumCodedBytes );
} }
}
// update socket buffer size // update socket buffer size
vecChannels[iCurChanID].UpdateSocketBufferSize(); vecChannels[iCurChanID].UpdateSocketBufferSize();
// send channel levels // send channel levels
if ( bSendChannelLevels && vecChannels[iCurChanID].ChannelLevelsRequired() ) if ( bSendChannelLevels && vecChannels[iCurChanID].ChannelLevelsRequired() )
{ {
ConnLessProtocol.CreateCLChannelLevelListMes ( vecChannels[iCurChanID].GetAddress(), ConnLessProtocol.CreateCLChannelLevelListMes ( vecChannels[iCurChanID].GetAddress(),
vecChannelLevels, vecChannelLevels,
iNumClients ); iNumClients );
} }
// export the audio data for recording purpose
if ( JamController.GetRecordingEnabled() )
{
emit AudioFrame ( iCurChanID,
vecChannels[iCurChanID].GetName(),
vecChannels[iCurChanID].GetAddress(),
iCurNumAudChan,
vecvecsData[i] );
} }
} }
} }