Changing non-const reference arguments to pointers, ACM

Part of refactoring of ACM, and recent lint-warnings.
This CL changes non-const references in the ACM API to pointers.

BUG=issue1372

Committed: https://code.google.com/p/webrtc/source/detail?r=3543

Review URL: https://webrtc-codereview.appspot.com/1103012

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3555 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tina.legrand@webrtc.org
2013-02-21 10:27:48 +00:00
parent f61e02c81f
commit 7a7a008031
20 changed files with 214 additions and 207 deletions

View File

@ -78,7 +78,7 @@ void TestVADDTX::Perform()
}
for(WebRtc_UWord8 n = 0; n < numEncoders; n++)
{
_acmB->Codec(n, myCodecParam);
_acmB->Codec(n, &myCodecParam);
if(_testMode != 0)
{
printf("%s\n", myCodecParam.plname);
@ -174,7 +174,7 @@ void TestVADDTX::runTestCases()
if(_testMode != 0)
{
CodecInst myCodecParam;
_acmA->SendCodec(myCodecParam);
_acmA->SendCodec(&myCodecParam);
printf("%s\n", myCodecParam.plname);
}
else
@ -239,7 +239,7 @@ void TestVADDTX::SetVAD(bool statusDTX, bool statusVAD, WebRtc_Word16 vadMode)
if (_acmA->SetVAD(statusDTX, statusVAD, (ACMVADMode) vadMode) < 0) {
assert(false);
}
if (_acmA->VAD(dtxEnabled, vadEnabled, vadModeSet) < 0) {
if (_acmA->VAD(&dtxEnabled, &vadEnabled, &vadModeSet) < 0) {
assert(false);
}
@ -282,7 +282,7 @@ VADDTXstruct TestVADDTX::GetVAD()
bool dtxEnabled, vadEnabled;
ACMVADMode vadModeSet;
if (_acmA->VAD(dtxEnabled, vadEnabled, vadModeSet) < 0) {
if (_acmA->VAD(&dtxEnabled, &vadEnabled, &vadModeSet) < 0) {
assert(false);
}
@ -328,7 +328,7 @@ WebRtc_Word16 TestVADDTX::RegisterSendCodec(char side,
for(WebRtc_Word16 codecCntr = 0; codecCntr < myACM->NumberOfCodecs();
codecCntr++)
{
CHECK_ERROR(myACM->Codec((WebRtc_UWord8)codecCntr, myCodecParam));
CHECK_ERROR(myACM->Codec((WebRtc_UWord8)codecCntr, &myCodecParam));
if(!STR_CASE_CMP(myCodecParam.plname, codecName))
{
if((samplingFreqHz == -1) || (myCodecParam.plfreq == samplingFreqHz))
@ -366,7 +366,7 @@ void TestVADDTX::Run()
CHECK_ERROR(_acmA->Process());
CHECK_ERROR(_acmB->PlayoutData10Ms(outFreqHzB, audioFrame));
CHECK_ERROR(_acmB->PlayoutData10Ms(outFreqHzB, &audioFrame));
_outFileB.Write10MsData(audioFrame.data_, audioFrame.samples_per_channel_);
}
#ifdef PRINT_STAT
@ -399,7 +399,7 @@ WebRtc_Word16 TestVADDTX::VerifyTest()
WebRtc_UWord8 vadPattern = 0;
WebRtc_UWord8 emptyFramePattern[6];
CodecInst myCodecParam;
_acmA->SendCodec(myCodecParam);
_acmA->SendCodec(&myCodecParam);
bool dtxInUse = true;
bool isReplaced = false;
if ((STR_CASE_CMP(myCodecParam.plname,"G729") == 0) ||
@ -408,7 +408,7 @@ WebRtc_Word16 TestVADDTX::VerifyTest()
(STR_CASE_CMP(myCodecParam.plname,"AMR-wb") == 0) ||
(STR_CASE_CMP(myCodecParam.plname,"speex") == 0))
{
_acmA->IsInternalDTXReplacedWithWebRtc(isReplaced);
_acmA->IsInternalDTXReplacedWithWebRtc(&isReplaced);
if (!isReplaced)
{
dtxInUse = false;