blob: bb6d080c99875decc3752635a46dd497a86c7e26 [file] [log] [blame]
aleloi77ad3942016-07-04 13:33:021# 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
mbonadei9aa3f0a2017-01-24 14:58:229import("../../webrtc.gni")
ehmaldonado38a21322016-09-02 11:10:3410
kjellander6ceab082016-10-28 12:44:0311group("audio_mixer") {
Mirko Bonadei03d6f2f2017-12-05 14:33:1612 deps = [
kjellander6ceab082016-10-28 12:44:0313 ":audio_frame_manipulator",
14 ":audio_mixer_impl",
15 ]
16}
17
Mirko Bonadei86d053c2019-10-17 19:32:0418rtc_library("audio_mixer_impl") {
Mirko Bonadei97c65b72018-10-05 09:19:5819 visibility = [ "*" ]
aleloi77ad3942016-07-04 13:33:0220 sources = [
aleloi5d167d62016-08-24 09:20:5421 "audio_mixer_impl.cc",
22 "audio_mixer_impl.h",
aleloi623427c2016-12-08 10:37:5823 "default_output_rate_calculator.cc",
24 "default_output_rate_calculator.h",
aleloi24899e52017-02-21 13:06:2925 "frame_combiner.cc",
26 "frame_combiner.h",
aleloi623427c2016-12-08 10:37:5827 "output_rate_calculator.h",
aleloi77ad3942016-07-04 13:33:0228 ]
29
aleloi44968092016-08-08 17:18:5830 public = [
aleloi201dfe92016-10-20 12:06:3931 "audio_mixer_impl.h",
Sam Zackrissone5fe5392020-03-12 11:59:3732 "default_output_rate_calculator.h", # For creating a mixer with limiter
33 # disabled.
aleloi24899e52017-02-21 13:06:2934 "frame_combiner.h",
aleloi44968092016-08-08 17:18:5835 ]
36
Alex Loiko507e8d12018-02-27 12:51:4737 configs += [ "../audio_processing:apm_debug_dump" ]
38
aleloi77ad3942016-07-04 13:33:0239 deps = [
aleloi201dfe92016-10-20 12:06:3940 ":audio_frame_manipulator",
kwiberg529662a2017-09-04 12:43:1741 "../../api:array_view",
Doudou Kisabakafe6595f2021-05-18 09:50:0142 "../../api:rtp_packet_info",
Mirko Bonadeid9708072019-01-25 19:26:4843 "../../api:scoped_refptr",
Alex Loiko8396e342018-06-21 10:04:0544 "../../api/audio:audio_frame_api",
Gustaf Ullberg2ae140a2018-02-16 12:43:4945 "../../api/audio:audio_mixer_api",
Florent Castelli0afde762024-04-19 15:07:0846 "../../api/audio:audio_processing",
47 "../../api/audio:audio_processing",
aleloi6321b492016-12-05 09:46:0948 "../../audio/utility:audio_frame_operations",
Alex Loiko507e8d12018-02-27 12:51:4749 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 15:05:4250 "../../rtc_base:checks",
Olga Sharonova2d0ba282022-09-27 13:22:3451 "../../rtc_base:event_tracer",
Florent Castelli0af55ba2022-04-04 13:06:3052 "../../rtc_base:logging",
Florent Castelli4467ad72022-04-04 13:18:4653 "../../rtc_base:macromagic",
Florent Castellif4db3512022-04-14 11:38:0554 "../../rtc_base:race_checker",
Florent Castellif86f6f92022-04-05 00:54:1255 "../../rtc_base:refcount",
Doudou Kisabakadbf13e32021-05-17 12:15:5856 "../../rtc_base:safe_conversions",
Markus Handell0df0fae2020-07-07 13:53:3457 "../../rtc_base/synchronization:mutex",
aleloi77ad3942016-07-04 13:33:0258 "../../system_wrappers",
Mirko Bonadei17f48782018-09-28 06:51:1059 "../../system_wrappers:metrics",
Alex Loiko507e8d12018-02-27 12:51:4760 "../audio_processing:apm_logging",
61 "../audio_processing:audio_frame_view",
Alex Loiko2bac8962018-03-27 11:38:3662 "../audio_processing/agc2:fixed_digital",
aleloi201dfe92016-10-20 12:06:3963 ]
64}
65
Mirko Bonadei86d053c2019-10-17 19:32:0466rtc_library("audio_frame_manipulator") {
aleloi201dfe92016-10-20 12:06:3967 visibility = [
68 ":*",
69 "../../modules:*",
70 ]
71
72 sources = [
73 "audio_frame_manipulator.cc",
74 "audio_frame_manipulator.h",
75 ]
76
77 deps = [
Fredrik Solenbergbbf21a32018-04-12 20:44:0978 "../../api/audio:audio_frame_api",
Mirko Bonadei5e849cf2017-12-05 07:02:5379 "../../audio/utility:audio_frame_operations",
Patrik Höglunda8005cf2017-12-13 15:05:4280 "../../rtc_base:checks",
aleloi77ad3942016-07-04 13:33:0281 ]
82}
ehmaldonado36268652017-01-19 16:27:1183
84if (rtc_include_tests) {
Mirko Bonadei86d053c2019-10-17 19:32:0485 rtc_library("audio_mixer_test_utils") {
ehmaldonado36268652017-01-19 16:27:1186 testonly = true
kjellandere0629c02017-04-25 11:04:5087
ehmaldonado36268652017-01-19 16:27:1188 sources = [
aleloi2c9306e2017-03-29 11:25:1689 "gain_change_calculator.cc",
90 "gain_change_calculator.h",
91 "sine_wave_generator.cc",
92 "sine_wave_generator.h",
ehmaldonado36268652017-01-19 16:27:1193 ]
Alex Loiko507e8d12018-02-27 12:51:4794
ehmaldonado36268652017-01-19 16:27:1195 deps = [
96 ":audio_frame_manipulator",
97 ":audio_mixer_impl",
kwiberg529662a2017-09-04 12:43:1798 "../../api:array_view",
Fredrik Solenbergbbf21a32018-04-12 20:44:0999 "../../api/audio:audio_frame_api",
Henrik Boströmd2c336f2019-07-03 15:11:10100 "../../rtc_base:checks",
Florent Castellie10a9f62022-04-04 15:04:37101 "../../rtc_base:safe_conversions",
Henrik Boströmd2c336f2019-07-03 15:11:10102 ]
103 }
104
Mirko Bonadei86d053c2019-10-17 19:32:04105 rtc_library("audio_mixer_unittests") {
Henrik Boströmd2c336f2019-07-03 15:11:10106 testonly = true
107
108 sources = [
109 "audio_frame_manipulator_unittest.cc",
110 "audio_mixer_impl_unittest.cc",
111 "frame_combiner_unittest.cc",
112 ]
Henrik Boströmd2c336f2019-07-03 15:11:10113 deps = [
114 ":audio_frame_manipulator",
115 ":audio_mixer_impl",
116 ":audio_mixer_test_utils",
117 "../../api:array_view",
Doudou Kisabakafe6595f2021-05-18 09:50:01118 "../../api:rtp_packet_info",
Gustaf Ullberg2ae140a2018-02-16 12:43:49119 "../../api/audio:audio_mixer_api",
Doudou Kisabakafe6595f2021-05-18 09:50:01120 "../../api/units:timestamp",
aleloi2c9306e2017-03-29 11:25:16121 "../../audio/utility:audio_frame_operations",
Patrik Höglunda8005cf2017-12-13 15:05:42122 "../../rtc_base:checks",
Florent Castelli57aa81b2022-04-04 15:14:02123 "../../rtc_base:stringutils",
Danil Chapovalovd26a9162019-03-19 17:08:37124 "../../rtc_base:task_queue_for_test",
Fredrik Hernqvist79ea89e2023-04-12 14:31:53125 "../../system_wrappers:metrics",
ehmaldonado36268652017-01-19 16:27:11126 "../../test:test_support",
Florent Castelli99c519b2024-05-23 11:21:53127 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado36268652017-01-19 16:27:11128 ]
ehmaldonado36268652017-01-19 16:27:11129 }
Alex Loiko99a2c5d2018-02-27 13:09:47130
Andrey Logvine7c79fd2021-02-01 09:56:37131 if (!build_with_chromium) {
132 rtc_executable("audio_mixer_test") {
133 testonly = true
134 sources = [ "audio_mixer_test.cc" ]
Alex Loiko99a2c5d2018-02-27 13:09:47135
Andrey Logvine7c79fd2021-02-01 09:56:37136 deps = [
137 ":audio_mixer_impl",
138 "../../api/audio:audio_mixer_api",
139 "../../common_audio",
140 "../../rtc_base:stringutils",
141 "//third_party/abseil-cpp/absl/flags:flag",
142 "//third_party/abseil-cpp/absl/flags:parse",
143 ]
144 }
Alex Loiko99a2c5d2018-02-27 13:09:47145 }
ehmaldonado36268652017-01-19 16:27:11146}