2014-06-23 19:21:07 +00:00
|
|
|
# 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.
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
import("../../webrtc.gni")
|
2014-06-23 19:21:07 +00:00
|
|
|
|
2017-01-09 02:37:21 -08:00
|
|
|
if (is_android) {
|
|
|
|
|
import("//build/config/android/config.gni")
|
|
|
|
|
import("//build/config/android/rules.gni")
|
|
|
|
|
}
|
|
|
|
|
|
2016-08-26 13:31:24 -07:00
|
|
|
config("audio_device_warnings_config") {
|
|
|
|
|
if (is_win && is_clang) {
|
|
|
|
|
cflags = [
|
|
|
|
|
# Disable warnings failing when compiling with Clang on Windows.
|
|
|
|
|
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
|
|
|
|
|
"-Wno-microsoft-goto",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-16 11:13:32 +01:00
|
|
|
rtc_source_set("audio_device_default") {
|
|
|
|
|
visibility = [ "*" ]
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ "include/audio_device_default.h" ]
|
|
|
|
|
deps = [ ":audio_device_api" ]
|
2018-11-16 11:13:32 +01:00
|
|
|
}
|
|
|
|
|
|
2017-09-12 04:45:24 -07:00
|
|
|
rtc_source_set("audio_device") {
|
2018-01-10 15:54:53 +00:00
|
|
|
visibility = [ "*" ]
|
2017-09-12 04:45:24 -07:00
|
|
|
public_deps = [
|
2018-03-15 12:44:12 +01:00
|
|
|
":audio_device_api",
|
|
|
|
|
|
|
|
|
|
# Deprecated.
|
|
|
|
|
# TODO(webrtc:7452): Remove this public dep. audio_device_impl should
|
|
|
|
|
# be depended on directly if needed.
|
|
|
|
|
":audio_device_impl",
|
2017-09-12 04:45:24 -07:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-15 12:44:12 +01:00
|
|
|
rtc_source_set("audio_device_api") {
|
2018-05-15 10:22:36 +02:00
|
|
|
visibility = [ "*" ]
|
2018-03-15 12:44:12 +01:00
|
|
|
sources = [
|
|
|
|
|
"include/audio_device.h",
|
|
|
|
|
"include/audio_device_defines.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
2019-01-25 20:26:48 +01:00
|
|
|
"../../api:scoped_refptr",
|
2019-04-01 09:16:12 +02:00
|
|
|
"../../api/task_queue",
|
2018-03-15 12:44:12 +01:00
|
|
|
"../../rtc_base:checks",
|
|
|
|
|
"../../rtc_base:deprecation",
|
|
|
|
|
"../../rtc_base:rtc_base_approved",
|
2018-03-16 10:09:49 +01:00
|
|
|
"../../rtc_base:stringutils",
|
2018-03-15 12:44:12 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("audio_device_buffer") {
|
2018-03-15 12:44:12 +01:00
|
|
|
sources = [
|
|
|
|
|
"audio_device_buffer.cc",
|
|
|
|
|
"audio_device_buffer.h",
|
|
|
|
|
"audio_device_config.h",
|
|
|
|
|
"fine_audio_buffer.cc",
|
|
|
|
|
"fine_audio_buffer.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":audio_device_api",
|
|
|
|
|
"../../api:array_view",
|
2019-04-01 09:16:12 +02:00
|
|
|
"../../api/task_queue",
|
2018-03-15 12:44:12 +01:00
|
|
|
"../../common_audio:common_audio_c",
|
|
|
|
|
"../../rtc_base:checks",
|
|
|
|
|
"../../rtc_base:rtc_base_approved",
|
|
|
|
|
"../../rtc_base:rtc_task_queue",
|
2020-07-08 10:13:20 +02:00
|
|
|
"../../rtc_base/synchronization:mutex",
|
2018-03-15 12:44:12 +01:00
|
|
|
"../../system_wrappers",
|
2018-09-28 08:51:10 +02:00
|
|
|
"../../system_wrappers:metrics",
|
2018-03-15 12:44:12 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("audio_device_generic") {
|
2018-03-15 12:44:12 +01:00
|
|
|
sources = [
|
|
|
|
|
"audio_device_generic.cc",
|
|
|
|
|
"audio_device_generic.h",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":audio_device_api",
|
|
|
|
|
":audio_device_buffer",
|
|
|
|
|
"../../rtc_base:rtc_base_approved",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("audio_device_name") {
|
2018-05-18 10:20:58 +02:00
|
|
|
sources = [
|
|
|
|
|
"audio_device_name.cc",
|
|
|
|
|
"audio_device_name.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-06-08 16:10:03 +02:00
|
|
|
rtc_source_set("windows_core_audio_utility") {
|
|
|
|
|
if (is_win && !build_with_chromium) {
|
|
|
|
|
sources = [
|
|
|
|
|
"win/core_audio_utility_win.cc",
|
|
|
|
|
"win/core_audio_utility_win.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
":audio_device_api",
|
|
|
|
|
":audio_device_name",
|
|
|
|
|
"../../api/units:time_delta",
|
|
|
|
|
"../../rtc_base:checks",
|
|
|
|
|
"../../rtc_base:rtc_base_approved",
|
|
|
|
|
]
|
2020-07-28 17:55:21 -04:00
|
|
|
|
|
|
|
|
libs = [ "oleaut32.lib" ]
|
2018-06-08 16:10:03 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# An ADM with a dedicated factory method which does not depend on the
|
|
|
|
|
# audio_device_impl target. The goal is to use this new structure and
|
|
|
|
|
# gradually phase out the old design.
|
|
|
|
|
# TODO(henrika): currently only supported on Windows.
|
|
|
|
|
rtc_source_set("audio_device_module_from_input_and_output") {
|
2019-04-09 11:32:18 +02:00
|
|
|
visibility = [ "*" ]
|
2018-06-08 16:10:03 +02:00
|
|
|
if (is_win && !build_with_chromium) {
|
|
|
|
|
sources = [
|
|
|
|
|
"include/audio_device_factory.cc",
|
|
|
|
|
"include/audio_device_factory.h",
|
|
|
|
|
]
|
|
|
|
|
sources += [
|
|
|
|
|
"win/audio_device_module_win.cc",
|
|
|
|
|
"win/audio_device_module_win.h",
|
|
|
|
|
"win/core_audio_base_win.cc",
|
|
|
|
|
"win/core_audio_base_win.h",
|
|
|
|
|
"win/core_audio_input_win.cc",
|
|
|
|
|
"win/core_audio_input_win.h",
|
|
|
|
|
"win/core_audio_output_win.cc",
|
|
|
|
|
"win/core_audio_output_win.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
":audio_device_api",
|
|
|
|
|
":audio_device_buffer",
|
|
|
|
|
":windows_core_audio_utility",
|
2019-01-25 20:26:48 +01:00
|
|
|
"../../api:scoped_refptr",
|
2019-04-01 09:16:12 +02:00
|
|
|
"../../api/task_queue",
|
2018-06-08 16:10:03 +02:00
|
|
|
"../../rtc_base:checks",
|
|
|
|
|
"../../rtc_base:rtc_base_approved",
|
|
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
2018-06-08 16:10:03 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-15 12:44:12 +01:00
|
|
|
# Contains default implementations of webrtc::AudioDeviceModule for Windows,
|
|
|
|
|
# Linux, Mac, iOS and Android.
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("audio_device_impl") {
|
2018-03-15 12:44:12 +01:00
|
|
|
visibility = [ "*" ]
|
2016-02-18 15:44:07 -08:00
|
|
|
deps = [
|
2018-03-15 12:44:12 +01:00
|
|
|
":audio_device_api",
|
|
|
|
|
":audio_device_buffer",
|
2018-11-16 11:13:32 +01:00
|
|
|
":audio_device_default",
|
2018-03-15 12:44:12 +01:00
|
|
|
":audio_device_generic",
|
2017-09-04 05:43:17 -07:00
|
|
|
"../../api:array_view",
|
2019-03-22 12:40:05 -07:00
|
|
|
"../../api:refcountedbase",
|
2019-01-25 20:26:48 +01:00
|
|
|
"../../api:scoped_refptr",
|
2019-03-21 13:35:10 +01:00
|
|
|
"../../api/task_queue",
|
2016-02-18 15:44:07 -08:00
|
|
|
"../../common_audio",
|
2018-02-05 15:50:41 +01:00
|
|
|
"../../common_audio:common_audio_c",
|
2019-03-21 13:35:10 +01:00
|
|
|
"../../rtc_base",
|
2017-12-13 16:05:42 +01:00
|
|
|
"../../rtc_base:checks",
|
Remove voe::TransmitMixer
TransmitMixer's functionality is moved into the AudioTransportProxy
owned by AudioState. This removes the need for an AudioTransport
implementation in VoEBaseImpl, which means that the proxy is no longer
a proxy, hence AudioTransportProxy is renamed to AudioTransportImpl.
In the short term, AudioState needs to know which AudioDeviceModule is
used, so it is added in AudioState::Config. AudioTransportImpl needs
to know which AudioSendStream:s are currently enabled to send, so
AudioState maintains a map of them, which is reduced into a simple
vector for AudioTransportImpl.
To encode and transmit audio,
AudioSendStream::OnAudioData(std::unique_ptr<AudioFrame> audio_frame)
is introduced, which is used in both the Chromium and standalone use
cases. This removes the need for two different instances of
voe::Channel::ProcessAndEncodeAudio(), so there is now only one,
taking an AudioFrame as argument. Callers need to allocate their own
AudioFrame:s, which is wasteful but not a regression since this was
already happening in the voe::Channel functions.
Most of the logic changed resides in
AudioTransportImpl::RecordedDataIsAvailable(), where two strange
things were found:
1. The clock drift parameter was ineffective since
apm->echo_cancellation()->enable_drift_compensation(false) is
called during initialization.
2. The output parameter 'new_mic_volume' was never set - instead it
was returned as a result, causing the ADM to never update the
analog mic gain
(https://cs.chromium.org/chromium/src/third_party/webrtc/voice_engine/voe_base_impl.cc?q=voe_base_impl.cc&dr&l=100).
Besides this, tests are updated, and some dead code is removed which
was found in the process.
Bug: webrtc:4690, webrtc:8591
Change-Id: I789d5296bf5efb7299a5ee05a4f3ce6abf9124b2
Reviewed-on: https://webrtc-review.googlesource.com/26681
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21301}
2017-12-15 16:42:15 +01:00
|
|
|
"../../rtc_base:deprecation",
|
2017-07-19 10:40:47 -07:00
|
|
|
"../../rtc_base:rtc_base_approved",
|
|
|
|
|
"../../rtc_base:rtc_task_queue",
|
2020-07-08 10:13:20 +02:00
|
|
|
"../../rtc_base/synchronization:mutex",
|
2018-09-04 11:06:17 +02:00
|
|
|
"../../rtc_base/system:arch",
|
2018-03-23 10:39:34 +01:00
|
|
|
"../../rtc_base/system:file_wrapper",
|
2019-03-13 08:50:42 +01:00
|
|
|
"../../rtc_base/task_utils:repeating_task",
|
2016-02-18 15:44:07 -08:00
|
|
|
"../../system_wrappers",
|
2019-08-29 13:17:11 +02:00
|
|
|
"../../system_wrappers:field_trial",
|
2018-09-28 08:51:10 +02:00
|
|
|
"../../system_wrappers:metrics",
|
2016-02-18 15:44:07 -08:00
|
|
|
"../utility",
|
|
|
|
|
]
|
2018-03-15 12:44:12 +01:00
|
|
|
if (rtc_include_internal_audio_device && is_ios) {
|
2019-04-10 08:43:53 +02:00
|
|
|
deps += [ "../../sdk:audio_device" ]
|
2018-03-15 12:44:12 +01:00
|
|
|
}
|
2016-02-18 15:44:07 -08:00
|
|
|
|
2014-09-01 04:24:11 +00:00
|
|
|
sources = [
|
|
|
|
|
"dummy/audio_device_dummy.cc",
|
|
|
|
|
"dummy/audio_device_dummy.h",
|
|
|
|
|
"dummy/file_audio_device.cc",
|
|
|
|
|
"dummy/file_audio_device.h",
|
2018-01-02 15:00:11 +01:00
|
|
|
"include/fake_audio_device.h",
|
2018-03-13 13:25:19 +01:00
|
|
|
"include/test_audio_device.cc",
|
2018-03-07 12:20:51 +01:00
|
|
|
"include/test_audio_device.h",
|
2014-09-01 04:24:11 +00:00
|
|
|
]
|
|
|
|
|
|
2018-01-15 10:20:00 -05:00
|
|
|
if (build_with_mozilla) {
|
|
|
|
|
sources += [
|
|
|
|
|
"opensl/single_rw_fifo.cc",
|
|
|
|
|
"opensl/single_rw_fifo.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2015-10-14 08:13:58 +02:00
|
|
|
defines = []
|
2015-11-23 17:23:44 -08:00
|
|
|
cflags = []
|
2017-06-13 17:34:16 +02:00
|
|
|
if (rtc_audio_device_plays_sinus_tone) {
|
|
|
|
|
defines += [ "AUDIO_DEVICE_PLAYS_SINUS_TONE" ]
|
|
|
|
|
}
|
2018-03-16 10:09:49 +01:00
|
|
|
if (rtc_enable_android_aaudio) {
|
2019-03-27 21:11:17 +01:00
|
|
|
defines += [ "WEBRTC_AUDIO_DEVICE_INCLUDE_ANDROID_AAUDIO" ]
|
2018-03-16 10:09:49 +01:00
|
|
|
}
|
2014-09-07 17:36:10 +00:00
|
|
|
if (rtc_include_internal_audio_device) {
|
2014-09-01 04:24:11 +00:00
|
|
|
sources += [
|
2017-04-06 10:17:01 -07:00
|
|
|
"audio_device_data_observer.cc",
|
2015-05-20 09:44:38 +02:00
|
|
|
"audio_device_impl.cc",
|
|
|
|
|
"audio_device_impl.h",
|
2017-04-06 10:17:01 -07:00
|
|
|
"include/audio_device_data_observer.h",
|
2014-09-01 04:24:11 +00:00
|
|
|
]
|
2016-01-07 02:54:22 -08:00
|
|
|
if (is_android) {
|
|
|
|
|
sources += [
|
2018-01-02 15:00:11 +01:00
|
|
|
"android/audio_common.h",
|
2016-01-07 02:54:22 -08:00
|
|
|
"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",
|
2016-09-19 15:44:09 +02:00
|
|
|
"android/opensles_recorder.cc",
|
|
|
|
|
"android/opensles_recorder.h",
|
2016-01-07 02:54:22 -08:00
|
|
|
]
|
|
|
|
|
libs = [
|
|
|
|
|
"log",
|
|
|
|
|
"OpenSLES",
|
|
|
|
|
]
|
2018-03-16 10:09:49 +01:00
|
|
|
if (rtc_enable_android_aaudio) {
|
|
|
|
|
sources += [
|
|
|
|
|
"android/aaudio_player.cc",
|
|
|
|
|
"android/aaudio_player.h",
|
|
|
|
|
"android/aaudio_recorder.cc",
|
|
|
|
|
"android/aaudio_recorder.h",
|
|
|
|
|
"android/aaudio_wrapper.cc",
|
|
|
|
|
"android/aaudio_wrapper.h",
|
|
|
|
|
]
|
|
|
|
|
libs += [ "aaudio" ]
|
|
|
|
|
}
|
2018-01-15 10:20:00 -05:00
|
|
|
|
|
|
|
|
if (build_with_mozilla) {
|
|
|
|
|
include_dirs += [
|
|
|
|
|
"/config/external/nspr",
|
|
|
|
|
"/nsprpub/lib/ds",
|
|
|
|
|
"/nsprpub/pr/include",
|
|
|
|
|
]
|
|
|
|
|
}
|
2016-01-07 02:54:22 -08:00
|
|
|
}
|
2016-08-16 18:21:18 -07:00
|
|
|
if (rtc_use_dummy_audio_file_devices) {
|
|
|
|
|
defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]
|
|
|
|
|
} else {
|
|
|
|
|
if (is_linux) {
|
2014-09-01 04:24:11 +00:00
|
|
|
sources += [
|
2016-08-16 18:21:18 -07:00
|
|
|
"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",
|
|
|
|
|
]
|
2020-03-24 12:56:47 +01:00
|
|
|
defines += [ "WEBRTC_ENABLE_LINUX_ALSA" ]
|
2017-05-30 12:06:04 -07:00
|
|
|
libs = [ "dl" ]
|
2017-12-20 21:25:47 +01:00
|
|
|
if (rtc_use_x11) {
|
2017-05-30 12:06:04 -07:00
|
|
|
libs += [ "X11" ]
|
2017-12-20 21:25:47 +01:00
|
|
|
defines += [ "WEBRTC_USE_X11" ]
|
2017-05-30 12:06:04 -07:00
|
|
|
}
|
2016-08-16 18:21:18 -07:00
|
|
|
if (rtc_include_pulse_audio) {
|
2020-03-24 12:56:47 +01:00
|
|
|
defines += [ "WEBRTC_ENABLE_LINUX_PULSE" ]
|
2016-08-16 18:21:18 -07:00
|
|
|
}
|
2020-03-25 16:38:01 +01:00
|
|
|
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",
|
|
|
|
|
]
|
2014-09-01 04:24:11 +00:00
|
|
|
}
|
2016-08-16 18:21:18 -07:00
|
|
|
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",
|
|
|
|
|
]
|
2019-08-01 12:19:31 +02:00
|
|
|
deps += [
|
|
|
|
|
":audio_device_impl_frameworks",
|
|
|
|
|
"../third_party/portaudio:mac_portaudio",
|
2016-08-16 18:21:18 -07:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
if (is_win) {
|
|
|
|
|
sources += [
|
|
|
|
|
"win/audio_device_core_win.cc",
|
|
|
|
|
"win/audio_device_core_win.h",
|
|
|
|
|
]
|
|
|
|
|
libs = [
|
|
|
|
|
# Required for the built-in WASAPI AEC.
|
|
|
|
|
"dmoguids.lib",
|
|
|
|
|
"wmcodecdspuuid.lib",
|
|
|
|
|
"amstrmid.lib",
|
|
|
|
|
"msdmo.lib",
|
2020-07-28 17:55:21 -04:00
|
|
|
"oleaut32.lib",
|
2016-08-16 18:21:18 -07:00
|
|
|
]
|
|
|
|
|
}
|
2016-08-26 13:31:24 -07:00
|
|
|
configs += [ ":audio_device_warnings_config" ]
|
2014-09-01 04:24:11 +00:00
|
|
|
}
|
|
|
|
|
} 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",
|
|
|
|
|
]
|
|
|
|
|
}
|
2014-06-23 19:21:07 +00:00
|
|
|
}
|
2016-08-16 02:17:44 -07:00
|
|
|
|
2019-08-01 12:19:31 +02:00
|
|
|
if (is_mac) {
|
|
|
|
|
rtc_source_set("audio_device_impl_frameworks") {
|
|
|
|
|
visibility = [ ":*" ]
|
2020-07-03 10:19:30 +02:00
|
|
|
frameworks = [
|
2019-08-01 12:19:31 +02:00
|
|
|
# Needed for CoreGraphics:
|
|
|
|
|
"ApplicationServices.framework",
|
|
|
|
|
|
|
|
|
|
"AudioToolbox.framework",
|
|
|
|
|
"CoreAudio.framework",
|
|
|
|
|
|
|
|
|
|
# Needed for CGEventSourceKeyState in audio_device_mac.cc:
|
|
|
|
|
"CoreGraphics.framework",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-01 04:47:20 -07:00
|
|
|
rtc_source_set("mock_audio_device") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
"include/mock_audio_device.h",
|
|
|
|
|
"include/mock_audio_transport.h",
|
2018-01-02 15:00:11 +01:00
|
|
|
"mock_audio_device_buffer.h",
|
2017-06-01 04:47:20 -07:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":audio_device",
|
2018-03-15 12:44:12 +01:00
|
|
|
":audio_device_buffer",
|
|
|
|
|
":audio_device_impl",
|
2020-01-22 15:23:43 -08:00
|
|
|
"../../rtc_base:refcount",
|
2017-06-01 04:47:20 -07:00
|
|
|
"../../test:test_support",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-10 01:05:34 -08:00
|
|
|
if (rtc_include_tests) {
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("audio_device_unittests") {
|
2016-11-10 01:05:34 -08:00
|
|
|
testonly = true
|
2017-04-25 04:04:50 -07:00
|
|
|
|
2016-11-10 01:05:34 -08:00
|
|
|
sources = [
|
2017-01-19 08:27:11 -08:00
|
|
|
"fine_audio_buffer_unittest.cc",
|
2018-03-13 13:25:19 +01:00
|
|
|
"include/test_audio_device_unittest.cc",
|
2016-11-10 01:05:34 -08:00
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":audio_device",
|
2018-03-15 12:44:12 +01:00
|
|
|
":audio_device_buffer",
|
|
|
|
|
":audio_device_impl",
|
2017-01-19 08:27:11 -08:00
|
|
|
":mock_audio_device",
|
2017-09-04 05:43:17 -07:00
|
|
|
"../../api:array_view",
|
2019-01-25 20:26:48 +01:00
|
|
|
"../../api:scoped_refptr",
|
2019-04-01 09:16:12 +02:00
|
|
|
"../../api/task_queue",
|
|
|
|
|
"../../api/task_queue:default_task_queue_factory",
|
2018-03-07 12:20:51 +01:00
|
|
|
"../../common_audio",
|
2017-12-13 16:05:42 +01:00
|
|
|
"../../rtc_base:checks",
|
2019-10-19 12:03:23 +02:00
|
|
|
"../../rtc_base:ignore_wundef",
|
2017-07-19 10:40:47 -07:00
|
|
|
"../../rtc_base:rtc_base_approved",
|
2020-07-08 10:13:20 +02:00
|
|
|
"../../rtc_base/synchronization:mutex",
|
2017-09-12 04:45:24 -07:00
|
|
|
"../../system_wrappers",
|
2018-03-15 15:05:39 +01:00
|
|
|
"../../test:fileutils",
|
2016-11-10 01:05:34 -08:00
|
|
|
"../../test:test_support",
|
2019-03-21 13:35:10 +01:00
|
|
|
"../utility",
|
2016-11-10 01:05:34 -08:00
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
2017-03-29 07:50:19 -07:00
|
|
|
if (is_linux || is_mac || is_win) {
|
2017-03-17 04:26:22 -07:00
|
|
|
sources += [ "audio_device_unittest.cc" ]
|
|
|
|
|
}
|
2018-06-08 16:10:03 +02:00
|
|
|
if (is_win) {
|
2018-05-18 10:20:58 +02:00
|
|
|
sources += [ "win/core_audio_utility_win_unittest.cc" ]
|
2018-06-08 16:10:03 +02:00
|
|
|
deps += [
|
|
|
|
|
":audio_device_module_from_input_and_output",
|
|
|
|
|
":windows_core_audio_utility",
|
|
|
|
|
]
|
2018-05-18 10:20:58 +02:00
|
|
|
}
|
2017-01-19 08:27:11 -08:00
|
|
|
if (is_android) {
|
|
|
|
|
# Need to disable error due to the line in
|
|
|
|
|
# base/android/jni_android.h triggering it:
|
|
|
|
|
# const BASE_EXPORT jobject GetApplicationContext()
|
|
|
|
|
# error: type qualifiers ignored on function return type
|
|
|
|
|
cflags = [ "-Wno-ignored-qualifiers" ]
|
|
|
|
|
sources += [
|
|
|
|
|
"android/audio_device_unittest.cc",
|
|
|
|
|
"android/audio_manager_unittest.cc",
|
|
|
|
|
"android/ensure_initialized.cc",
|
|
|
|
|
"android/ensure_initialized.h",
|
|
|
|
|
]
|
|
|
|
|
deps += [
|
2018-07-23 10:04:12 +02:00
|
|
|
"../../base",
|
2017-07-11 06:20:45 -07:00
|
|
|
"../../sdk/android:libjingle_peerconnection_java",
|
2017-01-19 08:27:11 -08:00
|
|
|
]
|
|
|
|
|
}
|
2017-12-20 21:19:49 +01:00
|
|
|
if (!rtc_include_internal_audio_device) {
|
|
|
|
|
defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ]
|
|
|
|
|
}
|
2016-11-10 01:05:34 -08:00
|
|
|
}
|
2016-08-16 02:17:44 -07:00
|
|
|
}
|
2017-01-09 02:37:21 -08:00
|
|
|
|
|
|
|
|
if (!build_with_chromium && is_android) {
|
2017-11-07 15:36:33 +00:00
|
|
|
rtc_android_library("audio_device_java") {
|
2019-12-23 14:02:25 -08:00
|
|
|
sources = [
|
2017-01-09 02:37:21 -08:00
|
|
|
"android/java/src/org/webrtc/voiceengine/BuildInfo.java",
|
|
|
|
|
"android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java",
|
|
|
|
|
"android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java",
|
|
|
|
|
"android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java",
|
|
|
|
|
"android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java",
|
|
|
|
|
"android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java",
|
|
|
|
|
]
|
2017-01-23 01:25:53 -08:00
|
|
|
deps = [
|
2017-07-11 06:20:45 -07:00
|
|
|
"../../rtc_base:base_java",
|
2019-03-06 09:18:57 -05:00
|
|
|
"//third_party/android_deps:com_android_support_support_annotations_java",
|
2017-01-23 01:25:53 -08:00
|
|
|
]
|
2017-01-09 02:37:21 -08:00
|
|
|
}
|
|
|
|
|
}
|