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
This commit is contained in:
parent
15cd04a314
commit
351fb6d3b4
@ -358,7 +358,11 @@ void RunTest(std::string out_path) {
|
|||||||
res = codec->SetSendCodec(chan, cinst);
|
res = codec->SetSendCodec(chan, cinst);
|
||||||
VALIDATE;
|
VALIDATE;
|
||||||
|
|
||||||
|
#ifndef WEBRTC_ANDROID
|
||||||
const int kMaxNumChannels = 8;
|
const int kMaxNumChannels = 8;
|
||||||
|
#else
|
||||||
|
const int kMaxNumChannels = 1;
|
||||||
|
#endif
|
||||||
int channel_index = 0;
|
int channel_index = 0;
|
||||||
std::vector<int> channels(kMaxNumChannels);
|
std::vector<int> channels(kMaxNumChannels);
|
||||||
for (i = 0; i < kMaxNumChannels; ++i) {
|
for (i = 0; i < kMaxNumChannels; ++i) {
|
||||||
@ -376,7 +380,7 @@ void RunTest(std::string out_path) {
|
|||||||
bool newcall = true;
|
bool newcall = true;
|
||||||
while (newcall) {
|
while (newcall) {
|
||||||
|
|
||||||
#ifdef WEBRTC_LINUX
|
#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
|
||||||
int rd(-1), pd(-1);
|
int rd(-1), pd(-1);
|
||||||
res = hardware->GetNumOfRecordingDevices(rd);
|
res = hardware->GetNumOfRecordingDevices(rd);
|
||||||
VALIDATE;
|
VALIDATE;
|
||||||
@ -452,6 +456,7 @@ void RunTest(std::string out_path) {
|
|||||||
VALIDATE;
|
VALIDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WEBRTC_ANDROID
|
||||||
printf("Getting mic volume \n");
|
printf("Getting mic volume \n");
|
||||||
unsigned int vol = 999;
|
unsigned int vol = 999;
|
||||||
res = volume->GetMicVolume(vol);
|
res = volume->GetMicVolume(vol);
|
||||||
@ -459,6 +464,7 @@ void RunTest(std::string out_path) {
|
|||||||
if ((vol > 255) || (vol < 1)) {
|
if ((vol > 255) || (vol < 1)) {
|
||||||
printf("\n****ERROR in GetMicVolume");
|
printf("\n****ERROR in GetMicVolume");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int forever = 1;
|
int forever = 1;
|
||||||
while (forever) {
|
while (forever) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user