NetEq: Update CNG code to accommodate 48 kHz sample rate
Checksums were updated for NetEq and ACM bitexactness tests (after
verifying the audio quality).
BUG=webrtc:5447
Review-Url: https://codereview.webrtc.org/2266293005
Cr-Commit-Position: refs/heads/master@{#13928}
diff --git a/webrtc/modules/audio_coding/neteq/normal.cc b/webrtc/modules/audio_coding/neteq/normal.cc
index f99b3f2..7316918 100644
--- a/webrtc/modules/audio_coding/neteq/normal.cc
+++ b/webrtc/modules/audio_coding/neteq/normal.cc
@@ -145,14 +145,15 @@
}
} else if (last_mode == kModeRfc3389Cng) {
assert(output->Channels() == 1); // Not adapted for multi-channel yet.
- static const size_t kCngLength = 32;
+ static const size_t kCngLength = 48;
+ RTC_DCHECK_LE(static_cast<size_t>(8 * fs_mult), kCngLength);
int16_t cng_output[kCngLength];
// Reset mute factor and start up fresh.
external_mute_factor_array[0] = 16384;
ComfortNoiseDecoder* cng_decoder = decoder_database_->GetActiveCngDecoder();
if (cng_decoder) {
- // Generate long enough for 32kHz.
+ // Generate long enough for 48kHz.
if (!cng_decoder->Generate(cng_output, 0)) {
// Error returned; set return vector to all zeros.
memset(cng_output, 0, sizeof(cng_output));