From 3ab5d5f4d0a7802420bd995cfc699cb78169f991 Mon Sep 17 00:00:00 2001 From: "xians@google.com" Date: Mon, 15 Aug 2011 11:07:54 +0000 Subject: [PATCH] This patch just gets rid of the rest of warnings on voe_auto_test and adm. Trivial changes. Review URL: http://webrtc-codereview.appspot.com/111001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@364 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../main/source/audio_device_buffer.cc | 3 +-- .../linux/audio_mixer_manager_alsa_linux.cc | 1 + .../main/test/auto_test/voe_extended_test.cc | 7 ----- .../main/test/auto_test/voe_standard_test.cc | 26 ++++++++++--------- .../main/test/auto_test/voe_standard_test.h | 16 ++++++------ .../main/test/auto_test/voe_unit_test.cc | 5 ++-- 6 files changed, 26 insertions(+), 32 deletions(-) diff --git a/src/modules/audio_device/main/source/audio_device_buffer.cc b/src/modules/audio_device/main/source/audio_device_buffer.cc index aac976384..58d25ef60 100644 --- a/src/modules/audio_device/main/source/audio_device_buffer.cc +++ b/src/modules/audio_device/main/source/audio_device_buffer.cc @@ -593,7 +593,7 @@ WebRtc_Word32 AudioDeviceBuffer::RequestPlayoutData(WebRtc_UWord32 nSamples) WebRtc_Word16 maxIndex = WebRtcSpl_MaxAbsIndexW16((const WebRtc_Word16*)&_playBuffer[0], (WebRtc_Word16)nSamplesOut*_playChannels); WebRtc_UWord32 pulseTime = item->GetUnsignedItem(); WebRtc_UWord32 diff = nowTime - pulseTime + (10*maxIndex)/(nSamplesOut*_playChannels); - // DEBUG_PRINT("diff=%d", diff); + WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "diff time in playout delay (%d)", diff); } _pulseList.PopFront(); } @@ -631,7 +631,6 @@ void AudioDeviceBuffer::_EmptyList() { while (!_pulseList.Empty()) { - int n = _pulseList.GetSize(); ListItem* item = _pulseList.First(); if (item) { diff --git a/src/modules/audio_device/main/source/linux/audio_mixer_manager_alsa_linux.cc b/src/modules/audio_device/main/source/linux/audio_mixer_manager_alsa_linux.cc index 0c513542a..672240531 100644 --- a/src/modules/audio_device/main/source/linux/audio_mixer_manager_alsa_linux.cc +++ b/src/modules/audio_device/main/source/linux/audio_mixer_manager_alsa_linux.cc @@ -742,6 +742,7 @@ WebRtc_Word32 AudioMixerManagerLinuxALSA::MicrophoneMuteIsAvailable( } available = LATE(snd_mixer_selem_has_capture_switch)(_inputMixerElement); + return 0; } WebRtc_Word32 AudioMixerManagerLinuxALSA::SetMicrophoneMute(bool enable) diff --git a/src/voice_engine/main/test/auto_test/voe_extended_test.cc b/src/voice_engine/main/test/auto_test/voe_extended_test.cc index 0fa2eee89..34f6821c3 100644 --- a/src/voice_engine/main/test/auto_test/voe_extended_test.cc +++ b/src/voice_engine/main/test/auto_test/voe_extended_test.cc @@ -1568,10 +1568,7 @@ int VoEExtendedTest::TestCallReport() { // Get required sub-API pointers VoEBase* base = _mgr.BasePtr(); - VoEAudioProcessing* apm = _mgr.APMPtr(); VoECallReport* report = _mgr.CallReportPtr(); - VoERTP_RTCP* rtp_rtcp = _mgr.RTP_RTCPPtr(); - VoENetwork* netw = _mgr.NetworkPtr(); VoEFile* file = _mgr.FilePtr(); PrepareTest("CallReport"); @@ -1755,7 +1752,6 @@ int VoEExtendedTest::TestCodec() VoEBase* base = _mgr.BasePtr(); VoECodec* codec = _mgr.CodecPtr(); VoEFile* file = _mgr.FilePtr(); - VoENetwork* netw = _mgr.NetworkPtr(); #ifdef _USE_EXTENDED_TRACE_ TEST_MUSTPASS(VoiceEngine::SetTraceFile(GetFilename("VoECodec_trace.txt"))); @@ -5243,12 +5239,9 @@ int VoEExtendedTest::TestNetwork() int sleepTime2 = 200; #endif - const int truncLen(5); - VoEBase* base = _mgr.BasePtr(); VoEFile* file = _mgr.FilePtr(); VoENetwork* netw = _mgr.NetworkPtr(); - VoERTP_RTCP* rtp_rtcp = _mgr.RTP_RTCPPtr(); #ifdef _USE_EXTENDED_TRACE_ TEST_MUSTPASS(VoiceEngine::SetTraceFile(GetFilename( diff --git a/src/voice_engine/main/test/auto_test/voe_standard_test.cc b/src/voice_engine/main/test/auto_test/voe_standard_test.cc index 318d39f79..c6557d218 100644 --- a/src/voice_engine/main/test/auto_test/voe_standard_test.cc +++ b/src/voice_engine/main/test/auto_test/voe_standard_test.cc @@ -91,7 +91,7 @@ const char* GetResource(const char* resource) return filenameStr[currentStr]; } #else -char filenameStr[2][256] = {0}; +char filenameStr[2][256]; int currentStr = 0; char* GetFilename(char* filename) @@ -593,18 +593,21 @@ bool SubAPIManager::GetExtendedMenuSelection(ExtendedSelection& sel) VoETestManager::VoETestManager() : ve(0), base(0), - codec(0), - volume(0), - dtmf(0), - rtp_rtcp(0), - apm(0), - netw(0), - file(0), - encrypt(0), - hardware(0), - xmedia(0), report(0), + codec(0), + dtmf(0), + encrypt(0), + xmedia(0), + file(0), + hardware(0), +#ifdef _TEST_NETEQ_STATS_ + neteqst(0), +#endif + netw(0), + rtp_rtcp(0), vsync(0), + volume(0), + apm(0), instanceCount(0) { if (VoiceEngine::SetTraceFile(NULL) != -1) @@ -903,7 +906,6 @@ int VoETestManager::DoStandardTest() memset(&cinst, 0, sizeof(cinst)); #endif char tmpStr[1024]; - bool enabled(false); TEST_LOG("\n\n+++ Base tests +++\n\n"); diff --git a/src/voice_engine/main/test/auto_test/voe_standard_test.h b/src/voice_engine/main/test/auto_test/voe_standard_test.h index 0caade24d..a3756a134 100644 --- a/src/voice_engine/main/test/auto_test/voe_standard_test.h +++ b/src/voice_engine/main/test/auto_test/voe_standard_test.h @@ -352,21 +352,21 @@ public: private: VoiceEngine* ve; VoEBase* base; + VoECallReport* report; VoECodec* codec; - VoEVolumeControl* volume; VoEDtmf* dtmf; - VoERTP_RTCP* rtp_rtcp; - VoEAudioProcessing* apm; - VoENetwork* netw; - VoEFile* file; - VoEHardware* hardware; - VoEVideoSync* vsync; VoEEncryption* encrypt; VoEExternalMedia* xmedia; - VoECallReport* report; + VoEFile* file; + VoEHardware* hardware; #ifdef _TEST_NETEQ_STATS_ VoENetEqStats* neteqst; #endif + VoENetwork* netw; + VoERTP_RTCP* rtp_rtcp; + VoEVideoSync* vsync; + VoEVolumeControl* volume; + VoEAudioProcessing* apm; int instanceCount; }; diff --git a/src/voice_engine/main/test/auto_test/voe_unit_test.cc b/src/voice_engine/main/test/auto_test/voe_unit_test.cc index 8ffeab561..2274c7bba 100644 --- a/src/voice_engine/main/test/auto_test/voe_unit_test.cc +++ b/src/voice_engine/main/test/auto_test/voe_unit_test.cc @@ -306,7 +306,6 @@ int VoEUnitTest::StartMedia(int channel, { VoEBase* base = _mgr.BasePtr(); VoEFile* file = _mgr.FilePtr(); - VoECodec* codec = _mgr.CodecPtr(); _listening[channel] = false; _playing[channel] = false; @@ -445,9 +444,9 @@ int VoEUnitTest::MixerTest() CHECK(base->Init()); // 8 kHz - CodecInst l16_8 = { 123, "L16", 8000, 160, 1, 128000 }; +// CodecInst l16_8 = { 123, "L16", 8000, 160, 1, 128000 }; CodecInst pcmu_8 = { 0, "pcmu", 8000, 160, 1, 64000 }; - CodecInst g729_8 = { 18, "g729", 8000, 160, 1, 8000 }; +// CodecInst g729_8 = { 18, "g729", 8000, 160, 1, 8000 }; // 16 kHz CodecInst ipcmwb_16 = { 97, "ipcmwb", 16000, 320, 1, 80000 };