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
|
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") {
|
rtc_static_library("audio_processing") {
|
||||||
|
configs += [ ":apm_debug_dump" ]
|
||||||
sources = [
|
sources = [
|
||||||
"aec/aec_resampler.cc",
|
"aec/aec_resampler.cc",
|
||||||
"aec/aec_resampler.h",
|
"aec/aec_resampler.h",
|
||||||
@ -240,12 +249,6 @@ rtc_static_library("audio_processing") {
|
|||||||
"../audio_coding:isac",
|
"../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) {
|
if (aec_untrusted_delay_for_testing) {
|
||||||
defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
|
defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
|
||||||
}
|
}
|
||||||
@ -383,6 +386,7 @@ if (rtc_enable_protobuf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rtc_source_set("apm_logging") {
|
rtc_source_set("apm_logging") {
|
||||||
|
configs += [ ":apm_debug_dump" ]
|
||||||
sources = [
|
sources = [
|
||||||
"logging/apm_data_dumper.cc",
|
"logging/apm_data_dumper.cc",
|
||||||
"logging/apm_data_dumper.h",
|
"logging/apm_data_dumper.h",
|
||||||
@ -394,14 +398,10 @@ rtc_source_set("apm_logging") {
|
|||||||
"../../rtc_base:stringutils",
|
"../../rtc_base:stringutils",
|
||||||
]
|
]
|
||||||
defines = []
|
defines = []
|
||||||
if (apm_debug_dump) {
|
|
||||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
|
|
||||||
} else {
|
|
||||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_source_set("aec_core") {
|
rtc_source_set("aec_core") {
|
||||||
|
configs += [ ":apm_debug_dump" ]
|
||||||
sources = [
|
sources = [
|
||||||
"aec/aec_core.cc",
|
"aec/aec_core.cc",
|
||||||
"aec/aec_core.h",
|
"aec/aec_core.h",
|
||||||
@ -486,11 +486,6 @@ rtc_source_set("aec_core") {
|
|||||||
} else {
|
} else {
|
||||||
sources += [ "aecm/aecm_core_c.cc" ]
|
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.
|
# TODO(jschuh): Bug 1348: fix this warning.
|
||||||
configs += [ "//build/config/compiler:no_size_t_to_int_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") {
|
rtc_source_set("audio_processing_unittests") {
|
||||||
testonly = true
|
testonly = true
|
||||||
|
|
||||||
|
configs += [ ":apm_debug_dump" ]
|
||||||
sources = [
|
sources = [
|
||||||
"aec/echo_cancellation_unittest.cc",
|
"aec/echo_cancellation_unittest.cc",
|
||||||
"aec/system_delay_unittest.cc",
|
"aec/system_delay_unittest.cc",
|
||||||
@ -590,12 +586,6 @@ if (rtc_include_tests) {
|
|||||||
|
|
||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
if (apm_debug_dump) {
|
|
||||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
|
|
||||||
} else {
|
|
||||||
defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rtc_enable_intelligibility_enhancer) {
|
if (rtc_enable_intelligibility_enhancer) {
|
||||||
defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
|
defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
|
||||||
sources += [
|
sources += [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user