This CL replaces all remaining usage of AudioFrame within APM,
with the exception of the AudioProcessing interface.
The main changes are within the unittests.
Bug: webrtc:5298
Change-Id: I219cdd08f81a8679b28d9dd1359a56837945f3d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170362
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30831}
This CL creates a new stream interface and uses it to replace
most of the usage of AudioFrame in the non-test code.
The CL changes some of the test code as well, as the other
changes required that.
The CL will be followed by 2 more related CLs.
Bug: webrtc:5298
Change-Id: I5cfbe6079f30fc3fbf35b35fd077b6fb49c7def0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170040
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30799}
This CL removes the code for the deprecated legacy noise.
Bug: webrtc:5298
Change-Id: If287d8967a3079ef96bff4790afa31f37d178823
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167922
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30434}
This is a reland of f3aa6326b8
Original change's description:
> Replace the ExperimentalAgc config with the new config format
>
> This CL replaces the use of the ExperimentalAgc config with
> using the new config format.
>
> Beyond that, some further changes were made to how the analog
> and digital AGCs are initialized/called. While these can be
> made in a separate CL, I believe the code changes becomes more
> clear by bundling those with the replacement of the
> ExperimentalAgc config.
>
> TBR: saza@webrtc.org
> Bug: webrtc:5298
> Change-Id: Ia19940f3abae048541e6716d0184b4caafc7d53e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163986
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30149}
Bug: webrtc:5298
Change-Id: I6db03628ed3fa2ecd36544fe9181dd8244d7e2df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165760
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30295}
This reverts commit f3aa6326b8.
Reason for revert: Breaks downstream project.
Original change's description:
> Replace the ExperimentalAgc config with the new config format
>
> This CL replaces the use of the ExperimentalAgc config with
> using the new config format.
>
> Beyond that, some further changes were made to how the analog
> and digital AGCs are initialized/called. While these can be
> made in a separate CL, I believe the code changes becomes more
> clear by bundling those with the replacement of the
> ExperimentalAgc config.
>
> TBR: saza@webrtc.org
> Bug: webrtc:5298
> Change-Id: Ia19940f3abae048541e6716d0184b4caafc7d53e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163986
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30149}
TBR=saza@webrtc.org,peah@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:5298
Change-Id: I794d2ab4b8caa5330c5ad490ba604646a249a1c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164530
Reviewed-by: Yves Gerey <yvesg@google.com>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30153}
This CL replaces the use of the ExperimentalAgc config with
using the new config format.
Beyond that, some further changes were made to how the analog
and digital AGCs are initialized/called. While these can be
made in a separate CL, I believe the code changes becomes more
clear by bundling those with the replacement of the
ExperimentalAgc config.
TBR: saza@webrtc.org
Bug: webrtc:5298
Change-Id: Ia19940f3abae048541e6716d0184b4caafc7d53e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163986
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30149}
This CL moves the activation of the transient suppression to the APM
config.
Bug: webrtc:5298
Change-Id: Iba7975bec4654c3df8834fd5b7d1082ff53641dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163985
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30137}
This CL changes the GetStatistics call in the audio processing module
(APM) to not aquire the render or capture locks in APM, while still
being thread-safe.
This change eliminates the risk of thread-priority inversion due to the
GetStatistics call.
Apart from the above the CL:
-Corrects the GetStatistics to not be const (it was const even though it
aquired locks).
-Slightly changes the statistics reporting, so that the stats received
may be older than the most recent stats reported.
Bug: webrtc:11241
Change-Id: I00deb5507e004cbe6e4a19a8bad357491f86f4ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163982
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30131}
This CL allows the noise suppressor to use the linear AEC output
for analysis whenever that is available. This will potentially
lower the risk that the noise suppressor estimates the noise
based on echo.
The feature is off by default.
Bug: webrtc:5298,b:132164318
Change-Id: Idc6c8e197d96209d213819d87a8fb2533b7303ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/162900
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30116}
This CL moves the high-pass filter to run in the full-band domain
instead of the split-band domain.
Bug: webrtc:11193
Change-Id: Ie61f4a80afda11236ecbb1ad544bbd0350c7bbfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161453
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30112}
This CL removes the remaining settings for using the legacy AEC.
It also adds a missing printout of the enforce_high_pass_filtering
parameter in the ToString method.
Bug: webrtc:11165
Change-Id: I58f0861bf1c6cd24bd83f4d3e394653b2fab3d71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161683
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30050}
This CL removes the deprecated legacy AEC code.
Note that this CL should not be landed before the M80 release has been cut.
Bug: webrtc:11165
Change-Id: I59ee94526e62f702bb9fa9fa2d38c4e48f44753c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161238
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30036}
This CL follows the "Rule of zero".
Those constructors made no sense compared to default generated ones,
since all members are POD.
They were introduced to quiet a memory sanitizer warning,
which apparently was misleading.
As a bonus, the struct is now movable.
Bug: webrtc:11180, webrtc:9855
Change-Id: Iff9fd950bec8040bc6e7e7ece33cc49c5f453f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161381
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30023}
This CL ensures that the high-pass filter is on whenever the echo
controller is on. This is important as the echo controller code assumes
that the external high-pass filter is active.
The CL also corrects the ToggleAec unit test (which started failing
after this code change).
Bug: webrtc:11159, chromium:1030179
Change-Id: Ief86eda8f7c67df1c25ac1a06d2cc0778e01196d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161228
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29998}
This CL removes the experimental status of the multi-channel processing
in APM, and accordingly updates the variable naming.
It also splits the activation of multi-channel processing to be separate
for render and capture.
Bug: webrtc:10859
Change-Id: I0e5d04dcb94b6637c33d97146231b8ddddbaea39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160707
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29926}
This CL enables extracting the linear AEC output,
allowing for more straightforward
testing/development.
Bug: b/140823178
Change-Id: I14f7934008d87066b35500466cb6e6d96f811688
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153672
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29789}
This CL adds a dependecy on rtc_base/system:rtc_export to rtc_event but
only when built as part of Chromium (since rtc::Event should not be
used outside of WebRTC).
It also adds other missing RTC_EXPORTS.
Bug: webrtc:9419
Change-Id: Ib338004a5404a6b3c7929e146c29ad42572632cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159692
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29781}
Add a runtime setting that notifies play-out audio device changes.
The payload is a pair indicating a device id and its maximum play-out
volume.
kPlayoutVolumeChange is now forwarded not only to capture, but also
render (required by render_pre_processor).
Bug: webrtc:10608
Change-Id: I8997c207422c1dcd1d53775397d6290939ef3db8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159002
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29725}
This is a reland of 87a7b82520
Original change's description:
> Refactoring of the noise suppressor and adding true multichannel support
>
> This CL adds proper multichannel support to the noise suppressor.
> To accomplish that in a safe way, a full refactoring of the noise
> suppressor code has been done.
>
> Due to floating point precision, the changes made are not entirely
> bitexact. They are, however, very close to being bitexact.
>
> As a safety measure, the former noise suppressor code is preserved
> and a kill-switch is added to allow revering to the legacy noise
> suppressor in case issues arise.
>
> Bug: webrtc:10895, b/143344262
> Change-Id: I0b071011b23265ac12e6d4b3956499d122286657
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158407
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29646}
Bug: webrtc:10895, b/143344262
Change-Id: I236f1e67bb0baa4e30908a4cf7a8a7bb55fbced3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158747
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29663}
This reverts commit 87a7b82520.
Reason for revert: Speculative revert. Breaks downstream projects.
Original change's description:
> Refactoring of the noise suppressor and adding true multichannel support
>
> This CL adds proper multichannel support to the noise suppressor.
> To accomplish that in a safe way, a full refactoring of the noise
> suppressor code has been done.
>
> Due to floating point precision, the changes made are not entirely
> bitexact. They are, however, very close to being bitexact.
>
> As a safety measure, the former noise suppressor code is preserved
> and a kill-switch is added to allow revering to the legacy noise
> suppressor in case issues arise.
>
> Bug: webrtc:10895, b/143344262
> Change-Id: I0b071011b23265ac12e6d4b3956499d122286657
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158407
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29646}
TBR=gustaf@webrtc.org,peah@webrtc.org
Change-Id: I4d4025bda01f484979961fe57380a705e4d78397
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10895, b/143344262
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158701
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29651}
This CL adds proper multichannel support to the noise suppressor.
To accomplish that in a safe way, a full refactoring of the noise
suppressor code has been done.
Due to floating point precision, the changes made are not entirely
bitexact. They are, however, very close to being bitexact.
As a safety measure, the former noise suppressor code is preserved
and a kill-switch is added to allow revering to the legacy noise
suppressor in case issues arise.
Bug: webrtc:10895, b/143344262
Change-Id: I0b071011b23265ac12e6d4b3956499d122286657
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158407
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29646}
This change removes the deprecated ChannelLayout versions of ProcessStream
and AnalyzeReverseStream.
Bug: webrtc:5298
Change-Id: I8a7e33e89cffac5eceecd00dfd3c96000643f51b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158529
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29641}
Adding a version of AnalyzeReverseStream with audio parameters
described by StreamConfig. This is part of preparations for
multichannel APM in Chromium.
Bug: webrtc:10913
Change-Id: I7c4650eab8bd7fcdec970a7e4a8fa203f09bed9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157897
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29573}
The new configuration path is via AudioProcessing::ApplyConfig and
AudioProcessing::GetStatistics.
Bug: webrtc:9878
Change-Id: Ic912d67455fcef4895566edb8fef62baf62d7cfe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156440
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29454}
The new configuration path is via AudioProcessing::ApplyConfig and
AudioProcessing::GetStatistics.
ApmTest.Process passes with unchanged reference files if
audio_processing_impl would initialize the VAD with
VoiceDetection::kLowLikelihood instead of kVeryLowLikelihood.
This was verified by testing this CL with that modification.
Bug: webrtc:9878
Change-Id: I4d08df37a07e5c72feeec02a07d6b9435f917d72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155445
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29395}
Currently, APM fakes multichannel in two ways:
- With injected AECs, capture processing is only performed on the left
channel. The result is copied into the other channels.
- With multichannel render audio, all channels are mixed into one
before analysing.
This CL adds a flag to disable these behaviors, ensuring proper
multichannel processing happens throughout the APM pipeline.
Adds killswitches to separately disable render / capture multichannel.
Additionally - AEC3 currently crashes when running with multichannel.
This CL adds the missing pieces to at least have it run without
triggering any DCHECKS, including making the high pass filter properly
handle multichannel.
Bug: webrtc:10913, webrtc:10907
Change-Id: I38795bf8f312b959fcc816a056fba2c68d4e424d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152483
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29248}
This CL allows the user to have more refined control over what band
splitting-scheme is used inside the audio processing module.
Bug: webrtc:6181
Change-Id: I236c3b1f96ab80cc4ffb8c39c045c034764567a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152480
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29189}
This is a reland of b7b8e30cb4
Original change's description:
> Reland Process 8 kHz audio as 16 kHz internally of the audio processing module
>
> This CL relands the code from the CL "Process 8 kHz audio as 16 kHz internally
> of the audio processing module" which by mistake was reverted via a rebase in
> another CL.
>
> The CL changes the behavior of APM for 8 kHz so that it is internally
> processed as 16 kHz.
>
> Bug: webrtc:10863
> Change-Id: I32a57b2d279c2134125667c19b09cfda381a33c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150221
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28944}
Bug: webrtc:10863
Change-Id: Ic626b99b099248f0d8a677dc4cfe1505e14ae7cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150330
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28949}
This reverts commit b7b8e30cb4.
Reason for revert: Broke ApmTest.Process test in internal iOS waterfall
Original change's description:
> Reland Process 8 kHz audio as 16 kHz internally of the audio processing module
>
> This CL relands the code from the CL "Process 8 kHz audio as 16 kHz internally
> of the audio processing module" which by mistake was reverted via a rebase in
> another CL.
>
> The CL changes the behavior of APM for 8 kHz so that it is internally
> processed as 16 kHz.
>
> Bug: webrtc:10863
> Change-Id: I32a57b2d279c2134125667c19b09cfda381a33c3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150221
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28944}
TBR=gustaf@webrtc.org,peah@webrtc.org
Change-Id: Ia49e07b0c25c49da646917516e317f1d57cc4e84
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10863
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150326
Reviewed-by: Artem Titarenko <artit@webrtc.org>
Commit-Queue: Artem Titarenko <artit@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28948}
This CL relands the code from the CL "Process 8 kHz audio as 16 kHz internally
of the audio processing module" which by mistake was reverted via a rebase in
another CL.
The CL changes the behavior of APM for 8 kHz so that it is internally
processed as 16 kHz.
Bug: webrtc:10863
Change-Id: I32a57b2d279c2134125667c19b09cfda381a33c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150221
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28944}
This is a reland of 81c0cf287c
Original change's description:
> Simplification and refactoring of the AudioBuffer code
>
> This CL performs a major refactoring and simplification
> of the AudioBuffer code that.
> -Removes 7 of the 9 internal buffers of the AudioBuffer.
> -Avoids the implicit copying required to keep the
> internal buffers in sync.
> -Removes all code relating to handling of fixed-point
> sample data in the AudioBuffer.
> -Changes the naming of the class methods to reflect
> that only floating point is handled.
> -Corrects some bugs in the code.
> -Extends the handling of internal downmixing to be
> more generic.
>
> Bug: webrtc:10882
> Change-Id: I12c8af156fbe366b154744a0a1b3d926bf7be572
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149828
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28928}
Bug: webrtc:10882
Change-Id: I2ddf327e80a03468c41662ae63c619ff34f2363a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150101
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28938}
This CL changes the behavior of APM for 8 kHz so that it is internally
processed as 16 kHz.
Bug: webrtc:10863
Change-Id: Ie17de6551c6e984b60534820374a49ca298f06ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148800
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28929}
Only remaining user is WavReader. Demote its constructor
accepting a PlatformFile to private, to refactor implementation
in a later cl.
Bug: webrtc:6463
Change-Id: I7b950be6f02073cb135dd0fab1190b9dc0de1fba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144025
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28410}
Add a PlayoutVolumeChange RuntimeSetting. Trigger an echo path change when the playout volume is changed.
Bug: webrtc:10608
Change-Id: I1e736b93c1865d08c7d2582f6fe00216c1e1f72e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135746
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Fredrik Hernqvist <fhernqvist@webrtc.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27913}
This CL removes the legacy reporting of histogram data for AEC2.
Bug: webrtc:5298
Change-Id: I838e729e0fb78d28e16de0fa79ddf5c857682d65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135101
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27834}
This CL extends the supported runtime settings in
APM to also comprise the AGC2 fixed gain.
The CL was originally created by Adam Whiteside.
Bug: webrtc:10574
Change-Id: I79b3d6501f1e202b66a9b6018f8a493a56b01f62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134101
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27782}
The pointer-to-submodule interfaces are being removed.
This CL:
1) introduces AudioProcessing::Config::GainController1 with most config,
2) adds functions to APM for setting and getting analog gain,
3) creates a temporary GainControlConfigProxy to support the transition
to the new config.
4) Moves the lock references in GainControlForExperimentalAgc and
GainControlImpl into the GainControlConfigProxy, as it becomes the
sole AGC object with functionality exposed to the client.
Bug: webrtc:9947, webrtc:9878
Change-Id: Ic31e15e9bb26d6497a92b77874e0b6cab21ff2b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126485
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27316}
This CL adds a temporary flag for specifying that the legacy AEC2 should
be used.
Bug: webrtc:10366
Change-Id: Ie3edaa1560cdc1282b62242beb67aa6fee7f2841
Reviewed-on: https://webrtc-review.googlesource.com/c/124980
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26891}
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.
More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.
Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
This Config configuration will eventually replace the AudioProcessing::noise_suppression() interface.
This also introduces a proxy NoiseSuppression, returned by AudioProcessing::noise_suppression.
Without this proxy, ApplyConfig could overwrite NS settings for clients who currently use noise_suppression(). For example, the following code will not preserve the noise suppression level:
apm->noise_suppression()->set_level(NoiseSuppression::kHigh);
auto cfg = apm->GetConfig();
apm->ApplyConfig(cfg);
The NoiseSuppression instance returned by noise_suppression() has no way to update the config inside APM, so GetConfig() will return an out-of-date config which is then re-applied. This CL adds a proxy that makes this update, by forwarding Enable() and set_level() calls to ApplyConfig().
Drive-by change: AudioProcessing::Config substructs are reordered to mirror the capture processing pipeline.
Tested: Ran ToT and this CL builds of audioproc_f and verified identical settings/aecdumps.
Bug: webrtc:9947
Change-Id: I823eade894be115c254d656562564108b2b63b1f
Reviewed-on: https://webrtc-review.googlesource.com/c/116521
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26248}
This adds a second (!) VoiceDetection instance in APM, activated via webrtc::AudioProcessing::Config and which reports its values in the webrtc::AudioProcessingStats struct.
The alternative is to reuse the existing instance, but that would require adding a proxy interface returned by AudioProcessing::voice_detection() to update the internal config of AudioProcessingImpl when calling voice_detection()->Enable().
Complexity-wise, no reasonable client will enable both interfaces simultaneously, so the footprint is negligible.
Bug: webrtc:9947
Change-Id: I7d8e28b9bf06abab8f9c6822424bdb9d803b987d
Reviewed-on: https://webrtc-review.googlesource.com/c/115243
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26101}
This adds an interface for accessing stats on the capture stream, and
adds a level estimator to report one of the stats.
Bug: webrtc:9947
Change-Id: Id472534fa2e04d46c9ab700671f620584a246afb
Reviewed-on: https://webrtc-review.googlesource.com/c/109587
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25786}
Avoid that the client code relies on the adaptive digital mode being
enabled by default (error prone).
Bug: webrtc:7494
Change-Id: I765fecf535cf31a2163e10595a42520473c233b6
Reviewed-on: https://webrtc-review.googlesource.com/c/111586
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25728}
This CL makes possible to choose the level estimation for the adaptive
digital GC of AGC2. The options are RMS (default and currently used
estimator) and peak-based (already computed, but not used).
Besides adding the new AGC2 config param for the level estimator, this CL
also refactors the config class by making it more structured.
Bug: webrtc:7494
Change-Id: I20eb558ca50f13536aa7bdea08d21de3b630f8bc
Reviewed-on: https://webrtc-review.googlesource.com/c/110144
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25620}
The extra saturation margin is a setting for the SaturationProtector
in GainController2. The higher it is, the less gain GC2 will apply. In
this CL we pipe the setting up to audio_processing.h. Now the setting
can be set at a high level.
Also in this CL add a few (missing, they should have been there
already) tests for the GC2 and GC2 with saturation margin.
Bug: webrtc:7494
Change-Id: I1b61f1662e6c6a8817fd5b0e845339694bf8d50d
Reviewed-on: https://webrtc-review.googlesource.com/c/109001
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25470}
Additionally, AudioProcessing::GetStatistics(bool) is made pure
virtual and the default implementation in AudioProcessing is removed.
Deprecation PSA:
https://groups.google.com/forum/#!msg/discuss-webrtc/NgqEPvkNuDE/7HtwnMmADgAJ
Bug: webrtc:9947, webrtc:8572
Change-Id: I123402bf7d6c49f3613154c469b818109d8fad43
Reviewed-on: https://webrtc-review.googlesource.com/c/108783
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25463}
This reverts commit 9e24dcff16.
Reason for revert: Breaks chromium.webrtc.fyi bots.
Original change's description:
> Export symbols needed by the Chromium component build (part 1).
>
> This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> to mark WebRTC symbols as visible from a shared library, this doesn't
> mean these symbols are part of the public API (please continue to refer
> to [1] for info about what is considered public WebRTC API).
>
> [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
>
> Bug: webrtc:9419
> Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24969}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/103720
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24974}
This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
to mark WebRTC symbols as visible from a shared library, this doesn't
mean these symbols are part of the public API (please continue to refer
to [1] for info about what is considered public WebRTC API).
[1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
Bug: webrtc:9419
Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
Reviewed-on: https://webrtc-review.googlesource.com/c/103505
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24969}
Original CL:
https://webrtc-review.googlesource.com/c/src/+/97603
- Changes EchoCancellationImpl to inherit privately from
EchoCancellation.
- Removes usage of AudioProcessing::echo_cancellation() inside most of
the audio processing module and unit tests.
- Default-enables metrics collection in AEC2.
The CL breaks audioproc_f backwards compatibility: It can no longer
use all recorded settings (drift compensation, suppression level), but
prints an error message when such settings are encountered.
Revert CL:
https://webrtc-review.googlesource.com/c/src/+/100305
Bug: webrtc:9535
TBR: gustaf@webrtc.org
Change-Id: I9248046b3a6a82df6221e502481836948643a991
Reviewed-on: https://webrtc-review.googlesource.com/100461
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24749}
This reverts commit 1a03960e63.
Reason for revert: breaks downstream projects.
Original change's description:
> Remove APM internal usage of EchoCancellation
>
> This CL:
> - Changes EchoCancellationImpl to inherit privately from
> EchoCancellation.
> - Removes usage of AudioProcessing::echo_cancellation() inside most of
> the audio processing module and unit tests.
> - Default-enables metrics collection in AEC2.
>
> This CL breaks audioproc_f backwards compatibility: It can no longer
> use all recorded settings (drift compensation, suppression level), but
> prints an error message when such settings are encountered.
>
> Some code in audio_processing_unittest.cc still uses the old interface.
> I'll handle that in a separate change, as it is not as straightforward
> to preserve coverage.
>
> Bug: webrtc:9535
> Change-Id: Ia4d4b8d117ccbe516e5345c15d37298418590686
> Reviewed-on: https://webrtc-review.googlesource.com/97603
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24724}
TBR=gustaf@webrtc.org,saza@webrtc.org
Change-Id: Ifdc4235f9c5ee8a8a5d32cc8e1dda0853b941693
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/100305
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24729}
This CL:
- Changes EchoCancellationImpl to inherit privately from
EchoCancellation.
- Removes usage of AudioProcessing::echo_cancellation() inside most of
the audio processing module and unit tests.
- Default-enables metrics collection in AEC2.
This CL breaks audioproc_f backwards compatibility: It can no longer
use all recorded settings (drift compensation, suppression level), but
prints an error message when such settings are encountered.
Some code in audio_processing_unittest.cc still uses the old interface.
I'll handle that in a separate change, as it is not as straightforward
to preserve coverage.
Bug: webrtc:9535
Change-Id: Ia4d4b8d117ccbe516e5345c15d37298418590686
Reviewed-on: https://webrtc-review.googlesource.com/97603
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24724}
Added back the 'agc2 level estimation' flag. Also added a flag for
moving the level measurement before AEC and NS. This is to run offline
experiments with audioproc_f.
Bug: webrtc:7494
Change-Id: I3e3ffceede7166b754130be2b707b620ba527e9f
Reviewed-on: https://webrtc-review.googlesource.com/97442
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24657}
The intelligibility enhancer is always disabled and it is the only non-test
target using the lapped transform in common_audio (which we planned to remove).
Bug: webrtc:9689, webrtc:5298
Change-Id: Ida65d3aa11ac366471e7e5cbc053108b376c67d8
Reviewed-on: https://webrtc-review.googlesource.com/96460
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24504}
CustomAudioAnalyzer is an interface of a component into APM that
reads AudioBuffer without changing it.
The APM sub-module is optional. It operates in full band.
As described in the comments, it is an experimental interface which
may be changed in the nearest future.
Change-Id: I21edf729d97947529256407b10fa4b5219bb2bf5
Bug: webrtc:9678
Reviewed-on: https://webrtc-review.googlesource.com/96560
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Valeriia Nemychnikova <valeriian@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24481}
The AGC2 is enabled by flipping
AudioProcessing::Config::GainController2::enabled. The flag enables
both AdaptiveAgc and FixedGainController. Before this CL, there was no
way(*) to only enable the FixedGainController. After this CL, it's
also possible to flip the setting
|AudioProcessing::Config::GainController2::adaptive_digital_mode|. The
default is |true|, which is the previous behavior.
* Except for instantiating and setting it up outside of the APM like
it's done in the AudioMixer.
Bug: webrtc:7494
Change-Id: I506e93b6687221ac467f083fa8db3d45c98c1b83
Reviewed-on: https://webrtc-review.googlesource.com/95426
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24432}
This will be hooked up in clients who need to keep using the moderate
suppression level in AEC2 until other tuning options are available.
Bug: webrtc:9535
Change-Id: I6c40898954d9c856f58bcea87271f4b98fa124de
Reviewed-on: https://webrtc-review.googlesource.com/94148
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24292}
This CL adds a flag to optionally disable the digital gain control in
ExperimentalAgc. With the flag, Experimental Agc (henceforth AGC1)
only controls the adaptive analog gain. This flag can be combined to
that which activates AGC2. That way, one can enable the hybrid AGC
configuration AGC1 analog only + AGC2 fixed+adaptive digital.
Previously, there was a flag "use_agc2_digital_adaptive" in
AgcManagerDirect. Our ambition was that to activate the hybrid mode
described above with this flag. The behavior of the flag was not
implemented.
To activate the hybrid mode after this CL, set
ExperimentalAgc::digital_adaptive_disabled=true and
AudioProcessing::Config::GainController2::enabled=true.
We also add flags for these settings in audioproc_f.
Then the required settings are currently
audioproc_f --agc2 1 --agc 1 --experimental_agc 1 \
--experimental_agc_disable_digital_adaptive 1 \
-i [INPUT]
Bug: webrtc:7494
Change-Id: Iea798dc3899cec83d30ba71caba787262fcaef41
Reviewed-on: https://webrtc-review.googlesource.com/89740
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24249}
Related bug closed since half a year back.
Bug: webrtc:8665
Change-Id: I77007caaa97b5db04f5cf144323cac7a576a7fde
Reviewed-on: https://webrtc-review.googlesource.com/90872
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24135}
This will be the one way of toggling AEC. The EchoControlMobile and
EchoCancellation interfaces will be removed.
The settings introduced here are not used yet, to allow for smooth
downstream fixes.
Bug: webrtc:9535
Change-Id: I3b1a524a0ab7daf63419d7e5ed47417b9282dbf6
Reviewed-on: https://webrtc-review.googlesource.com/90864
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24129}
This reverts commit 771b50ca0b.
Reason for revert: Introduces error-prone config.
Original change's description:
> Add one-stop-shop for built-in AEC toggling in APM
>
> This does not change what AEC functionality is available.
> However, a client that only uses this interface - and not the submodule
> pointer accessors - gets simpler code, and is guaranteed not to run any
> two AECs in tandem.
>
> The submodule interface EchoControlMobile is being deprecated in
> https://webrtc-review.googlesource.com/c/src/+/89392
>
> Bug: webrtc:9535
> Change-Id: Id9326074e566be6d8768010fc421c457beff402c
> Reviewed-on: https://webrtc-review.googlesource.com/89386
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24066}
TBR=saza@webrtc.org,peah@webrtc.org
Change-Id: I43283a1b22538a4caa77313499989146b2ce67f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/90060
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24067}
This does not change what AEC functionality is available.
However, a client that only uses this interface - and not the submodule
pointer accessors - gets simpler code, and is guaranteed not to run any
two AECs in tandem.
The submodule interface EchoControlMobile is being deprecated in
https://webrtc-review.googlesource.com/c/src/+/89392
Bug: webrtc:9535
Change-Id: Id9326074e566be6d8768010fc421c457beff402c
Reviewed-on: https://webrtc-review.googlesource.com/89386
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24066}
Splits 'modules/audio_processing:audio_processing' target. The files
in modules/audio_processing/agc now are in targets in that folder.
Reason for doing this was to include
modules/audio_processing/agc/agc.h from another target in the
dependent CL https://webrtc-review.googlesource.com/c/src/+/86603
This could help reducing the binary size in the future.
Bug: webrtc:7494
Change-Id: I61f50ab6d5ce24d19f4097e0f3fa8b0170010887
Reviewed-on: https://webrtc-review.googlesource.com/87422
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23873}
This CL adds two flags to audioproc_f. The flags control
AgcManagerDirect. The flags are
'--experimental_agc_agc2_level_estimator' and
'--experimental_agc_agc2_digital_adaptive'.
After this CL, the flags are be applied to AgcManagerDirect. The flags
have no effect in release-mode. They cause a crash in debug-mode.
In an upcoming CL, '--experimental_agc_agc2_level_estimator 1' will
replace the speech level estimation in ExperimentalAgc with that of
AGC2.
'--experimental_agc_agc2_digital_adaptive 1' will replace the digital
gain selection and application with that of AGC2.
These audioproc_f will activate both new settings:
./out/Target/audioproc_f --agc 1 --experimental_agc 1
--experimental_agc_agc2_digital_adaptive 1
--experimental_agc_agc2_level_estimator 1 --simulate_mic_gain 1
--simulated_mic_kind 2
See also https://webrtc-review.googlesource.com/c/src/+/79360
Bug: webrtc:7494
Change-Id: If0e65893dffdddb312e553787b8cedaf9a334323
Reviewed-on: https://webrtc-review.googlesource.com/86548
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23802}
This CL removes the remaining beamformer parts from the APM.
Bug: webrtc:9402
Change-Id: I9ab2795bd2813d17166ed0925125257b82d98a74
Reviewed-on: https://webrtc-review.googlesource.com/83340
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23694}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameter 'modules/audio_processing'
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: Id29f8de59dba704787c2c38a3d05c60827c181b0
Reviewed-on: https://webrtc-review.googlesource.com/83982
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23653}
Removes the usage of an injected/enabled beamformer in APM, and marks
the API parts as deprecated.
Initialization and process calls are removed, and all enabled/disabled
flags are replaced by assuming no beamforming. Additionally, an AGC test
relying on the beamformer as a VAD is removed.
Bug: webrtc:9402
Change-Id: I0d3d0b9773da083ce43c28045db9a77278f59f95
Reviewed-on: https://webrtc-review.googlesource.com/83341
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23643}
The echo detector is currently stored as a unique_ptr, but when injecting an echo detector, a scoped_refptr makes more sense since the ownership will be shared.
Bug: webrtc:8732
Change-Id: I2180014acb84f1cd5c361864a444b7b6574520f5
Reviewed-on: https://webrtc-review.googlesource.com/83325
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23610}
CustomProcessing is the interface to injectable audio processing
submodules to AudioProcessing. This CL makes it possible to set
runtime settings on the injected render processing component.
Note that the current runtime setting handling happens on the capture
thread. Therefore, we add another SwapQueue to communicate with the
render thread.
Bug: webrtc:9138, webrtc:9262
Change-Id: I665ce2d83a2b35ca8b25cca813d2cef7bd0ba911
Reviewed-on: https://webrtc-review.googlesource.com/76123
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23236}
Add configuration fields for the pre-amplifier in the Audio Processing
Module. Also add flags and settings for the pre-amplifier in
audioproc_f.
Also make the setting stored in Aec Dumps. And make the setting
applied when playing back Aec Dumps in audioproc_f.
Bug: webrtc:9138
Change-Id: I4e59df200e1ebc56f06fae74ebf17d85858958a3
Reviewed-on: https://webrtc-review.googlesource.com/69560
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22876}
This CL includes the following changes:
- APM runtime setting (ID + float payload) and unit tests
- Swap queue of APM runtime settings used in AudioProcessingImpl
- runtime settings handler that forwards the settings to APM
sub-modules when a message is retrieved from the queue
- Unit test placeholder to check that the pre-gain update message
is correctly delivered
Bug: webrtc:9138
Change-Id: Id22704af15fde2b87a4431f5ce64ad1aeafc5280
Reviewed-on: https://webrtc-review.googlesource.com/69320
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22873}
We update the configuration settings for AGC2. We also update their
effects. Now, 'gain_controller2.enable=true' means 'first run Adaptive
AGC2; then run AGC2 limiter'.
Previously, only the AGC2 limiter was implemented. To run that, one
had to set both 'gain_controller2.enable=true' and
'gain_controller2.enable_limiter=true'.
This setting also enables adaptive AGC2 in the test tool 'audioproc_f'.
Bug: webrtc:7494
Change-Id: I0d5dfe443f2cdc0ecf3aa4054442dab6276d284d
Reviewed-on: https://webrtc-review.googlesource.com/64990
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22669}
Since the echo detector processes both the render and the capture audio streams, it needs to know the sample rates and number of channels of both.
Bug: webrtc:8732
Change-Id: Icd26e561d5dd98bd789a6dfa75f468f3fde06fee
Reviewed-on: https://webrtc-review.googlesource.com/61861
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22436}
This is a reland of 6f37ed78d9
CQ dry run OK except for missing iOS swarming bots.
NOTRY=True
Original change's description:
> Deprecate the adaptive level controller
>
> Level control handled by default-on AGC.
>
> Bug: none
> Change-Id: I405daeceece12c896d41156b649fcfd556726f77
> Reviewed-on: https://webrtc-review.googlesource.com/59682
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22305}
Bug: none
Change-Id: I0b9b8e2f3457d5efd4603efbfbbc6b84651df315
Reviewed-on: https://webrtc-review.googlesource.com/60720
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22352}
This provides the empty shell of an AudioGenerator class.
It is intended to be used for debugging purposes and can be inserted
into the APM much like an AecDump. It allows for playing out diagnostic
audio unaffected by codecs and network jitter, while still capturing
API interaction like in a normal call.
NOTRY=True
Bug: webrtc:8882
Change-Id: I8132afc95cdba02ab233f44e22e0a5f530710ef7
Reviewed-on: https://webrtc-review.googlesource.com/53300
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22282}