OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | |
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 { | |
10 'targets': [ | |
11 { | |
12 'target_name': 'audio_device', | |
13 'type': 'static_library', | |
14 'dependencies': [ | |
15 'webrtc_utility', | |
16 '<(webrtc_root)/base/base.gyp:rtc_base_approved', | |
17 '<(webrtc_root)/common.gyp:webrtc_common', | |
18 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', | |
19 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers', | |
20 ], | |
21 'include_dirs': [ | |
22 '.', | |
23 '../include', | |
24 'include', | |
25 'dummy', # Contains dummy audio device implementations. | |
26 ], | |
27 'direct_dependent_settings': { | |
28 'include_dirs': [ | |
29 '../include', | |
30 'include', | |
31 ], | |
32 }, | |
33 # TODO(xians): Rename files to e.g. *_linux.{ext}, remove sources in condi
tions section | |
34 'sources': [ | |
35 'include/audio_device.h', | |
36 'include/audio_device_defines.h', | |
37 'audio_device_buffer.cc', | |
38 'audio_device_buffer.h', | |
39 'audio_device_generic.cc', | |
40 'audio_device_generic.h', | |
41 'audio_device_config.h', | |
42 'dummy/audio_device_dummy.cc', | |
43 'dummy/audio_device_dummy.h', | |
44 'dummy/file_audio_device.cc', | |
45 'dummy/file_audio_device.h', | |
46 'fine_audio_buffer.cc', | |
47 'fine_audio_buffer.h', | |
48 ], | |
49 'conditions': [ | |
50 ['OS=="linux"', { | |
51 'include_dirs': [ | |
52 'linux', | |
53 ], | |
54 }], # OS==linux | |
55 ['OS=="ios"', { | |
56 'include_dirs': [ | |
57 'ios', | |
58 ], | |
59 }], # OS==ios | |
60 ['OS=="mac"', { | |
61 'include_dirs': [ | |
62 'mac', | |
63 ], | |
64 }], # OS==mac | |
65 ['OS=="win"', { | |
66 'include_dirs': [ | |
67 'win', | |
68 ], | |
69 }], | |
70 ['OS=="android"', { | |
71 'include_dirs': [ | |
72 'android', | |
73 ], | |
74 }], # OS==android | |
75 ['include_internal_audio_device==0', { | |
76 'defines': [ | |
77 'WEBRTC_DUMMY_AUDIO_BUILD', | |
78 ], | |
79 }], | |
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 }], | |
87 ['include_internal_audio_device==1', { | |
88 'sources': [ | |
89 'audio_device_impl.cc', | |
90 'audio_device_impl.h', | |
91 ], | |
92 'conditions': [ | |
93 ['use_dummy_audio_file_devices==1', { | |
94 'defines': [ | |
95 'WEBRTC_DUMMY_FILE_DEVICES', | |
96 ], | |
97 }, { # use_dummy_audio_file_devices==0, so use a platform device. | |
98 'conditions': [ | |
99 ['OS=="android"', { | |
100 'sources': [ | |
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', | |
114 'android/opensles_recorder.cc', | |
115 'android/opensles_recorder.h', | |
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 }], | |
157 ], | |
158 }], | |
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', | |
168 ], | |
169 'link_settings': { | |
170 'libraries': [ | |
171 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framewo
rk', | |
172 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework'
, | |
173 ], | |
174 }, | |
175 }], | |
176 ['OS=="ios"', { | |
177 'dependencies': [ | |
178 '<(webrtc_root)/base/base.gyp:rtc_base', | |
179 '<(webrtc_root)/sdk/sdk.gyp:rtc_sdk_common_objc', | |
180 ], | |
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=53
66 | |
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 | |
256 ], # conditions | |
257 }], # include_internal_audio_device==1 | |
258 ], # conditions | |
259 }, | |
260 ], | |
261 } | |
262 | |
OLD | NEW |