Disables mic bump-up level if not built with chromium
In http://chromegw.corp.google.com/viewvc/chrome-internal?view=rev&revision=61016 a feature to bump up low input audio levels to a fixed value of 33%. In https://webrtc-codereview.appspot.com/43109004/ a configuration to choose an arbitrary level was added, but still using 33% as default. The original bump-up feature was added to fix audio issues in chrome, but affected also non-chrome users. This CL disables the feature for non-chrome applications. Note that the default value is set to 0, but any value up to 12 will do. Zero was selected because it is more clear that the feature is turned off. BUG=4529 R=andrew@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43259004 Cr-Commit-Position: refs/heads/master@{#9048}
This commit is contained in:
parent
8f85dbcce4
commit
fb49451014
@ -78,7 +78,11 @@ struct ReportedDelay {
|
||||
// [12, 255]. Here, 255 maps to 100%.
|
||||
//
|
||||
// Must be provided through AudioProcessing::Create(Confg&).
|
||||
#if defined(WEBRTC_CHROMIUM_BUILD)
|
||||
static const int kAgcStartupMinVolume = 85;
|
||||
#else
|
||||
static const int kAgcStartupMinVolume = 0;
|
||||
#endif // defined(WEBRTC_CHROMIUM_BUILD)
|
||||
struct ExperimentalAgc {
|
||||
ExperimentalAgc() : enabled(true), startup_min_volume(kAgcStartupMinVolume) {}
|
||||
ExperimentalAgc(bool enabled)
|
||||
|
@ -388,8 +388,13 @@ TEST_F(AgcManagerUnitTest, ChangingDevicesChecksVolume) {
|
||||
|
||||
TEST_F(AgcManagerUnitTest, LowInitialVolumeIsRaised) {
|
||||
ExpectCheckVolumeAndReset(11u);
|
||||
// Should set MicVolume to kMinInitMicLevel = 85.
|
||||
#if defined(WEBRTC_CHROMIUM_BUILD)
|
||||
// Should set MicVolume to kMinInitMicLevel = 85 if built with Chromium.
|
||||
EXPECT_CALL(volume_, SetMicVolume(Eq(85u))).WillOnce(Return(0));
|
||||
#else
|
||||
// Otherwise it will raise to the kMinMicLevel = 12.
|
||||
EXPECT_CALL(volume_, SetMicVolume(Eq(12u))).WillOnce(Return(0));
|
||||
#endif
|
||||
PostProcCallback(1);
|
||||
EXPECT_CALL(*agc_, GetRmsErrorDb(_))
|
||||
.WillOnce(Return(false));
|
||||
|
Loading…
x
Reference in New Issue
Block a user