fix
This commit is contained in:
parent
9837af237d
commit
148841d924
2 changed files with 5 additions and 4 deletions
|
@ -387,7 +387,7 @@ void CClient::ProcessAudioData ( CVector<int16_t>& vecsStereoSndCrd )
|
|||
// Socket.SendPacket ( Channel.PrepSendPacket ( vecsNetwork ),
|
||||
// Channel.GetAddress() );
|
||||
|
||||
celt_encode(CeltEncoder, &vecsNetwork[0], NULL, &vecCeltData[0], iCeltNumCodedBytes);
|
||||
celt_encode ( CeltEncoder, &vecsNetwork[0], NULL, &vecCeltData[0], iCeltNumCodedBytes );
|
||||
Socket.SendPacket ( vecCeltData, Channel.GetAddress() );
|
||||
|
||||
|
||||
|
@ -438,7 +438,7 @@ for ( i = 0; i < iMonoBlockSizeSam; i++ )
|
|||
*/
|
||||
// TEST CELT
|
||||
//celt_encode(CeltEncoder, &vecsAudioSndCrdMono[0], NULL, &vecCeltData[0], iCeltNumCodedBytes);
|
||||
celt_decode(CeltDecoder, &vecbyNetwData[0], iCeltNumCodedBytes, &vecsAudioSndCrdMono[0]);
|
||||
celt_decode ( CeltDecoder, &vecbyNetwData[0], iCeltNumCodedBytes, &vecsAudioSndCrdMono[0] );
|
||||
|
||||
|
||||
for ( i = 0, j = 0; i < iMonoBlockSizeSam; i++, j += 2 )
|
||||
|
|
|
@ -64,13 +64,14 @@ void CStereoSignalLevelMeter::Update ( CVector<short>& vecsAudio )
|
|||
dCurLevelR = UpdateCurLevel ( dCurLevelR, sMaxR );
|
||||
}
|
||||
|
||||
double CStereoSignalLevelMeter::UpdateCurLevel ( double dCurLevel, const short& sMax )
|
||||
double CStereoSignalLevelMeter::UpdateCurLevel ( double dCurLevel,
|
||||
const short& sMax )
|
||||
{
|
||||
// decrease max with time
|
||||
if ( dCurLevel >= METER_FLY_BACK )
|
||||
{
|
||||
// TODO calculate factor from sample rate
|
||||
dCurLevel *= 0.99;
|
||||
dCurLevel *= 0.95;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue