From 351fb6d3b41086bb7191d05e56cc498c516bcf4f Mon Sep 17 00:00:00 2001 From: "leozwang@webrtc.org" Date: Fri, 25 May 2012 16:47:35 +0000 Subject: [PATCH] Exclude code that don't work on android in voe_cmd_test Description: Ths cl makes voe_cmd_test work on android by excluding some code that are availabel on android today, some highlights 1. change maxnumofchannles 2. disable audio device selection 3. disable set/get volume BUG= TEST=test on try bots Review URL: https://webrtc-codereview.appspot.com/584009 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2300 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/voice_engine/main/test/cmd_test/voe_cmd_test.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/voice_engine/main/test/cmd_test/voe_cmd_test.cc b/src/voice_engine/main/test/cmd_test/voe_cmd_test.cc index a977cc1d7d..bbcceffbdd 100644 --- a/src/voice_engine/main/test/cmd_test/voe_cmd_test.cc +++ b/src/voice_engine/main/test/cmd_test/voe_cmd_test.cc @@ -358,7 +358,11 @@ void RunTest(std::string out_path) { res = codec->SetSendCodec(chan, cinst); VALIDATE; +#ifndef WEBRTC_ANDROID const int kMaxNumChannels = 8; +#else + const int kMaxNumChannels = 1; +#endif int channel_index = 0; std::vector channels(kMaxNumChannels); for (i = 0; i < kMaxNumChannels; ++i) { @@ -376,7 +380,7 @@ void RunTest(std::string out_path) { bool newcall = true; while (newcall) { -#ifdef WEBRTC_LINUX +#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) int rd(-1), pd(-1); res = hardware->GetNumOfRecordingDevices(rd); VALIDATE; @@ -452,6 +456,7 @@ void RunTest(std::string out_path) { VALIDATE; } +#ifndef WEBRTC_ANDROID printf("Getting mic volume \n"); unsigned int vol = 999; res = volume->GetMicVolume(vol); @@ -459,6 +464,7 @@ void RunTest(std::string out_path) { if ((vol > 255) || (vol < 1)) { printf("\n****ERROR in GetMicVolume"); } +#endif int forever = 1; while (forever) {