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