blob: 9050faf6470172957bf684e0ae20fb4a8e294491 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010
mbonadei438062b2017-01-09 02:37:21 -080011if (is_android) {
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
14}
15
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +000016config("audio_device_config") {
17 include_dirs = [
Henrik Kjellanderff761fb2015-11-04 08:31:52 +010018 "../include",
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +000019 "include",
20 "dummy", # Contains dummy audio device implementations.
21 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000022}
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +000023
ehmaldonadod02fe4b2016-08-26 13:31:24 -070024config("audio_device_warnings_config") {
25 if (is_win && is_clang) {
26 cflags = [
27 # Disable warnings failing when compiling with Clang on Windows.
28 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
29 "-Wno-bool-conversion",
30 "-Wno-delete-non-virtual-dtor",
31 "-Wno-logical-op-parentheses",
32 "-Wno-microsoft-extra-qualification",
33 "-Wno-microsoft-goto",
ehmaldonadod02fe4b2016-08-26 13:31:24 -070034 "-Wno-reorder",
35 "-Wno-shift-overflow",
ehmaldonadod02fe4b2016-08-26 13:31:24 -070036 ]
37 }
38}
39
mbonadeibcc21762017-09-12 04:45:24 -070040rtc_source_set("audio_device") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000041 visibility = [ "*" ]
mbonadeibcc21762017-09-12 04:45:24 -070042 public_deps = [
Paulina Hensman7bd79a02018-03-15 12:44:12 +010043 ":audio_device_api",
44
45 # Deprecated.
46 # TODO(webrtc:7452): Remove this public dep. audio_device_impl should
47 # be depended on directly if needed.
48 ":audio_device_impl",
mbonadeibcc21762017-09-12 04:45:24 -070049 ]
mbonadeibcc21762017-09-12 04:45:24 -070050}
51
52if (rtc_include_internal_audio_device && is_ios) {
53 rtc_source_set("audio_device_ios_objc") {
Paulina Hensman7bd79a02018-03-15 12:44:12 +010054 visibility = [
55 ":audio_device_impl",
56 ":audio_device_ios_objc_unittests",
57 ]
mbonadeibcc21762017-09-12 04:45:24 -070058 sources = [
59 "ios/audio_device_ios.h",
60 "ios/audio_device_ios.mm",
61 "ios/audio_device_not_implemented_ios.mm",
62 "ios/audio_session_observer.h",
Patrik Höglund6d3ed712018-01-05 11:51:05 +010063 "ios/objc/RTCAudioSession.h",
64 "ios/objc/RTCAudioSessionConfiguration.h",
mbonadeibcc21762017-09-12 04:45:24 -070065 "ios/objc/RTCAudioSessionDelegateAdapter.h",
66 "ios/objc/RTCAudioSessionDelegateAdapter.mm",
67 "ios/voice_processing_audio_unit.h",
68 "ios/voice_processing_audio_unit.mm",
69 ]
70 libs = [
71 "AudioToolbox.framework",
72 "AVFoundation.framework",
73 "Foundation.framework",
74 "UIKit.framework",
75 ]
76 deps = [
Paulina Hensman7bd79a02018-03-15 12:44:12 +010077 ":audio_device_api",
78 ":audio_device_buffer",
mbonadeibcc21762017-09-12 04:45:24 -070079 ":audio_device_generic",
80 "../../api:array_view",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010081 "../../rtc_base:checks",
mbonadeibcc21762017-09-12 04:45:24 -070082 "../../rtc_base:gtest_prod",
83 "../../rtc_base:rtc_base",
Karl Wiberg80ba3332018-02-05 10:33:35 +010084 "../../rtc_base/system:fallthrough",
mbonadeibcc21762017-09-12 04:45:24 -070085 "../../sdk:audio_objc",
86 "../../sdk:common_objc",
87 "../../system_wrappers:metrics_api",
88 ]
89 if (!build_with_chromium && is_clang) {
90 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
91 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
92 }
93 }
94}
95
Paulina Hensman7bd79a02018-03-15 12:44:12 +010096rtc_source_set("audio_device_api") {
Peter Hanspers8d95e3b2018-05-15 10:22:36 +020097 visibility = [ "*" ]
Paulina Hensman7bd79a02018-03-15 12:44:12 +010098 sources = [
99 "include/audio_device.h",
100 "include/audio_device_defines.h",
101 ]
102 deps = [
103 "../../:typedefs",
104 "../../rtc_base:checks",
105 "../../rtc_base:deprecation",
106 "../../rtc_base:rtc_base_approved",
henrika883d00f2018-03-16 10:09:49 +0100107 "../../rtc_base:stringutils",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100108 ]
109 if (!build_with_chromium && is_clang) {
110 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
111 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
112 }
113}
114
115rtc_source_set("audio_device_buffer") {
116 sources = [
117 "audio_device_buffer.cc",
118 "audio_device_buffer.h",
119 "audio_device_config.h",
120 "fine_audio_buffer.cc",
121 "fine_audio_buffer.h",
122 ]
123 deps = [
124 ":audio_device_api",
125 "../../:typedefs",
126 "../../api:array_view",
127 "../../common_audio:common_audio_c",
128 "../../rtc_base:checks",
129 "../../rtc_base:rtc_base_approved",
130 "../../rtc_base:rtc_task_queue",
131 "../../system_wrappers",
132 "../../system_wrappers:metrics_api",
133 ]
134 if (!build_with_chromium && is_clang) {
135 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
136 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
137 }
138}
139
140rtc_source_set("audio_device_generic") {
141 sources = [
142 "audio_device_generic.cc",
143 "audio_device_generic.h",
144 ]
145 deps = [
146 ":audio_device_api",
147 ":audio_device_buffer",
148 "../../rtc_base:rtc_base_approved",
149 ]
150 if (!build_with_chromium && is_clang) {
151 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
152 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
153 }
154}
155
henrika7e6fcea2018-05-18 10:20:58 +0200156rtc_source_set("audio_device_name") {
157 sources = [
158 "audio_device_name.cc",
159 "audio_device_name.h",
160 ]
161}
162
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100163# Contains default implementations of webrtc::AudioDeviceModule for Windows,
164# Linux, Mac, iOS and Android.
165rtc_source_set("audio_device_impl") {
166 visibility = [ "*" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700167 public_configs = [ ":audio_device_config" ]
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700168
Zeke Chinb3fb71c2016-02-18 15:44:07 -0800169 deps = [
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100170 ":audio_device_api",
171 ":audio_device_buffer",
172 ":audio_device_generic",
Zeke Chinb3fb71c2016-02-18 15:44:07 -0800173 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +0100174 "../../:typedefs",
kwiberg529662a2017-09-04 05:43:17 -0700175 "../../api:array_view",
Zeke Chinb3fb71c2016-02-18 15:44:07 -0800176 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100177 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100178 "../../rtc_base:checks",
Fredrik Solenberg2a877972017-12-15 16:42:15 +0100179 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700180 "../../rtc_base:rtc_base_approved",
181 "../../rtc_base:rtc_task_queue",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100182 "../../rtc_base/system:file_wrapper",
Zeke Chinb3fb71c2016-02-18 15:44:07 -0800183 "../../system_wrappers",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100184 "../../system_wrappers:metrics_api",
Zeke Chinb3fb71c2016-02-18 15:44:07 -0800185 "../utility",
186 ]
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100187 if (rtc_include_internal_audio_device && is_ios) {
188 deps += [ ":audio_device_ios_objc" ]
189 }
henrika7e6fcea2018-05-18 10:20:58 +0200190 if (is_win) {
191 deps += [ ":audio_device_name" ]
192 }
Zeke Chinb3fb71c2016-02-18 15:44:07 -0800193
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000194 sources = [
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000195 "dummy/audio_device_dummy.cc",
196 "dummy/audio_device_dummy.h",
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000197 "dummy/file_audio_device.cc",
198 "dummy/file_audio_device.h",
Patrik Höglundd4209032018-01-02 15:00:11 +0100199 "include/fake_audio_device.h",
Artem Titovf2afa572018-03-13 13:25:19 +0100200 "include/test_audio_device.cc",
Artem Titov0f039732018-03-07 12:20:51 +0100201 "include/test_audio_device.h",
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000202 ]
203
Dan Minor9c686132018-01-15 10:20:00 -0500204 if (build_with_mozilla) {
205 sources += [
206 "opensl/single_rw_fifo.cc",
207 "opensl/single_rw_fifo.h",
208 ]
209 }
210
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000211 include_dirs = []
212 if (is_linux) {
213 include_dirs += [ "linux" ]
214 }
215 if (is_ios) {
216 include_dirs += [ "ios" ]
217 }
218 if (is_mac) {
219 include_dirs += [ "mac" ]
220 }
221 if (is_win) {
222 include_dirs += [ "win" ]
223 }
224 if (is_android) {
225 include_dirs += [ "android" ]
226 }
Henrik Kjellanderb79472a2015-10-14 08:13:58 +0200227 defines = []
kjellander70bed7d2015-11-23 17:23:44 -0800228 cflags = []
henrika7be78832017-06-13 17:34:16 +0200229 if (rtc_audio_device_plays_sinus_tone) {
230 defines += [ "AUDIO_DEVICE_PLAYS_SINUS_TONE" ]
231 }
henrika883d00f2018-03-16 10:09:49 +0100232 if (rtc_enable_android_aaudio) {
233 defines += [ "AUDIO_DEVICE_INCLUDE_ANDROID_AAUDIO" ]
234 }
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000235 if (rtc_include_internal_audio_device) {
Mirko Bonadei7fc02592018-02-06 14:08:01 +0100236 # TODO(bugs.webrtc.org/8850): remove this when the circular dependency will be fixed.
237 check_includes = false
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000238 sources += [
Lu Liu4b620012017-04-06 10:17:01 -0700239 "audio_device_data_observer.cc",
Tommi931e6582015-05-20 09:44:38 +0200240 "audio_device_impl.cc",
241 "audio_device_impl.h",
Lu Liu4b620012017-04-06 10:17:01 -0700242 "include/audio_device_data_observer.h",
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000243 ]
kjellandera46a4c92016-01-07 02:54:22 -0800244 if (is_android) {
245 sources += [
Patrik Höglundd4209032018-01-02 15:00:11 +0100246 "android/audio_common.h",
kjellandera46a4c92016-01-07 02:54:22 -0800247 "android/audio_device_template.h",
248 "android/audio_manager.cc",
249 "android/audio_manager.h",
250 "android/audio_record_jni.cc",
251 "android/audio_record_jni.h",
252 "android/audio_track_jni.cc",
253 "android/audio_track_jni.h",
254 "android/build_info.cc",
255 "android/build_info.h",
256 "android/opensles_common.cc",
257 "android/opensles_common.h",
258 "android/opensles_player.cc",
259 "android/opensles_player.h",
henrika918b5542016-09-19 15:44:09 +0200260 "android/opensles_recorder.cc",
261 "android/opensles_recorder.h",
kjellandera46a4c92016-01-07 02:54:22 -0800262 ]
263 libs = [
264 "log",
265 "OpenSLES",
266 ]
henrika883d00f2018-03-16 10:09:49 +0100267 if (rtc_enable_android_aaudio) {
268 sources += [
269 "android/aaudio_player.cc",
270 "android/aaudio_player.h",
271 "android/aaudio_recorder.cc",
272 "android/aaudio_recorder.h",
273 "android/aaudio_wrapper.cc",
274 "android/aaudio_wrapper.h",
275 ]
276 libs += [ "aaudio" ]
277 }
Dan Minor9c686132018-01-15 10:20:00 -0500278
279 if (build_with_mozilla) {
280 include_dirs += [
281 "/config/external/nspr",
282 "/nsprpub/lib/ds",
283 "/nsprpub/pr/include",
284 ]
285 }
kjellandera46a4c92016-01-07 02:54:22 -0800286 }
noahricc594aa612016-08-16 18:21:18 -0700287 if (rtc_use_dummy_audio_file_devices) {
288 defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]
289 } else {
290 if (is_linux) {
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000291 sources += [
noahricc594aa612016-08-16 18:21:18 -0700292 "linux/alsasymboltable_linux.cc",
293 "linux/alsasymboltable_linux.h",
294 "linux/audio_device_alsa_linux.cc",
295 "linux/audio_device_alsa_linux.h",
296 "linux/audio_mixer_manager_alsa_linux.cc",
297 "linux/audio_mixer_manager_alsa_linux.h",
298 "linux/latebindingsymboltable_linux.cc",
299 "linux/latebindingsymboltable_linux.h",
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000300 ]
noahricc594aa612016-08-16 18:21:18 -0700301 defines += [ "LINUX_ALSA" ]
kjellanderc41d0c42017-05-30 12:06:04 -0700302 libs = [ "dl" ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100303 if (rtc_use_x11) {
kjellanderc41d0c42017-05-30 12:06:04 -0700304 libs += [ "X11" ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100305 defines += [ "WEBRTC_USE_X11" ]
kjellanderc41d0c42017-05-30 12:06:04 -0700306 }
noahricc594aa612016-08-16 18:21:18 -0700307 if (rtc_include_pulse_audio) {
308 sources += [
309 "linux/audio_device_pulse_linux.cc",
310 "linux/audio_device_pulse_linux.h",
311 "linux/audio_mixer_manager_pulse_linux.cc",
312 "linux/audio_mixer_manager_pulse_linux.h",
313 "linux/pulseaudiosymboltable_linux.cc",
314 "linux/pulseaudiosymboltable_linux.h",
315 ]
316 defines += [ "LINUX_PULSE" ]
317 }
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000318 }
noahricc594aa612016-08-16 18:21:18 -0700319 if (is_mac) {
320 sources += [
321 "mac/audio_device_mac.cc",
322 "mac/audio_device_mac.h",
323 "mac/audio_mixer_manager_mac.cc",
324 "mac/audio_mixer_manager_mac.h",
noahricc594aa612016-08-16 18:21:18 -0700325 ]
kjellander7439f972016-12-05 22:47:46 -0800326 deps += [ ":mac_portaudio" ]
noahricc594aa612016-08-16 18:21:18 -0700327 libs = [
maxmorin2ec45b92016-08-24 06:51:09 -0700328 # Needed for CoreGraphics:
329 "ApplicationServices.framework",
330
noahricc594aa612016-08-16 18:21:18 -0700331 "AudioToolbox.framework",
332 "CoreAudio.framework",
kjellanderbac04122016-06-02 02:18:48 -0700333
noahricc594aa612016-08-16 18:21:18 -0700334 # Needed for CGEventSourceKeyState in audio_device_mac.cc:
335 "CoreGraphics.framework",
336 ]
337 }
noahricc594aa612016-08-16 18:21:18 -0700338 if (is_win) {
339 sources += [
340 "win/audio_device_core_win.cc",
341 "win/audio_device_core_win.h",
henrika7e6fcea2018-05-18 10:20:58 +0200342 "win/core_audio_utility_win.cc",
343 "win/core_audio_utility_win.h",
noahricc594aa612016-08-16 18:21:18 -0700344 ]
345 libs = [
346 # Required for the built-in WASAPI AEC.
347 "dmoguids.lib",
348 "wmcodecdspuuid.lib",
349 "amstrmid.lib",
350 "msdmo.lib",
351 ]
352 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700353 configs += [ ":audio_device_warnings_config" ]
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000354 }
355 } else {
356 defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ]
357 }
358
359 if (!build_with_chromium) {
360 sources += [
361 # Do not link these into Chrome since they contain static data.
362 "dummy/file_audio_device_factory.cc",
363 "dummy/file_audio_device_factory.h",
364 ]
365 }
366
kjellandere40a7ee2016-10-16 23:56:12 -0700367 if (!build_with_chromium && is_clang) {
368 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700369 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000370 }
kjellander@webrtc.orgc4870bb2014-09-01 04:24:11 +0000371}
maxmorin69105372016-08-16 02:17:44 -0700372
kjellander7439f972016-12-05 22:47:46 -0800373rtc_source_set("mac_portaudio") {
374 visibility = [ ":*" ] # Only targets in this file can depend on this.
375 sources = [
376 "mac/portaudio/pa_memorybarrier.h",
377 "mac/portaudio/pa_ringbuffer.c",
378 "mac/portaudio/pa_ringbuffer.h",
379 ]
380}
381
mbonadei3edccb92017-06-01 04:47:20 -0700382rtc_source_set("mock_audio_device") {
383 testonly = true
384 sources = [
385 "include/mock_audio_device.h",
386 "include/mock_audio_transport.h",
Patrik Höglundd4209032018-01-02 15:00:11 +0100387 "mock_audio_device_buffer.h",
mbonadei3edccb92017-06-01 04:47:20 -0700388 ]
389 deps = [
390 ":audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100391 ":audio_device_buffer",
392 ":audio_device_impl",
mbonadei3edccb92017-06-01 04:47:20 -0700393 "../../test:test_support",
394 ]
mbonadei3edccb92017-06-01 04:47:20 -0700395}
396
aleloi5de52fd2016-11-10 01:05:34 -0800397if (rtc_include_tests) {
mbonadeibcc21762017-09-12 04:45:24 -0700398 # TODO(kthelgason): Reenable these tests on simulator.
399 # See bugs.webrtc.org/7812
400 if (is_ios && !use_ios_simulator) {
401 rtc_source_set("audio_device_ios_objc_unittests") {
402 testonly = true
403 visibility = [ ":*" ]
404 sources = [
405 "ios/audio_device_unittest_ios.mm",
406 ]
407 deps = [
408 ":audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100409 ":audio_device_buffer",
410 ":audio_device_impl",
411 ":audio_device_ios_objc",
mbonadeibcc21762017-09-12 04:45:24 -0700412 ":mock_audio_device",
413 "../../rtc_base:rtc_base_approved",
414 "../../sdk:audio_objc",
415 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100416 "../../test:fileutils",
mbonadeibcc21762017-09-12 04:45:24 -0700417 "../../test:test_support",
mbonadeibcc21762017-09-12 04:45:24 -0700418 "//third_party/ocmock",
419 ]
420 if (!build_with_chromium && is_clang) {
421 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
422 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
423 }
424 }
425 }
426
ehmaldonado36268652017-01-19 08:27:11 -0800427 rtc_source_set("audio_device_unittests") {
428 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700429
ehmaldonado36268652017-01-19 08:27:11 -0800430 sources = [
431 "fine_audio_buffer_unittest.cc",
Artem Titovf2afa572018-03-13 13:25:19 +0100432 "include/test_audio_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800433 ]
434 deps = [
435 ":audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100436 ":audio_device_buffer",
437 ":audio_device_impl",
ehmaldonado36268652017-01-19 08:27:11 -0800438 ":mock_audio_device",
kwiberg529662a2017-09-04 05:43:17 -0700439 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700440 "../../api:optional",
Artem Titov0f039732018-03-07 12:20:51 +0100441 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100442 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700443 "../../rtc_base:rtc_base_approved",
mbonadeibcc21762017-09-12 04:45:24 -0700444 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100445 "../../test:fileutils",
ehmaldonado36268652017-01-19 08:27:11 -0800446 "../../test:test_support",
447 "../utility:utility",
ehmaldonado36268652017-01-19 08:27:11 -0800448 ]
henrika1b35bab2017-03-29 07:50:19 -0700449 if (is_linux || is_mac || is_win) {
henrikaf2f91fa2017-03-17 04:26:22 -0700450 sources += [ "audio_device_unittest.cc" ]
451 }
henrika7e6fcea2018-05-18 10:20:58 +0200452 if (is_win && !rtc_use_dummy_audio_file_devices) {
453 sources += [ "win/core_audio_utility_win_unittest.cc" ]
454 }
ehmaldonado36268652017-01-19 08:27:11 -0800455 if (is_android) {
456 # Need to disable error due to the line in
457 # base/android/jni_android.h triggering it:
458 # const BASE_EXPORT jobject GetApplicationContext()
459 # error: type qualifiers ignored on function return type
460 cflags = [ "-Wno-ignored-qualifiers" ]
461 sources += [
462 "android/audio_device_unittest.cc",
463 "android/audio_manager_unittest.cc",
464 "android/ensure_initialized.cc",
465 "android/ensure_initialized.h",
466 ]
467 deps += [
468 "../../../base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700469 "../../sdk/android:libjingle_peerconnection_java",
ehmaldonado36268652017-01-19 08:27:11 -0800470 ]
471 }
ehmaldonado36268652017-01-19 08:27:11 -0800472 if (!build_with_chromium && is_clang) {
473 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
474 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
475 }
Joachim Bauch5d2bb362017-12-20 21:19:49 +0100476 if (!rtc_include_internal_audio_device) {
477 defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ]
478 }
ehmaldonado36268652017-01-19 08:27:11 -0800479 }
maxmorin69105372016-08-16 02:17:44 -0700480}
mbonadei438062b2017-01-09 02:37:21 -0800481
482if (!build_with_chromium && is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000483 rtc_android_library("audio_device_java") {
mbonadeib55bd972017-01-23 01:25:53 -0800484 java_files = [
mbonadei438062b2017-01-09 02:37:21 -0800485 "android/java/src/org/webrtc/voiceengine/BuildInfo.java",
486 "android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java",
487 "android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java",
488 "android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java",
489 "android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java",
490 "android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java",
491 ]
mbonadeib55bd972017-01-23 01:25:53 -0800492 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700493 "../../rtc_base:base_java",
mbonadeib55bd972017-01-23 01:25:53 -0800494 ]
mbonadei438062b2017-01-09 02:37:21 -0800495 }
496}