# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
#
|
# Use of this source code is governed by a BSD-style license
|
# that can be found in the LICENSE file in the root of the source
|
# tree. An additional intellectual property rights grant can be found
|
# in the file PATENTS. All contributing project authors may
|
# be found in the AUTHORS file in the root of the source tree.
|
|
import("../../build/webrtc.gni")
|
|
config("audio_device_config") {
|
include_dirs = [
|
"../include",
|
"include",
|
"dummy", # Contains dummy audio device implementations.
|
]
|
}
|
|
source_set("audio_device") {
|
sources = [
|
"audio_device_buffer.cc",
|
"audio_device_buffer.h",
|
"audio_device_config.h",
|
"audio_device_generic.cc",
|
"audio_device_generic.h",
|
"dummy/audio_device_dummy.cc",
|
"dummy/audio_device_dummy.h",
|
"dummy/file_audio_device.cc",
|
"dummy/file_audio_device.h",
|
"fine_audio_buffer.cc",
|
"fine_audio_buffer.h",
|
"include/audio_device.h",
|
"include/audio_device_defines.h",
|
]
|
|
include_dirs = []
|
if (is_linux) {
|
include_dirs += [ "linux" ]
|
}
|
if (is_ios) {
|
include_dirs += [ "ios" ]
|
}
|
if (is_mac) {
|
include_dirs += [ "mac" ]
|
}
|
if (is_win) {
|
include_dirs += [ "win" ]
|
}
|
if (is_android) {
|
include_dirs += [ "android" ]
|
}
|
defines = []
|
cflags = []
|
if (rtc_include_internal_audio_device) {
|
defines += [ "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" ]
|
sources += [
|
"audio_device_impl.cc",
|
"audio_device_impl.h",
|
]
|
if (is_android) {
|
sources += [
|
"android/audio_device_template.h",
|
"android/audio_manager.cc",
|
"android/audio_manager.h",
|
"android/audio_record_jni.cc",
|
"android/audio_record_jni.h",
|
"android/audio_track_jni.cc",
|
"android/audio_track_jni.h",
|
"android/build_info.cc",
|
"android/build_info.h",
|
"android/opensles_common.cc",
|
"android/opensles_common.h",
|
"android/opensles_player.cc",
|
"android/opensles_player.h",
|
]
|
libs = [
|
"log",
|
"OpenSLES",
|
]
|
}
|
if (is_linux) {
|
sources += [
|
"linux/alsasymboltable_linux.cc",
|
"linux/alsasymboltable_linux.h",
|
"linux/audio_device_alsa_linux.cc",
|
"linux/audio_device_alsa_linux.h",
|
"linux/audio_mixer_manager_alsa_linux.cc",
|
"linux/audio_mixer_manager_alsa_linux.h",
|
"linux/latebindingsymboltable_linux.cc",
|
"linux/latebindingsymboltable_linux.h",
|
]
|
defines += [ "LINUX_ALSA" ]
|
libs = [
|
"dl",
|
"X11",
|
]
|
if (rtc_include_pulse_audio) {
|
sources += [
|
"linux/audio_device_pulse_linux.cc",
|
"linux/audio_device_pulse_linux.h",
|
"linux/audio_mixer_manager_pulse_linux.cc",
|
"linux/audio_mixer_manager_pulse_linux.h",
|
"linux/pulseaudiosymboltable_linux.cc",
|
"linux/pulseaudiosymboltable_linux.h",
|
]
|
defines += [ "LINUX_PULSE" ]
|
}
|
}
|
if (is_mac) {
|
sources += [
|
"mac/audio_device_mac.cc",
|
"mac/audio_device_mac.h",
|
"mac/audio_mixer_manager_mac.cc",
|
"mac/audio_mixer_manager_mac.h",
|
"mac/portaudio/pa_memorybarrier.h",
|
"mac/portaudio/pa_ringbuffer.c",
|
"mac/portaudio/pa_ringbuffer.h",
|
]
|
libs = [
|
"AudioToolbox.framework",
|
"CoreAudio.framework",
|
]
|
}
|
if (is_ios) {
|
sources += [
|
"ios/audio_device_ios.h",
|
"ios/audio_device_ios.mm",
|
"ios/audio_device_not_implemented_ios.mm",
|
]
|
cflags += [ "-fobjc-arc" ] # CLANG_ENABLE_OBJC_ARC = YES.
|
libs = [
|
"AudioToolbox.framework",
|
"AVFoundation.framework",
|
"Foundation.framework",
|
"UIKit.framework",
|
]
|
}
|
if (is_win) {
|
sources += [
|
"win/audio_device_core_win.cc",
|
"win/audio_device_core_win.h",
|
"win/audio_device_wave_win.cc",
|
"win/audio_device_wave_win.h",
|
"win/audio_mixer_manager_win.cc",
|
"win/audio_mixer_manager_win.h",
|
]
|
libs = [
|
# Required for the built-in WASAPI AEC.
|
"dmoguids.lib",
|
"wmcodecdspuuid.lib",
|
"amstrmid.lib",
|
"msdmo.lib",
|
]
|
}
|
} else {
|
defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ]
|
}
|
|
if (!build_with_chromium) {
|
sources += [
|
# Do not link these into Chrome since they contain static data.
|
"dummy/file_audio_device_factory.cc",
|
"dummy/file_audio_device_factory.h",
|
]
|
}
|
|
configs += [ "../..:common_config" ]
|
public_configs = [
|
"../..:common_inherited_config",
|
":audio_device_config",
|
]
|
|
if (is_clang) {
|
# Suppress warnings from Chrome's Clang plugins.
|
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
}
|
|
deps = [
|
"../..:webrtc_common",
|
"../../base:rtc_base_approved",
|
"../../common_audio",
|
"../../system_wrappers",
|
"../utility",
|
]
|
}
|