leozwang@webrtc.org | 3053702 | 2012-03-15 18:34:13 +0000 | [diff] [blame] | 1 | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 | |
| 9 | { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 10 | 'targets': [ |
| 11 | { |
| 12 | 'target_name': 'audio_device', |
wjia@webrtc.org | a3c82bf | 2013-01-18 23:42:21 +0000 | [diff] [blame] | 13 | 'type': 'static_library', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 14 | 'dependencies': [ |
henrike@webrtc.org | ad2eb6f | 2013-10-04 14:21:23 +0000 | [diff] [blame] | 15 | 'webrtc_utility', |
henrika@webrtc.org | 62f6e75 | 2015-02-11 08:38:35 +0000 | [diff] [blame] | 16 | '<(webrtc_root)/base/base.gyp:rtc_base_approved', |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame^] | 17 | '<(webrtc_root)/common.gyp:webrtc_common', |
andrew@webrtc.org | 3423537 | 2013-04-30 23:43:26 +0000 | [diff] [blame] | 18 | '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', |
andresp@webrtc.org | 86e1e48 | 2015-01-14 09:30:52 +0000 | [diff] [blame] | 19 | '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 20 | ], |
| 21 | 'include_dirs': [ |
| 22 | '.', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 23 | '../interface', |
andrew@webrtc.org | 236d5d3 | 2012-09-21 20:46:40 +0000 | [diff] [blame] | 24 | 'include', |
phoglund@webrtc.org | 8454ad1 | 2014-06-11 14:12:04 +0000 | [diff] [blame] | 25 | 'dummy', # Contains dummy audio device implementations. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | ], |
| 27 | 'direct_dependent_settings': { |
| 28 | 'include_dirs': [ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 29 | '../interface', |
andrew@webrtc.org | 236d5d3 | 2012-09-21 20:46:40 +0000 | [diff] [blame] | 30 | 'include', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 31 | ], |
| 32 | }, |
| 33 | # TODO(xians): Rename files to e.g. *_linux.{ext}, remove sources in conditions section |
| 34 | 'sources': [ |
andrew@webrtc.org | 236d5d3 | 2012-09-21 20:46:40 +0000 | [diff] [blame] | 35 | 'include/audio_device.h', |
| 36 | 'include/audio_device_defines.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 37 | 'audio_device_buffer.cc', |
| 38 | 'audio_device_buffer.h', |
| 39 | 'audio_device_generic.cc', |
| 40 | 'audio_device_generic.h', |
| 41 | 'audio_device_utility.cc', |
| 42 | 'audio_device_utility.h', |
| 43 | 'audio_device_impl.cc', |
| 44 | 'audio_device_impl.h', |
| 45 | 'audio_device_config.h', |
pbos@webrtc.org | 096515b | 2013-07-30 12:32:59 +0000 | [diff] [blame] | 46 | 'dummy/audio_device_dummy.cc', |
xians@google.com | 68efa21 | 2011-08-11 12:41:56 +0000 | [diff] [blame] | 47 | 'dummy/audio_device_dummy.h', |
pbos@webrtc.org | 096515b | 2013-07-30 12:32:59 +0000 | [diff] [blame] | 48 | 'dummy/audio_device_utility_dummy.cc', |
xians@google.com | 68efa21 | 2011-08-11 12:41:56 +0000 | [diff] [blame] | 49 | 'dummy/audio_device_utility_dummy.h', |
phoglund@webrtc.org | 8454ad1 | 2014-06-11 14:12:04 +0000 | [diff] [blame] | 50 | 'dummy/file_audio_device.cc', |
| 51 | 'dummy/file_audio_device.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 52 | ], |
| 53 | 'conditions': [ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 54 | ['OS=="linux"', { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 55 | 'include_dirs': [ |
xians@google.com | 68efa21 | 2011-08-11 12:41:56 +0000 | [diff] [blame] | 56 | 'linux', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 57 | ], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 58 | }], # OS==linux |
sjlee@webrtc.org | 4b42508 | 2012-09-10 17:58:21 +0000 | [diff] [blame] | 59 | ['OS=="ios"', { |
| 60 | 'include_dirs': [ |
| 61 | 'ios', |
| 62 | ], |
| 63 | }], # OS==ios |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 64 | ['OS=="mac"', { |
sjlee@webrtc.org | 4b42508 | 2012-09-10 17:58:21 +0000 | [diff] [blame] | 65 | 'include_dirs': [ |
| 66 | 'mac', |
| 67 | ], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 68 | }], # OS==mac |
| 69 | ['OS=="win"', { |
sjlee@webrtc.org | 4b42508 | 2012-09-10 17:58:21 +0000 | [diff] [blame] | 70 | 'include_dirs': [ |
| 71 | 'win', |
sjlee@webrtc.org | 4b42508 | 2012-09-10 17:58:21 +0000 | [diff] [blame] | 72 | ], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 73 | }], |
leozwang@webrtc.org | 4ad4c24 | 2012-02-22 16:04:59 +0000 | [diff] [blame] | 74 | ['OS=="android"', { |
andrew@webrtc.org | 236d5d3 | 2012-09-21 20:46:40 +0000 | [diff] [blame] | 75 | 'include_dirs': [ |
| 76 | 'android', |
| 77 | ], |
leozwang@webrtc.org | 4ad4c24 | 2012-02-22 16:04:59 +0000 | [diff] [blame] | 78 | }], # OS==android |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 79 | ['include_internal_audio_device==0', { |
| 80 | 'defines': [ |
| 81 | 'WEBRTC_DUMMY_AUDIO_BUILD', |
| 82 | ], |
| 83 | }], |
phoglund@webrtc.org | 8454ad1 | 2014-06-11 14:12:04 +0000 | [diff] [blame] | 84 | ['build_with_chromium==0', { |
| 85 | 'sources': [ |
| 86 | # Don't link these into Chrome since they contain static data. |
| 87 | 'dummy/file_audio_device_factory.cc', |
| 88 | 'dummy/file_audio_device_factory.h', |
| 89 | ], |
| 90 | }], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 91 | ['include_internal_audio_device==1', { |
| 92 | 'sources': [ |
| 93 | 'linux/alsasymboltable_linux.cc', |
| 94 | 'linux/alsasymboltable_linux.h', |
| 95 | 'linux/audio_device_alsa_linux.cc', |
| 96 | 'linux/audio_device_alsa_linux.h', |
| 97 | 'linux/audio_device_utility_linux.cc', |
| 98 | 'linux/audio_device_utility_linux.h', |
| 99 | 'linux/audio_mixer_manager_alsa_linux.cc', |
| 100 | 'linux/audio_mixer_manager_alsa_linux.h', |
| 101 | 'linux/latebindingsymboltable_linux.cc', |
| 102 | 'linux/latebindingsymboltable_linux.h', |
tkchin@webrtc.org | 122caa5 | 2014-07-15 20:20:47 +0000 | [diff] [blame] | 103 | 'ios/audio_device_ios.mm', |
sjlee@webrtc.org | 4b42508 | 2012-09-10 17:58:21 +0000 | [diff] [blame] | 104 | 'ios/audio_device_ios.h', |
| 105 | 'ios/audio_device_utility_ios.cc', |
| 106 | 'ios/audio_device_utility_ios.h', |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 107 | 'mac/audio_device_mac.cc', |
| 108 | 'mac/audio_device_mac.h', |
| 109 | 'mac/audio_device_utility_mac.cc', |
| 110 | 'mac/audio_device_utility_mac.h', |
| 111 | 'mac/audio_mixer_manager_mac.cc', |
| 112 | 'mac/audio_mixer_manager_mac.h', |
| 113 | 'mac/portaudio/pa_memorybarrier.h', |
| 114 | 'mac/portaudio/pa_ringbuffer.c', |
| 115 | 'mac/portaudio/pa_ringbuffer.h', |
| 116 | 'win/audio_device_core_win.cc', |
| 117 | 'win/audio_device_core_win.h', |
| 118 | 'win/audio_device_wave_win.cc', |
| 119 | 'win/audio_device_wave_win.h', |
| 120 | 'win/audio_device_utility_win.cc', |
| 121 | 'win/audio_device_utility_win.h', |
| 122 | 'win/audio_mixer_manager_win.cc', |
| 123 | 'win/audio_mixer_manager_win.h', |
henrike@webrtc.org | 9ee75e9 | 2013-12-11 21:42:44 +0000 | [diff] [blame] | 124 | 'android/audio_device_template.h', |
leozwang@webrtc.org | 4ad4c24 | 2012-02-22 16:04:59 +0000 | [diff] [blame] | 125 | 'android/audio_device_utility_android.cc', |
| 126 | 'android/audio_device_utility_android.h', |
henrike@webrtc.org | 9ee75e9 | 2013-12-11 21:42:44 +0000 | [diff] [blame] | 127 | 'android/audio_manager_jni.cc', |
| 128 | 'android/audio_manager_jni.h', |
| 129 | 'android/audio_record_jni.cc', |
| 130 | 'android/audio_record_jni.h', |
| 131 | 'android/audio_track_jni.cc', |
| 132 | 'android/audio_track_jni.h', |
| 133 | 'android/fine_audio_buffer.cc', |
| 134 | 'android/fine_audio_buffer.h', |
| 135 | 'android/low_latency_event_posix.cc', |
| 136 | 'android/low_latency_event.h', |
| 137 | 'android/opensles_common.cc', |
| 138 | 'android/opensles_common.h', |
| 139 | 'android/opensles_input.cc', |
| 140 | 'android/opensles_input.h', |
| 141 | 'android/opensles_output.cc', |
| 142 | 'android/opensles_output.h', |
| 143 | 'android/single_rw_fifo.cc', |
| 144 | 'android/single_rw_fifo.h', |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 145 | ], |
wjia@google.com | 647aa16 | 2011-07-21 20:45:31 +0000 | [diff] [blame] | 146 | 'conditions': [ |
leozwang@webrtc.org | 3197d48 | 2012-03-02 17:12:14 +0000 | [diff] [blame] | 147 | ['OS=="android"', { |
| 148 | 'link_settings': { |
| 149 | 'libraries': [ |
| 150 | '-llog', |
| 151 | '-lOpenSLES', |
| 152 | ], |
| 153 | }, |
| 154 | }], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 155 | ['OS=="linux"', { |
wjia@google.com | 647aa16 | 2011-07-21 20:45:31 +0000 | [diff] [blame] | 156 | 'defines': [ |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 157 | 'LINUX_ALSA', |
wjia@google.com | 647aa16 | 2011-07-21 20:45:31 +0000 | [diff] [blame] | 158 | ], |
| 159 | 'link_settings': { |
| 160 | 'libraries': [ |
niklas.enbom@webrtc.org | e2a8006 | 2013-05-14 21:33:11 +0000 | [diff] [blame] | 161 | '-ldl','-lX11', |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 162 | ], |
| 163 | }, |
| 164 | 'conditions': [ |
| 165 | ['include_pulse_audio==1', { |
| 166 | 'defines': [ |
| 167 | 'LINUX_PULSE', |
| 168 | ], |
| 169 | 'sources': [ |
| 170 | 'linux/audio_device_pulse_linux.cc', |
| 171 | 'linux/audio_device_pulse_linux.h', |
| 172 | 'linux/audio_mixer_manager_pulse_linux.cc', |
| 173 | 'linux/audio_mixer_manager_pulse_linux.h', |
| 174 | 'linux/pulseaudiosymboltable_linux.cc', |
| 175 | 'linux/pulseaudiosymboltable_linux.h', |
| 176 | ], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 177 | }], |
| 178 | ], |
| 179 | }], |
tkchin@webrtc.org | 122caa5 | 2014-07-15 20:20:47 +0000 | [diff] [blame] | 180 | ['OS=="mac"', { |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 181 | 'link_settings': { |
| 182 | 'libraries': [ |
| 183 | '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework', |
| 184 | '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework', |
wjia@google.com | 647aa16 | 2011-07-21 20:45:31 +0000 | [diff] [blame] | 185 | ], |
| 186 | }, |
| 187 | }], |
tkchin@webrtc.org | 122caa5 | 2014-07-15 20:20:47 +0000 | [diff] [blame] | 188 | ['OS=="ios"', { |
| 189 | 'xcode_settings': { |
| 190 | 'CLANG_ENABLE_OBJC_ARC': 'YES', |
| 191 | }, |
| 192 | 'link_settings': { |
| 193 | 'xcode_settings': { |
| 194 | 'OTHER_LDFLAGS': [ |
| 195 | '-framework AudioToolbox', |
| 196 | '-framework AVFoundation', |
kjellander@webrtc.org | d7e34e1 | 2015-01-26 19:17:26 +0000 | [diff] [blame] | 197 | '-framework Foundation', |
tkchin@webrtc.org | 122caa5 | 2014-07-15 20:20:47 +0000 | [diff] [blame] | 198 | ], |
| 199 | }, |
| 200 | }, |
| 201 | }], |
andrew@webrtc.org | a3c6d61 | 2011-09-13 17:17:49 +0000 | [diff] [blame] | 202 | ['OS=="win"', { |
| 203 | 'link_settings': { |
| 204 | 'libraries': [ |
| 205 | # Required for the built-in WASAPI AEC. |
| 206 | '-ldmoguids.lib', |
| 207 | '-lwmcodecdspuuid.lib', |
| 208 | '-lamstrmid.lib', |
| 209 | '-lmsdmo.lib', |
| 210 | ], |
| 211 | }, |
| 212 | }], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 213 | ], # conditions |
| 214 | }], # include_internal_audio_device==1 |
| 215 | ], # conditions |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 216 | }, |
xians@google.com | 7fa20c3 | 2011-08-05 12:04:30 +0000 | [diff] [blame] | 217 | ], |
kjellander@webrtc.org | 67fdd70 | 2012-03-09 08:11:04 +0000 | [diff] [blame] | 218 | 'conditions': [ |
mflodman@webrtc.org | 6af9594 | 2012-05-24 13:23:35 +0000 | [diff] [blame] | 219 | ['include_tests==1', { |
xians@google.com | 7fa20c3 | 2011-08-05 12:04:30 +0000 | [diff] [blame] | 220 | 'targets': [ |
| 221 | { |
phoglund@webrtc.org | 32fe90b | 2013-08-19 11:40:19 +0000 | [diff] [blame] | 222 | 'target_name': 'audio_device_tests', |
xians@google.com | 7fa20c3 | 2011-08-05 12:04:30 +0000 | [diff] [blame] | 223 | 'type': 'executable', |
| 224 | 'dependencies': [ |
xians@google.com | 3d292f1 | 2011-08-05 08:32:13 +0000 | [diff] [blame] | 225 | 'audio_device', |
xians@google.com | d3185fe | 2011-09-12 12:24:39 +0000 | [diff] [blame] | 226 | 'webrtc_utility', |
andrew@webrtc.org | 81cf5e4 | 2012-06-27 01:41:54 +0000 | [diff] [blame] | 227 | '<(webrtc_root)/test/test.gyp:test_support_main', |
| 228 | '<(DEPTH)/testing/gtest.gyp:gtest', |
andresp@webrtc.org | 86e1e48 | 2015-01-14 09:30:52 +0000 | [diff] [blame] | 229 | '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers', |
xians@google.com | 3d292f1 | 2011-08-05 08:32:13 +0000 | [diff] [blame] | 230 | ], |
| 231 | 'sources': [ |
andrew@webrtc.org | 236d5d3 | 2012-09-21 20:46:40 +0000 | [diff] [blame] | 232 | 'test/audio_device_test_api.cc', |
| 233 | 'test/audio_device_test_defines.h', |
xians@google.com | 3d292f1 | 2011-08-05 08:32:13 +0000 | [diff] [blame] | 234 | ], |
| 235 | }, |
| 236 | { |
| 237 | 'target_name': 'audio_device_test_func', |
| 238 | 'type': 'executable', |
| 239 | 'dependencies': [ |
| 240 | 'audio_device', |
xians@google.com | d3185fe | 2011-09-12 12:24:39 +0000 | [diff] [blame] | 241 | 'webrtc_utility', |
andrew@webrtc.org | 3423537 | 2013-04-30 23:43:26 +0000 | [diff] [blame] | 242 | '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', |
andresp@webrtc.org | 86e1e48 | 2015-01-14 09:30:52 +0000 | [diff] [blame] | 243 | '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers', |
andrew@webrtc.org | 81cf5e4 | 2012-06-27 01:41:54 +0000 | [diff] [blame] | 244 | '<(webrtc_root)/test/test.gyp:test_support', |
| 245 | '<(DEPTH)/testing/gtest.gyp:gtest', |
xians@google.com | 3d292f1 | 2011-08-05 08:32:13 +0000 | [diff] [blame] | 246 | ], |
| 247 | 'sources': [ |
andrew@webrtc.org | 236d5d3 | 2012-09-21 20:46:40 +0000 | [diff] [blame] | 248 | 'test/audio_device_test_func.cc', |
| 249 | 'test/audio_device_test_defines.h', |
| 250 | 'test/func_test_manager.cc', |
| 251 | 'test/func_test_manager.h', |
xians@google.com | 3d292f1 | 2011-08-05 08:32:13 +0000 | [diff] [blame] | 252 | ], |
xians@google.com | 7fa20c3 | 2011-08-05 12:04:30 +0000 | [diff] [blame] | 253 | }, |
kjellander@webrtc.org | 3365422 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 254 | ], # targets |
| 255 | 'conditions': [ |
| 256 | ['test_isolation_mode != "noop"', { |
| 257 | 'targets': [ |
| 258 | { |
| 259 | 'target_name': 'audio_device_tests_run', |
| 260 | 'type': 'none', |
| 261 | 'dependencies': [ |
kjellander@webrtc.org | 3365422 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 262 | 'audio_device_tests', |
| 263 | ], |
| 264 | 'includes': [ |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 265 | '../../build/isolate.gypi', |
kjellander@webrtc.org | 3365422 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 266 | ], |
| 267 | 'sources': [ |
| 268 | 'audio_device_tests.isolate', |
| 269 | ], |
| 270 | }, |
| 271 | ], |
| 272 | }], |
henrike@webrtc.org | 1fdc51a | 2013-10-02 14:58:19 +0000 | [diff] [blame] | 273 | ['OS=="android" and enable_android_opensl==1', { |
| 274 | 'targets': [ |
| 275 | { |
henrike@webrtc.org | 82f014a | 2013-09-10 18:24:07 +0000 | [diff] [blame] | 276 | 'target_name': 'audio_device_unittest', |
| 277 | 'type': 'executable', |
| 278 | 'dependencies': [ |
| 279 | 'audio_device', |
| 280 | 'webrtc_utility', |
| 281 | '<(DEPTH)/testing/gmock.gyp:gmock', |
| 282 | '<(DEPTH)/testing/gtest.gyp:gtest', |
andresp@webrtc.org | 86e1e48 | 2015-01-14 09:30:52 +0000 | [diff] [blame] | 283 | '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers', |
henrike@webrtc.org | 82f014a | 2013-09-10 18:24:07 +0000 | [diff] [blame] | 284 | '<(webrtc_root)/test/test.gyp:test_support_main', |
| 285 | ], |
| 286 | 'sources': [ |
| 287 | 'android/fine_audio_buffer_unittest.cc', |
| 288 | 'android/low_latency_event_unittest.cc', |
| 289 | 'android/single_rw_fifo_unittest.cc', |
| 290 | 'mock/mock_audio_device_buffer.h', |
| 291 | ], |
| 292 | }, |
| 293 | ], |
| 294 | }], |
| 295 | ], |
kjellander@webrtc.org | 3365422 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 296 | }], # include_tests |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 297 | ], |
| 298 | } |
| 299 | |