kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 1 | # Copyright (c) 2014 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 | import("../../build/webrtc.gni") |
| 10 | |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 11 | config("audio_device_config") { |
| 12 | include_dirs = [ |
| 13 | "../interface", |
| 14 | "include", |
| 15 | "dummy", # Contains dummy audio device implementations. |
| 16 | ] |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 17 | } |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 18 | |
| 19 | source_set("audio_device") { |
| 20 | sources = [ |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 21 | "audio_device_buffer.cc", |
| 22 | "audio_device_buffer.h", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame^] | 23 | "audio_device_config.h", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 24 | "audio_device_generic.cc", |
| 25 | "audio_device_generic.h", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 26 | "dummy/audio_device_dummy.cc", |
| 27 | "dummy/audio_device_dummy.h", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 28 | "dummy/file_audio_device.cc", |
| 29 | "dummy/file_audio_device.h", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame^] | 30 | "include/audio_device.h", |
| 31 | "include/audio_device_defines.h", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 32 | ] |
| 33 | |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 34 | include_dirs = [] |
| 35 | if (is_linux) { |
| 36 | include_dirs += [ "linux" ] |
| 37 | } |
| 38 | if (is_ios) { |
| 39 | include_dirs += [ "ios" ] |
| 40 | } |
| 41 | if (is_mac) { |
| 42 | include_dirs += [ "mac" ] |
| 43 | } |
| 44 | if (is_win) { |
| 45 | include_dirs += [ "win" ] |
| 46 | } |
| 47 | if (is_android) { |
| 48 | include_dirs += [ "android" ] |
| 49 | } |
kjellander@webrtc.org | 6d08ca6 | 2014-09-07 17:36:10 +0000 | [diff] [blame] | 50 | if (rtc_include_internal_audio_device) { |
Tommi | 931e658 | 2015-05-20 09:44:38 +0200 | [diff] [blame] | 51 | defines += [ "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" ] |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 52 | sources += [ |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 53 | "android/audio_device_template.h", |
henrika | 8324b52 | 2015-03-27 10:56:23 +0100 | [diff] [blame] | 54 | "android/audio_manager.cc", |
| 55 | "android/audio_manager.h", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 56 | "android/audio_record_jni.cc", |
| 57 | "android/audio_record_jni.h", |
| 58 | "android/audio_track_jni.cc", |
| 59 | "android/audio_track_jni.h", |
| 60 | "android/fine_audio_buffer.cc", |
| 61 | "android/fine_audio_buffer.h", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 62 | "android/opensles_common.cc", |
| 63 | "android/opensles_common.h", |
henrika | b261989 | 2015-05-18 16:49:16 +0200 | [diff] [blame] | 64 | "android/opensles_player.cc", |
| 65 | "android/opensles_player.h", |
Tommi | 931e658 | 2015-05-20 09:44:38 +0200 | [diff] [blame] | 66 | "audio_device_impl.cc", |
| 67 | "audio_device_impl.h", |
Tommi | df0c05b | 2015-05-19 15:30:39 +0200 | [diff] [blame] | 68 | "ios/audio_device_ios.h", |
| 69 | "ios/audio_device_ios.mm", |
Tommi | df0c05b | 2015-05-19 15:30:39 +0200 | [diff] [blame] | 70 | "linux/alsasymboltable_linux.cc", |
| 71 | "linux/alsasymboltable_linux.h", |
| 72 | "linux/audio_device_alsa_linux.cc", |
| 73 | "linux/audio_device_alsa_linux.h", |
Tommi | df0c05b | 2015-05-19 15:30:39 +0200 | [diff] [blame] | 74 | "linux/audio_mixer_manager_alsa_linux.cc", |
| 75 | "linux/audio_mixer_manager_alsa_linux.h", |
| 76 | "linux/latebindingsymboltable_linux.cc", |
| 77 | "linux/latebindingsymboltable_linux.h", |
| 78 | "mac/audio_device_mac.cc", |
| 79 | "mac/audio_device_mac.h", |
Tommi | df0c05b | 2015-05-19 15:30:39 +0200 | [diff] [blame] | 80 | "mac/audio_mixer_manager_mac.cc", |
| 81 | "mac/audio_mixer_manager_mac.h", |
| 82 | "mac/portaudio/pa_memorybarrier.h", |
| 83 | "mac/portaudio/pa_ringbuffer.c", |
| 84 | "mac/portaudio/pa_ringbuffer.h", |
| 85 | "win/audio_device_core_win.cc", |
| 86 | "win/audio_device_core_win.h", |
Tommi | df0c05b | 2015-05-19 15:30:39 +0200 | [diff] [blame] | 87 | "win/audio_device_wave_win.cc", |
| 88 | "win/audio_device_wave_win.h", |
| 89 | "win/audio_mixer_manager_win.cc", |
| 90 | "win/audio_mixer_manager_win.h", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 91 | ] |
| 92 | if (is_linux) { |
| 93 | defines += [ "LINUX_ALSA" ] |
| 94 | |
| 95 | libs = [ |
| 96 | "dl", |
| 97 | "X11", |
| 98 | ] |
| 99 | |
kjellander@webrtc.org | 6d08ca6 | 2014-09-07 17:36:10 +0000 | [diff] [blame] | 100 | if (rtc_include_pulse_audio) { |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 101 | sources += [ |
| 102 | "linux/audio_device_pulse_linux.cc", |
| 103 | "linux/audio_device_pulse_linux.h", |
| 104 | "linux/audio_mixer_manager_pulse_linux.cc", |
| 105 | "linux/audio_mixer_manager_pulse_linux.h", |
| 106 | "linux/pulseaudiosymboltable_linux.cc", |
| 107 | "linux/pulseaudiosymboltable_linux.h", |
| 108 | ] |
| 109 | |
| 110 | defines += [ "LINUX_PULSE" ] |
| 111 | } |
| 112 | } |
| 113 | if (is_mac) { |
| 114 | libs = [ |
| 115 | "AudioToolbox.framework", |
| 116 | "CoreAudio.framework", |
| 117 | ] |
| 118 | } |
| 119 | if (is_ios) { |
| 120 | cflags += [ "-fobjc-arc" ] # CLANG_ENABLE_OBJC_ARC = YES. |
| 121 | |
| 122 | libs = [ |
| 123 | "AudioToolbox.framework", |
| 124 | "AVFoundation.framework", |
kjellander@webrtc.org | d7e34e1 | 2015-01-26 19:17:26 +0000 | [diff] [blame] | 125 | "Foundation.framework", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 126 | ] |
| 127 | } |
| 128 | if (is_win) { |
| 129 | libs = [ |
| 130 | # Required for the built-in WASAPI AEC. |
| 131 | "dmoguids.lib", |
| 132 | "wmcodecdspuuid.lib", |
| 133 | "amstrmid.lib", |
| 134 | "msdmo.lib", |
| 135 | ] |
| 136 | } |
| 137 | } else { |
| 138 | defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ] |
| 139 | } |
| 140 | |
| 141 | if (!build_with_chromium) { |
| 142 | sources += [ |
| 143 | # Do not link these into Chrome since they contain static data. |
| 144 | "dummy/file_audio_device_factory.cc", |
| 145 | "dummy/file_audio_device_factory.h", |
| 146 | ] |
| 147 | } |
| 148 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 149 | configs += [ "../..:common_config" ] |
| 150 | public_configs = [ |
| 151 | "../..:common_inherited_config", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame^] | 152 | ":audio_device_config", |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 153 | ] |
| 154 | |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 155 | if (is_clang) { |
| 156 | # Suppress warnings from Chrome's Clang plugins. |
| 157 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 158 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 159 | } |
| 160 | |
| 161 | deps = [ |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 162 | "../..:webrtc_common", |
henrika@webrtc.org | 62f6e75 | 2015-02-11 08:38:35 +0000 | [diff] [blame] | 163 | "../../base:rtc_base_approved", |
kjellander@webrtc.org | c4870bb | 2014-09-01 04:24:11 +0000 | [diff] [blame] | 164 | "../../common_audio", |
| 165 | "../../system_wrappers", |
| 166 | "../utility", |
| 167 | ] |
| 168 | } |