Allow setting the AGC2 fixed gain during runtime
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}
This commit is contained in:
@ -2349,6 +2349,21 @@ TEST(RuntimeSettingTest, TestCapturePreGain) {
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(RuntimeSettingTest, TestCaptureFixedPostGain) {
|
||||
using Type = AudioProcessing::RuntimeSetting::Type;
|
||||
{
|
||||
auto s = AudioProcessing::RuntimeSetting::CreateCaptureFixedPostGain(1.25f);
|
||||
EXPECT_EQ(Type::kCaptureFixedPostGain, s.type());
|
||||
float v;
|
||||
s.GetFloat(&v);
|
||||
EXPECT_EQ(1.25f, v);
|
||||
}
|
||||
|
||||
#if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
|
||||
EXPECT_DEATH(AudioProcessing::RuntimeSetting::CreateCapturePreGain(0.1f), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(RuntimeSettingTest, TestUsageWithSwapQueue) {
|
||||
SwapQueue<AudioProcessing::RuntimeSetting> q(1);
|
||||
auto s = AudioProcessing::RuntimeSetting();
|
||||
|
||||
Reference in New Issue
Block a user