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