Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: webrtc/modules/audio_coding/neteq/normal.cc

Issue 2266293005: NetEq: Update CNG code to accommodate 48 kHz sample rate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@neteq-fuzz-fix2
Patch Set: Fixing android arm64 checksums Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/normal.cc
diff --git a/webrtc/modules/audio_coding/neteq/normal.cc b/webrtc/modules/audio_coding/neteq/normal.cc
index f99b3f200f4ff4fe0c81f28421ec26bc7db1d612..73169184cabd086777c30332bbd6f3816ea7b2e0 100644
--- a/webrtc/modules/audio_coding/neteq/normal.cc
+++ b/webrtc/modules/audio_coding/neteq/normal.cc
@@ -145,14 +145,15 @@ int Normal::Process(const int16_t* input,
}
} 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));
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698