From 148841d924e7448fa84b103ef64200ee2e555aba Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Thu, 30 Jul 2009 18:54:50 +0000 Subject: [PATCH] fix --- src/client.cpp | 4 ++-- src/util.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 214bef56..294acd5f 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -387,7 +387,7 @@ void CClient::ProcessAudioData ( CVector& 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 ) diff --git a/src/util.cpp b/src/util.cpp index 561ee35e..372e8ded 100755 --- a/src/util.cpp +++ b/src/util.cpp @@ -64,13 +64,14 @@ void CStereoSignalLevelMeter::Update ( CVector& 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 {