Fix compilation error in build-in AEC test

Review URL: http://webrtc-codereview.appspot.com/164001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@636 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
leozwang@google.com
2011-09-21 18:02:03 +00:00
parent 221b522118
commit 90eff6c7c6
2 changed files with 27 additions and 23 deletions

View File

@ -33,6 +33,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../interface \
$(LOCAL_PATH)/../../../.. \
$(LOCAL_PATH)/../../../../modules/audio_device/main/interface \
$(LOCAL_PATH)/../../../../modules/interface \
$(LOCAL_PATH)/../../../../system_wrappers/interface \
external/gtest/include \

View File

@ -56,19 +56,19 @@ char* GetResource(char* resource);
const char* GetResource(const char* resource);
// #ifdef MAC_IPHONE
#elif defined(WEBRTC_ANDROID)
char filenameStr[2][256] = {0};
char filenameStr[2][256];
int currentStr = 0;
char* GetFilename(char* filename)
{
currentStr = !currentStr;
sprintf(filenameStr[currentStr], "/sdcard/%s", filename);
sprintf(filenameStr[currentStr], "/sdcard/%s", filename);
return filenameStr[currentStr];
}
const char* GetFilename(const char* filename)
{
currentStr = !currentStr;
sprintf(filenameStr[currentStr], "/sdcard/%s", filename);
sprintf(filenameStr[currentStr], "/sdcard/%s", filename);
return filenameStr[currentStr];
}
int GetResource(char* resource, char* dest, int destLen)
@ -81,13 +81,13 @@ int GetResource(char* resource, char* dest, int destLen)
char* GetResource(char* resource)
{
currentStr = !currentStr;
sprintf(filenameStr[currentStr], "/sdcard/%s", resource);
sprintf(filenameStr[currentStr], "/sdcard/%s", resource);
return filenameStr[currentStr];
}
const char* GetResource(const char* resource)
{
{
currentStr = !currentStr;
sprintf(filenameStr[currentStr], "/sdcard/%s", resource);
sprintf(filenameStr[currentStr], "/sdcard/%s", resource);
return filenameStr[currentStr];
}
#else
@ -1978,9 +1978,9 @@ int VoETestManager::DoStandardTest()
TEST_MUSTPASS(hardware->GetNumOfRecordingDevices(nRec));
TEST_MUSTPASS(hardware->GetNumOfPlayoutDevices(nPlay));
#endif
int load = -1;
#if defined(_WIN32)
TEST_MUSTPASS(hardware->GetCPULoad(load));
TEST_MUSTPASS(load == -1);
@ -1996,7 +1996,7 @@ int VoETestManager::DoStandardTest()
TEST_MUSTPASS(load == -1);
TEST_LOG("System CPU load = %d\n", load);
#endif
#ifdef MAC_IPHONE
// Reset sound device
TEST_LOG("Reset sound device \n");
@ -2033,14 +2033,17 @@ int VoETestManager::DoStandardTest()
SLEEP(2000);
TEST_LOG("Looping through capture devices...\n");
TEST_MUSTPASS(hardware->GetNumOfRecordingDevices(nRec));
for (idx = 0; idx < nRec; idx++)
int num_devs = 0;
char dev_name[128] = {0};
char guid_name[128] = {0};
TEST_MUSTPASS(hardware->GetNumOfRecordingDevices(num_devs));
for (int dev_index = 0; dev_index < num_devs; ++dev_index)
{
TEST_MUSTPASS(hardware->GetRecordingDeviceName(idx,
devName,
guidName));
TEST_LOG("%d: %s\n", idx, devName);
TEST_MUSTPASS(hardware->SetRecordingDevice(idx));
TEST_MUSTPASS(hardware->GetRecordingDeviceName(dev_index,
dev_name,
guid_name));
TEST_LOG("%d: %s\n", dev_index, dev_name);
TEST_MUSTPASS(hardware->SetRecordingDevice(dev_index));
SLEEP(2000);
}
@ -2049,14 +2052,14 @@ int VoETestManager::DoStandardTest()
TEST_LOG("Looping through render devices, restarting for each "
"device...\n");
TEST_MUSTPASS(hardware->GetNumOfPlayoutDevices(nPlay));
for (idx = 0; idx < nPlay; idx++)
TEST_MUSTPASS(hardware->GetNumOfPlayoutDevices(num_devs));
for (int dev_index = 0; dev_index < num_devs; ++dev_index)
{
TEST_MUSTPASS(hardware->GetPlayoutDeviceName(idx,
devName,
guidName));
TEST_LOG("%d: %s\n", idx, devName);
TEST_MUSTPASS(hardware->SetPlayoutDevice(idx));
TEST_MUSTPASS(hardware->GetPlayoutDeviceName(dev_index,
dev_name,
guid_name));
TEST_LOG("%d: %s\n", dev_index, dev_name);
TEST_MUSTPASS(hardware->SetPlayoutDevice(dev_index));
SLEEP(2000);
}