Clean up duplication in APM gn file.
I realized I could use configs to fix some duplication that I partially introduced. Verified APM_DEBUG_DUMP is set appropriately by looking at the compiler command line. Bug: webrtc:6828 Change-Id: Ia990e2721546d65639567cd3ab788439e328c5da Reviewed-on: https://webrtc-review.googlesource.com/34642 Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21349}
This commit is contained in:
parent
e58e91b6d1
commit
d75c8dcde9
@ -17,7 +17,16 @@ declare_args() {
|
||||
aec_untrusted_delay_for_testing = false
|
||||
}
|
||||
|
||||
config("apm_debug_dump") {
|
||||
if (apm_debug_dump) {
|
||||
defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
|
||||
} else {
|
||||
defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_static_library("audio_processing") {
|
||||
configs += [ ":apm_debug_dump" ]
|
||||
sources = [
|
||||
"aec/aec_resampler.cc",
|
||||
"aec/aec_resampler.h",
|
||||
@ -240,12 +249,6 @@ rtc_static_library("audio_processing") {
|
||||
"../audio_coding:isac",
|
||||
]
|
||||
|
||||
if (apm_debug_dump) {
|
||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
|
||||
} else {
|
||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
|
||||
}
|
||||
|
||||
if (aec_untrusted_delay_for_testing) {
|
||||
defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
|
||||
}
|
||||
@ -383,6 +386,7 @@ if (rtc_enable_protobuf) {
|
||||
}
|
||||
|
||||
rtc_source_set("apm_logging") {
|
||||
configs += [ ":apm_debug_dump" ]
|
||||
sources = [
|
||||
"logging/apm_data_dumper.cc",
|
||||
"logging/apm_data_dumper.h",
|
||||
@ -394,14 +398,10 @@ rtc_source_set("apm_logging") {
|
||||
"../../rtc_base:stringutils",
|
||||
]
|
||||
defines = []
|
||||
if (apm_debug_dump) {
|
||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
|
||||
} else {
|
||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_source_set("aec_core") {
|
||||
configs += [ ":apm_debug_dump" ]
|
||||
sources = [
|
||||
"aec/aec_core.cc",
|
||||
"aec/aec_core.h",
|
||||
@ -486,11 +486,6 @@ rtc_source_set("aec_core") {
|
||||
} else {
|
||||
sources += [ "aecm/aecm_core_c.cc" ]
|
||||
}
|
||||
if (apm_debug_dump) {
|
||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
|
||||
} else {
|
||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
|
||||
}
|
||||
|
||||
# TODO(jschuh): Bug 1348: fix this warning.
|
||||
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
||||
@ -524,6 +519,7 @@ if (rtc_include_tests) {
|
||||
rtc_source_set("audio_processing_unittests") {
|
||||
testonly = true
|
||||
|
||||
configs += [ ":apm_debug_dump" ]
|
||||
sources = [
|
||||
"aec/echo_cancellation_unittest.cc",
|
||||
"aec/system_delay_unittest.cc",
|
||||
@ -590,12 +586,6 @@ if (rtc_include_tests) {
|
||||
|
||||
defines = []
|
||||
|
||||
if (apm_debug_dump) {
|
||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
|
||||
} else {
|
||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
|
||||
}
|
||||
|
||||
if (rtc_enable_intelligibility_enhancer) {
|
||||
defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
|
||||
sources += [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user