Index: webrtc/modules/audio_coding/test/EncodeDecodeTest.cc |
diff --git a/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc b/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc |
index ef45705e20aac0b1b984911d249b6415a3c28f7f..e2a3a1278c8355f87f0bbe93f3e256ea6ab6636f 100644 |
--- a/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc |
+++ b/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc |
@@ -15,6 +15,7 @@ |
#include <stdlib.h> |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "webrtc/base/checks.h" |
#include "webrtc/base/scoped_ptr.h" |
#include "webrtc/common_types.h" |
#include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
@@ -63,6 +64,11 @@ void Sender::Setup(AudioCodingModule *acm, RTPStream *rtpStream, |
if (channels == 2) { |
_pcmFile.ReadStereo(true); |
} |
+ static const int kTestLengthMs = 500; |
ivoc
2015/12/10 12:23:57
Not sure what the point of static is here.
hlundin-webrtc
2015/12/10 12:49:59
Gone.
|
+ const int test_length_blocks = rtc::CheckedDivExact(kTestLengthMs, 10); |
+ _pcmFile.SetNum10MsBlocksToRead(test_length_blocks); |
+ // Fast-forward 1 second (100 blocks) since the file starts with silence. |
+ _pcmFile.FastForward(100); |
// Set the codec for the current test. |
if ((testMode == 0) || (testMode == 1)) { |