Added build flag around the Intelligibility enhancer performance test code

BUG=chromium:641931

Review-Url: https://codereview.webrtc.org/2294093004
Cr-Commit-Position: refs/heads/master@{#14202}
This commit is contained in:
peah
2016-09-13 21:42:39 -07:00
committed by Commit bot
parent caa9cb2cea
commit d29e3ea4b2
3 changed files with 23 additions and 0 deletions

View File

@ -776,6 +776,13 @@ if (rtc_include_tests) {
"//testing/gmock",
"//testing/gtest",
]
if (rtc_enable_intelligibility_enhancer) {
defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
} else {
defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
}
if (is_android) {
deps += [ "//testing/android/native_test:native_test_native_code" ]
data = webrtc_perf_tests_resources

View File

@ -29,6 +29,14 @@
#include "webrtc/system_wrappers/include/sleep.h"
#include "webrtc/test/testsupport/perf_test.h"
// Check to verify that the define for the intelligibility enhancer is properly
// set.
#if !defined(WEBRTC_INTELLIGIBILITY_ENHANCER) || \
(WEBRTC_INTELLIGIBILITY_ENHANCER != 0 && \
WEBRTC_INTELLIGIBILITY_ENHANCER != 1)
#error "Set WEBRTC_INTELLIGIBILITY_ENHANCER to either 0 or 1"
#endif
namespace webrtc {
namespace {
@ -96,6 +104,7 @@ struct SimulationConfig {
}
}
#if WEBRTC_INTELLIGIBILITY_ENHANCER == 1
const SettingsType intelligibility_enhancer_settings[] = {
SettingsType::kDefaultApmDesktopAndIntelligibilityEnhancer};
@ -107,6 +116,7 @@ struct SimulationConfig {
simulation_configs.push_back(SimulationConfig(sample_rate, settings));
}
}
#endif
const SettingsType beamformer_settings[] = {
SettingsType::kDefaultApmDesktopAndBeamformer};

View File

@ -454,6 +454,12 @@
'webrtc',
],
'conditions': [
['enable_intelligibility_enhancer==1', {
'defines': ['WEBRTC_INTELLIGIBILITY_ENHANCER=1',],
}, {
'defines': ['WEBRTC_INTELLIGIBILITY_ENHANCER=0',],
}],
['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',