Chromium Code Reviews

Unified Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc

Issue 2669733002: Add 120ms frame ability to ANA (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
index bd0afc6fa8eeda15a65592bacf9b29e22faf9742..ab20dbcf3f8f7e1fa89e2b3be479760c26b1386b 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
@@ -31,7 +31,12 @@ namespace {
constexpr int kSampleRateHz = 48000;
constexpr int kMinBitrateBps = 500;
constexpr int kMaxBitrateBps = 512000;
+
+#if WEBRTC_OPUS_SUPPORT_120MS_PTIME
+constexpr int kSupportedFrameLengths[] = {20, 60, 120};
+#else
constexpr int kSupportedFrameLengths[] = {20, 60};
+#endif
// PacketLossFractionSmoother uses an exponential filter with a time constant
// of -1.0 / ln(0.9999) = 10000 ms.

Powered by Google App Engine