Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 1 | # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
mbonadei | 9aa3f0a | 2017-01-24 14:58:22 | [diff] [blame] | 9 | import("../webrtc.gni") |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 10 | if (is_android) { |
| 11 | import("//build/config/android/config.gni") |
| 12 | import("//build/config/android/rules.gni") |
| 13 | } |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 14 | |
kjellander | b62dbbe | 2016-09-23 07:38:52 | [diff] [blame] | 15 | rtc_static_library("audio") { |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 16 | sources = [ |
| 17 | "audio_receive_stream.cc", |
| 18 | "audio_receive_stream.h", |
solenberg | c7a8b08 | 2015-10-16 21:35:07 | [diff] [blame] | 19 | "audio_send_stream.cc", |
| 20 | "audio_send_stream.h", |
solenberg | 566ef24 | 2015-11-06 23:34:49 | [diff] [blame] | 21 | "audio_state.cc", |
| 22 | "audio_state.h", |
Fredrik Solenberg | 2a87797 | 2017-12-15 15:42:15 | [diff] [blame^] | 23 | "audio_transport_impl.cc", |
| 24 | "audio_transport_impl.h", |
Fredrik Solenberg | 4f4ec0a | 2015-10-22 08:49:27 | [diff] [blame] | 25 | "conversion.h", |
henrika | 5f6bf24 | 2017-11-01 10:06:56 | [diff] [blame] | 26 | "null_audio_poller.cc", |
| 27 | "null_audio_poller.h", |
Fredrik Solenberg | 4f4ec0a | 2015-10-22 08:49:27 | [diff] [blame] | 28 | "scoped_voe_interface.h", |
saza | c58f8c0 | 2017-07-19 07:39:19 | [diff] [blame] | 29 | "time_interval.cc", |
| 30 | "time_interval.h", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 31 | ] |
| 32 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 33 | if (!build_with_chromium && is_clang) { |
| 34 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 35 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | deps = [ |
| 39 | "..:webrtc_common", |
aleloi | aed581a | 2016-10-20 13:32:39 | [diff] [blame] | 40 | "../api:audio_mixer_api", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 41 | "../api:call_api", |
kwiberg | 84f6a3f | 2017-09-05 15:43:13 | [diff] [blame] | 42 | "../api:optional", |
ossu | eb1fde4 | 2017-05-02 13:46:30 | [diff] [blame] | 43 | "../api/audio_codecs:audio_codecs_api", |
| 44 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Mirko Bonadei | 245660a | 2017-10-10 12:38:11 | [diff] [blame] | 45 | "../call:bitrate_allocator", |
ossu | f515ab8 | 2016-12-07 12:52:58 | [diff] [blame] | 46 | "../call:call_interfaces", |
nisse | d76b7b2 | 2017-06-01 11:02:35 | [diff] [blame] | 47 | "../call:rtp_interfaces", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 48 | "../common_audio", |
ossu | 20a4b3f | 2017-04-27 09:08:52 | [diff] [blame] | 49 | "../modules/audio_coding:cng", |
aleloi | dd31071 | 2016-11-17 14:28:59 | [diff] [blame] | 50 | "../modules/audio_device", |
| 51 | "../modules/audio_processing", |
stefan | 7de8d64 | 2017-02-07 15:14:08 | [diff] [blame] | 52 | "../modules/bitrate_controller:bitrate_controller", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 53 | "../modules/congestion_controller:congestion_controller", |
| 54 | "../modules/pacing:pacing", |
| 55 | "../modules/remote_bitrate_estimator:remote_bitrate_estimator", |
Mirko Bonadei | b5728d9 | 2017-12-06 06:51:33 | [diff] [blame] | 56 | "../modules/rtp_rtcp", |
Patrik Höglund | a8005cf | 2017-12-13 15:05:42 | [diff] [blame] | 57 | "../rtc_base:checks", |
henrika | 5f6bf24 | 2017-11-01 10:06:56 | [diff] [blame] | 58 | "../rtc_base:rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame] | 59 | "../rtc_base:rtc_base_approved", |
| 60 | "../rtc_base:rtc_task_queue", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 61 | "../system_wrappers", |
Alex Narest | cedd351 | 2017-12-07 19:54:55 | [diff] [blame] | 62 | "../system_wrappers:field_trial_api", |
Tommi | f888bb5 | 2015-12-12 00:37:01 | [diff] [blame] | 63 | "../voice_engine", |
Fredrik Solenberg | 2a87797 | 2017-12-15 15:42:15 | [diff] [blame^] | 64 | "../voice_engine:audio_level", |
| 65 | "utility:audio_frame_operations", |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 66 | ] |
| 67 | } |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 68 | if (rtc_include_tests) { |
Fredrik Solenberg | 73276ad | 2017-09-14 12:46:47 | [diff] [blame] | 69 | rtc_source_set("audio_end_to_end_test") { |
| 70 | testonly = true |
| 71 | |
| 72 | sources = [ |
| 73 | "test/audio_end_to_end_test.cc", |
| 74 | "test/audio_end_to_end_test.h", |
| 75 | ] |
| 76 | deps = [ |
| 77 | ":audio", |
| 78 | "../system_wrappers:system_wrappers", |
| 79 | "../test:fake_audio_device", |
| 80 | "../test:test_common", |
| 81 | "../test:test_support", |
| 82 | ] |
| 83 | |
| 84 | if (!build_with_chromium && is_clang) { |
| 85 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 86 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 87 | } |
| 88 | } |
| 89 | |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 90 | rtc_source_set("audio_tests") { |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 91 | testonly = true |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 92 | |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 93 | sources = [ |
| 94 | "audio_receive_stream_unittest.cc", |
solenberg | 18f5427 | 2017-09-15 16:56:08 | [diff] [blame] | 95 | "audio_send_stream_tests.cc", |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 96 | "audio_send_stream_unittest.cc", |
| 97 | "audio_state_unittest.cc", |
saza | c58f8c0 | 2017-07-19 07:39:19 | [diff] [blame] | 98 | "time_interval_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 99 | ] |
| 100 | deps = [ |
| 101 | ":audio", |
Fredrik Solenberg | 73276ad | 2017-09-14 12:46:47 | [diff] [blame] | 102 | ":audio_end_to_end_test", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 103 | "../api:mock_audio_mixer", |
Fredrik Solenberg | 2a87797 | 2017-12-15 15:42:15 | [diff] [blame^] | 104 | "../call:mock_call_interfaces", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 105 | "../call:mock_rtp_interfaces", |
| 106 | "../call:rtp_interfaces", |
nisse | 0f15f92 | 2017-06-21 08:05:22 | [diff] [blame] | 107 | "../call:rtp_receiver", |
aleloi | dd31071 | 2016-11-17 14:28:59 | [diff] [blame] | 108 | "../modules/audio_device:mock_audio_device", |
aleloi | 04c0722 | 2016-11-22 14:42:53 | [diff] [blame] | 109 | "../modules/audio_mixer:audio_mixer_impl", |
Ivo Creusen | 56d46090 | 2017-11-24 16:29:59 | [diff] [blame] | 110 | "../modules/audio_processing:audio_processing_statistics", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 111 | "../modules/congestion_controller:congestion_controller", |
zstein | 7cb69d5 | 2017-05-08 18:52:38 | [diff] [blame] | 112 | "../modules/congestion_controller:mock_congestion_controller", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 113 | "../modules/pacing:mock_paced_sender", |
kjellander | 676e08f | 2016-12-07 16:23:27 | [diff] [blame] | 114 | "../modules/pacing:pacing", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 115 | "../modules/rtp_rtcp:mock_rtp_rtcp", |
| 116 | "../modules/rtp_rtcp:rtp_rtcp_format", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame] | 117 | "../rtc_base:rtc_base_approved", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 118 | "../rtc_base:rtc_base_tests_utils", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame] | 119 | "../rtc_base:rtc_task_queue", |
Patrik Höglund | a8005cf | 2017-12-13 15:05:42 | [diff] [blame] | 120 | "../rtc_base:safe_compare", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 121 | "../system_wrappers:system_wrappers", |
| 122 | "../test:audio_codec_mocks", |
| 123 | "../test:rtp_test_utils", |
aleloi | 10111bc | 2016-11-17 14:48:48 | [diff] [blame] | 124 | "../test:test_common", |
aleloi | 6321b49 | 2016-12-05 09:46:09 | [diff] [blame] | 125 | "../test:test_support", |
Patrik Höglund | c0e6804 | 2017-11-13 16:04:05 | [diff] [blame] | 126 | "../voice_engine", |
ehmaldonado | 894c2bb | 2017-01-05 14:03:24 | [diff] [blame] | 127 | "utility:utility_tests", |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 128 | "//testing/gmock", |
| 129 | "//testing/gtest", |
| 130 | ] |
oprypin | 5e1ca78 | 2017-03-20 09:06:18 | [diff] [blame] | 131 | |
Fredrik Solenberg | 73276ad | 2017-09-14 12:46:47 | [diff] [blame] | 132 | if (!rtc_use_memcheck) { |
| 133 | # This test is timing dependent, which rules out running on memcheck bots. |
| 134 | sources += [ "test/audio_stats_test.cc" ] |
| 135 | } |
| 136 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 137 | if (!build_with_chromium && is_clang) { |
| 138 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 139 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 140 | } |
| 141 | } |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 142 | |
| 143 | if (rtc_enable_protobuf) { |
oprypin | 6d305ba | 2017-03-30 11:01:30 | [diff] [blame] | 144 | rtc_test("low_bandwidth_audio_test") { |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 145 | testonly = true |
| 146 | |
| 147 | sources = [ |
| 148 | "test/low_bandwidth_audio_test.cc", |
| 149 | ] |
| 150 | |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 151 | deps = [ |
Fredrik Solenberg | 73276ad | 2017-09-14 12:46:47 | [diff] [blame] | 152 | ":audio_end_to_end_test", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 153 | "../common_audio", |
oprypin | 9b2f20c | 2017-08-29 12:51:57 | [diff] [blame] | 154 | "../rtc_base:rtc_base_approved", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 155 | "../system_wrappers", |
| 156 | "../test:fake_audio_device", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 157 | "../test:test_common", |
| 158 | "../test:test_main", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 159 | "//testing/gmock", |
| 160 | "//testing/gtest", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 161 | ] |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 162 | if (is_android) { |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 163 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
| 164 | } |
| 165 | |
| 166 | data = [ |
Edward Lemur | 2011075 | 2017-09-28 14:14:37 | [diff] [blame] | 167 | "../resources/voice_engine/audio_dtx16.wav", |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 168 | "../resources/voice_engine/audio_tiny16.wav", |
| 169 | "../resources/voice_engine/audio_tiny48.wav", |
Edward Lemur | 2011075 | 2017-09-28 14:14:37 | [diff] [blame] | 170 | "test/low_bandwidth_audio_test.py", |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 171 | ] |
Edward Lemur | 2011075 | 2017-09-28 14:14:37 | [diff] [blame] | 172 | if (is_linux) { |
| 173 | data += [ |
| 174 | "../tools_webrtc/audio_quality/linux/PolqaOem64", |
| 175 | "../tools_webrtc/audio_quality/linux/pesq", |
| 176 | ] |
| 177 | } |
| 178 | if (is_win) { |
| 179 | data += [ |
| 180 | "../tools_webrtc/audio_quality/win/PolqaOem64.dll", |
| 181 | "../tools_webrtc/audio_quality/win/PolqaOem64.exe", |
| 182 | "../tools_webrtc/audio_quality/win/pesq.exe", |
| 183 | "../tools_webrtc/audio_quality/win/vcomp120.dll", |
| 184 | ] |
| 185 | } |
| 186 | if (is_mac) { |
| 187 | data += [ "../tools_webrtc/audio_quality/mac/pesq" ] |
| 188 | } |
oprypin | 92220ff | 2017-03-23 10:40:03 | [diff] [blame] | 189 | |
| 190 | if (!build_with_chromium && is_clang) { |
| 191 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) |
| 192 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 8f8d1a0 | 2017-03-06 12:01:16 | [diff] [blame] | 193 | } |
| 194 | } |
| 195 | } |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 196 | |
| 197 | rtc_source_set("audio_perf_tests") { |
| 198 | testonly = true |
| 199 | |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 200 | sources = [ |
| 201 | "test/audio_bwe_integration_test.cc", |
| 202 | "test/audio_bwe_integration_test.h", |
| 203 | ] |
| 204 | deps = [ |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 205 | "../common_audio", |
ehmaldonado | f6a861a | 2017-07-19 17:40:47 | [diff] [blame] | 206 | "../rtc_base:rtc_base_approved", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 207 | "../system_wrappers", |
| 208 | "../test:fake_audio_device", |
| 209 | "../test:field_trial", |
eladalon | 413ee9a | 2017-08-22 11:02:52 | [diff] [blame] | 210 | "../test:single_threaded_task_queue", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 211 | "../test:test_common", |
| 212 | "../test:test_main", |
| 213 | "//testing/gmock", |
| 214 | "//testing/gtest", |
tschumim | 9d11764 | 2017-07-17 08:41:41 | [diff] [blame] | 215 | ] |
| 216 | |
| 217 | data = [ |
| 218 | "//resources/voice_engine/audio_dtx16.wav", |
| 219 | ] |
| 220 | |
| 221 | if (!build_with_chromium && is_clang) { |
| 222 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 223 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 224 | } |
| 225 | } |
Peter Boström | 0208322 | 2016-06-14 10:52:54 | [diff] [blame] | 226 | } |