From 1746179c96b2605a4fce7cee124794a78de45e77 Mon Sep 17 00:00:00 2001 From: minyue Date: Tue, 3 May 2016 13:32:05 -0700 Subject: [PATCH] Reducing neteq sync buffer size. BUG=608644 Review-Url: https://codereview.webrtc.org/1947453002 Cr-Commit-Position: refs/heads/master@{#12614} --- webrtc/modules/audio_coding/neteq/neteq_impl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.h b/webrtc/modules/audio_coding/neteq/neteq_impl.h index 2203de1a39..2be3ee4c70 100644 --- a/webrtc/modules/audio_coding/neteq/neteq_impl.h +++ b/webrtc/modules/audio_coding/neteq/neteq_impl.h @@ -210,7 +210,9 @@ class NetEqImpl : public webrtc::NetEq { static const int kOutputSizeMs = 10; static const size_t kMaxFrameSize = 5760; // 120 ms @ 48 kHz. // TODO(hlundin): Provide a better value for kSyncBufferSize. - static const size_t kSyncBufferSize = 2 * kMaxFrameSize; + // Current value is kMaxFrameSize + 60 ms * 48 kHz, which is enough for + // calculating correlations of current frame against history. + static const size_t kSyncBufferSize = kMaxFrameSize + 60 * 48; // Inserts a new packet into NetEq. This is used by the InsertPacket method // above. Returns 0 on success, otherwise an error code.