NetEq background noise generation off by default

This CL turns the background noise generation in NetEq off by default. The noise generation used to kick in during long-duration packet losses, when there was no point in extrapolating the latest audio any longer. However, this sometimes produces annoying noise in situations where silence would have been preferable.

With this change, a long packet-loss concealment will be faded out to zeros instead of a low noise.

Reference files are updated where needed.

BUG=3519
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/20109004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6882 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc b/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
index a73effb..f8748d4 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
+++ b/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
@@ -561,30 +561,38 @@
 };
 
 TEST_F(AcmReceiverBitExactness, 8kHzOutput) {
+  // TODO(henrik.lundin) Update the android checksum once the android bots are
+  // running this test again.
   Run(8000,
-      PlatformChecksum("a53573d9a44a53ea852056e9550fbd53",
+      PlatformChecksum("bd6f8d9602cd82444ea2539e674df747",
                        "7924385273062b9f07aa3d4dff30d601",
-                       "c54fd4a532cdb400bca2758d3a941eee"));
+                       "8a8440f5511eb729221b9aac25cda3a0"));
 }
 
 TEST_F(AcmReceiverBitExactness, 16kHzOutput) {
+  // TODO(henrik.lundin) Update the android checksum once the android bots are
+  // running this test again.
   Run(16000,
-      PlatformChecksum("16ed8ee37bad45de2e1ad2b34c7c3910",
+      PlatformChecksum("a39bc6ee0c4eb15f3ad2f43cebcc571d",
                        "d1d3dde41da936f80fa63d718fbc0fc0",
-                       "68a8b57a0672356f846b3cea51e49903"));
+                       "7be583092c5adbcb0f6cd66eca20ea63"));
 }
 
 TEST_F(AcmReceiverBitExactness, 32kHzOutput) {
+  // TODO(henrik.lundin) Update the android checksum once the android bots are
+  // running this test again.
   Run(32000,
-      PlatformChecksum("f0f41f494d5d811f5a1cfce8fd89d9db",
+      PlatformChecksum("80964572aaa2dc92f9e34896dd3802b3",
                        "23b82b2605e3aab3d4d9e67dba341355",
-                       "f2a69bcdedca515e548cd2c5af75d046"));
+                       "3a84188abe9fca25fedd6034760f3e22"));
 }
 
 TEST_F(AcmReceiverBitExactness, 48kHzOutput) {
+  // TODO(henrik.lundin) Update the android checksum once the android bots are
+  // running this test again.
   Run(48000,
-      PlatformChecksum("77730099d995180ab6cb60379d4a9715",
+      PlatformChecksum("8aacde91f390e0d5a9c2ed571a25fd37",
                        "580c2d0b273ffa8fa0796d784908cbdb",
-                       "5c1bdee51750e13fbb9413bc9280c0dd"));
+                       "89b4b19bdb4de40f1d88302ef8cb9f9b"));
 }
 }  // namespace webrtc
diff --git a/modules/audio_coding/neteq/expand.cc b/modules/audio_coding/neteq/expand.cc
index 3f7ed24..bf0fa68 100644
--- a/modules/audio_coding/neteq/expand.cc
+++ b/modules/audio_coding/neteq/expand.cc
@@ -861,8 +861,8 @@
                               mute_slope,
                               noise_samples);
     } else if (bgn_mute_factor < 16384) {
-      // If mode is kBgnOff, or if kBgnFade has started fading,
-      // Use regular |mute_slope|.
+      // If mode is kBgnOn, or if kBgnFade has started fading,
+      // use regular |mute_slope|.
       if (!stop_muting_ && bgn_mode != NetEq::kBgnOff &&
           !(bgn_mode == NetEq::kBgnFade && too_many_expands)) {
         DspHelper::UnmuteSignal(noise_samples,
diff --git a/modules/audio_coding/neteq/interface/neteq.h b/modules/audio_coding/neteq/interface/neteq.h
index fdd000a..7196bc1 100644
--- a/modules/audio_coding/neteq/interface/neteq.h
+++ b/modules/audio_coding/neteq/interface/neteq.h
@@ -74,7 +74,7 @@
           max_packets_in_buffer(50),
           // |max_delay_ms| has the same effect as calling SetMaximumDelay().
           max_delay_ms(2000),
-          background_noise_mode(kBgnOn) {}
+          background_noise_mode(kBgnOff) {}
 
     int sample_rate_hz;  // Initial vale. Will change with input data.
     bool enable_audio_classifier;