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