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 | '.', |
Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 23 | '../include', |
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': [ |
Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 29 | '../include', |
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', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 41 | 'audio_device_config.h', |
pbos@webrtc.org | 096515b | 2013-07-30 12:32:59 +0000 | [diff] [blame] | 42 | 'dummy/audio_device_dummy.cc', |
xians@google.com | 68efa21 | 2011-08-11 12:41:56 +0000 | [diff] [blame] | 43 | 'dummy/audio_device_dummy.h', |
phoglund@webrtc.org | 8454ad1 | 2014-06-11 14:12:04 +0000 | [diff] [blame] | 44 | 'dummy/file_audio_device.cc', |
| 45 | 'dummy/file_audio_device.h', |
henrika | 86d907c | 2015-09-07 16:09:50 +0200 | [diff] [blame] | 46 | 'fine_audio_buffer.cc', |
| 47 | 'fine_audio_buffer.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 | }], |
phoglund@webrtc.org | 8454ad1 | 2014-06-11 14:12:04 +0000 | [diff] [blame] | 80 | ['build_with_chromium==0', { |
| 81 | 'sources': [ |
| 82 | # Don't link these into Chrome since they contain static data. |
| 83 | 'dummy/file_audio_device_factory.cc', |
| 84 | 'dummy/file_audio_device_factory.h', |
| 85 | ], |
| 86 | }], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 87 | ['include_internal_audio_device==1', { |
| 88 | 'sources': [ |
Tommi | 931e658 | 2015-05-20 09:44:38 +0200 | [diff] [blame] | 89 | 'audio_device_impl.cc', |
| 90 | 'audio_device_impl.h', |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 91 | ], |
wjia@google.com | 647aa16 | 2011-07-21 20:45:31 +0000 | [diff] [blame] | 92 | 'conditions': [ |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 93 | ['use_dummy_audio_file_devices==1', { |
wjia@google.com | 647aa16 | 2011-07-21 20:45:31 +0000 | [diff] [blame] | 94 | 'defines': [ |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 95 | 'WEBRTC_DUMMY_FILE_DEVICES', |
wjia@google.com | 647aa16 | 2011-07-21 20:45:31 +0000 | [diff] [blame] | 96 | ], |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 97 | }, { # use_dummy_audio_file_devices==0, so use a platform device. |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 98 | 'conditions': [ |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 99 | ['OS=="android"', { |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 100 | 'sources': [ |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 101 | 'android/audio_device_template.h', |
| 102 | 'android/audio_manager.cc', |
| 103 | 'android/audio_manager.h', |
| 104 | 'android/audio_record_jni.cc', |
| 105 | 'android/audio_record_jni.h', |
| 106 | 'android/audio_track_jni.cc', |
| 107 | 'android/audio_track_jni.h', |
| 108 | 'android/build_info.cc', |
| 109 | 'android/build_info.h', |
| 110 | 'android/opensles_common.cc', |
| 111 | 'android/opensles_common.h', |
| 112 | 'android/opensles_player.cc', |
| 113 | 'android/opensles_player.h', |
henrika | 918b554 | 2016-09-19 15:44:09 +0200 | [diff] [blame] | 114 | 'android/opensles_recorder.cc', |
| 115 | 'android/opensles_recorder.h', |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 116 | ], |
| 117 | 'link_settings': { |
| 118 | 'libraries': [ |
| 119 | '-llog', |
| 120 | '-lOpenSLES', |
| 121 | ], |
| 122 | }, |
| 123 | }], |
| 124 | ['OS=="linux"', { |
| 125 | 'sources': [ |
| 126 | 'linux/alsasymboltable_linux.cc', |
| 127 | 'linux/alsasymboltable_linux.h', |
| 128 | 'linux/audio_device_alsa_linux.cc', |
| 129 | 'linux/audio_device_alsa_linux.h', |
| 130 | 'linux/audio_mixer_manager_alsa_linux.cc', |
| 131 | 'linux/audio_mixer_manager_alsa_linux.h', |
| 132 | 'linux/latebindingsymboltable_linux.cc', |
| 133 | 'linux/latebindingsymboltable_linux.h', |
| 134 | ], |
| 135 | 'defines': [ |
| 136 | 'LINUX_ALSA', |
| 137 | ], |
| 138 | 'link_settings': { |
| 139 | 'libraries': [ |
| 140 | '-ldl','-lX11', |
| 141 | ], |
| 142 | }, |
| 143 | 'conditions': [ |
| 144 | ['include_pulse_audio==1', { |
| 145 | 'defines': [ |
| 146 | 'LINUX_PULSE', |
| 147 | ], |
| 148 | 'sources': [ |
| 149 | 'linux/audio_device_pulse_linux.cc', |
| 150 | 'linux/audio_device_pulse_linux.h', |
| 151 | 'linux/audio_mixer_manager_pulse_linux.cc', |
| 152 | 'linux/audio_mixer_manager_pulse_linux.h', |
| 153 | 'linux/pulseaudiosymboltable_linux.cc', |
| 154 | 'linux/pulseaudiosymboltable_linux.h', |
| 155 | ], |
| 156 | }], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 157 | ], |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 158 | }], |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 159 | ['OS=="mac"', { |
| 160 | 'sources': [ |
| 161 | 'mac/audio_device_mac.cc', |
| 162 | 'mac/audio_device_mac.h', |
| 163 | 'mac/audio_mixer_manager_mac.cc', |
| 164 | 'mac/audio_mixer_manager_mac.h', |
| 165 | 'mac/portaudio/pa_memorybarrier.h', |
| 166 | 'mac/portaudio/pa_ringbuffer.c', |
| 167 | 'mac/portaudio/pa_ringbuffer.h', |
tkchin@webrtc.org | 122caa5 | 2014-07-15 20:20:47 +0000 | [diff] [blame] | 168 | ], |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 169 | 'link_settings': { |
| 170 | 'libraries': [ |
| 171 | '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework', |
| 172 | '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework', |
| 173 | ], |
| 174 | }, |
| 175 | }], |
| 176 | ['OS=="ios"', { |
| 177 | 'dependencies': [ |
maxmorin | ec62374 | 2016-09-15 05:11:55 -0700 | [diff] [blame] | 178 | '<(webrtc_root)/base/base.gyp:rtc_base', |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 179 | '<(webrtc_root)/sdk/sdk.gyp:rtc_sdk_common_objc', |
kjellander | 7cae30c | 2015-12-16 14:05:29 -0800 | [diff] [blame] | 180 | ], |
noahric | c594aa61 | 2016-08-16 18:21:18 -0700 | [diff] [blame] | 181 | 'export_dependent_settings': [ |
| 182 | '<(webrtc_root)/sdk/sdk.gyp:rtc_sdk_common_objc', |
| 183 | ], |
| 184 | 'sources': [ |
| 185 | 'ios/audio_device_ios.h', |
| 186 | 'ios/audio_device_ios.mm', |
| 187 | 'ios/audio_device_not_implemented_ios.mm', |
| 188 | 'ios/audio_session_observer.h', |
| 189 | 'ios/objc/RTCAudioSession+Configuration.mm', |
| 190 | 'ios/objc/RTCAudioSession+Private.h', |
| 191 | 'ios/objc/RTCAudioSession.h', |
| 192 | 'ios/objc/RTCAudioSession.mm', |
| 193 | 'ios/objc/RTCAudioSessionConfiguration.h', |
| 194 | 'ios/objc/RTCAudioSessionConfiguration.m', |
| 195 | 'ios/objc/RTCAudioSessionDelegateAdapter.h', |
| 196 | 'ios/objc/RTCAudioSessionDelegateAdapter.mm', |
| 197 | 'ios/voice_processing_audio_unit.h', |
| 198 | 'ios/voice_processing_audio_unit.mm', |
| 199 | ], |
| 200 | 'xcode_settings': { |
| 201 | 'CLANG_ENABLE_OBJC_ARC': 'YES', |
| 202 | }, |
| 203 | 'link_settings': { |
| 204 | 'xcode_settings': { |
| 205 | 'OTHER_LDFLAGS': [ |
| 206 | '-framework AudioToolbox', |
| 207 | '-framework AVFoundation', |
| 208 | '-framework Foundation', |
| 209 | '-framework UIKit', |
| 210 | ], |
| 211 | }, |
| 212 | }, |
| 213 | }], |
| 214 | ['OS=="win"', { |
| 215 | 'sources': [ |
| 216 | 'win/audio_device_core_win.cc', |
| 217 | 'win/audio_device_core_win.h', |
| 218 | 'win/audio_device_wave_win.cc', |
| 219 | 'win/audio_device_wave_win.h', |
| 220 | 'win/audio_mixer_manager_win.cc', |
| 221 | 'win/audio_mixer_manager_win.h', |
| 222 | ], |
| 223 | 'link_settings': { |
| 224 | 'libraries': [ |
| 225 | # Required for the built-in WASAPI AEC. |
| 226 | '-ldmoguids.lib', |
| 227 | '-lwmcodecdspuuid.lib', |
| 228 | '-lamstrmid.lib', |
| 229 | '-lmsdmo.lib', |
| 230 | ], |
| 231 | }, |
| 232 | }], |
| 233 | ['OS=="win" and clang==1', { |
| 234 | 'msvs_settings': { |
| 235 | 'VCCLCompilerTool': { |
| 236 | 'AdditionalOptions': [ |
| 237 | # Disable warnings failing when compiling with Clang on Windows. |
| 238 | # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 |
| 239 | '-Wno-bool-conversion', |
| 240 | '-Wno-delete-non-virtual-dtor', |
| 241 | '-Wno-logical-op-parentheses', |
| 242 | '-Wno-microsoft-extra-qualification', |
| 243 | '-Wno-microsoft-goto', |
| 244 | '-Wno-missing-braces', |
| 245 | '-Wno-parentheses-equality', |
| 246 | '-Wno-reorder', |
| 247 | '-Wno-shift-overflow', |
| 248 | '-Wno-tautological-compare', |
| 249 | '-Wno-unused-private-field', |
| 250 | ], |
| 251 | }, |
| 252 | }, |
| 253 | }], |
| 254 | ], # conditions (for non-dummy devices) |
| 255 | }], # use_dummy_audio_file_devices check |
xians@google.com | bf5d2ba | 2011-08-16 07:44:19 +0000 | [diff] [blame] | 256 | ], # conditions |
| 257 | }], # include_internal_audio_device==1 |
| 258 | ], # conditions |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 259 | }, |
xians@google.com | 7fa20c3 | 2011-08-05 12:04:30 +0000 | [diff] [blame] | 260 | ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 261 | } |
| 262 | |