Index: webrtc/modules/audio_coding/test/iSACTest.cc |
diff --git a/webrtc/modules/audio_coding/test/iSACTest.cc b/webrtc/modules/audio_coding/test/iSACTest.cc |
index 09744b13c61436970eea97a693e3fde15cfff214..ec4233b8451a2da61eca53ca19dbc657aebdf5cc 100644 |
--- a/webrtc/modules/audio_coding/test/iSACTest.cc |
+++ b/webrtc/modules/audio_coding/test/iSACTest.cc |
@@ -23,6 +23,7 @@ |
#include <time.h> |
#endif |
+#include "webrtc/base/checks.h" |
#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h" |
#include "webrtc/modules/audio_coding/test/utility.h" |
#include "webrtc/system_wrappers/include/event_wrapper.h" |
@@ -117,6 +118,11 @@ void ISACTest::Setup() { |
EXPECT_EQ(0, _acmA->RegisterSendCodec(_paramISAC32kHz)); |
_inFileA.Open(file_name_swb_, 32000, "rb"); |
+ static const int kTestLengthMs = 500; |
+ const int test_length_blocks = rtc::CheckedDivExact(kTestLengthMs, 10); |
+ _inFileA.SetNum10MsBlocksToRead(test_length_blocks); |
+ // Fast-forward 1 second (100 blocks) since the files start with silence. |
+ _inFileA.FastForward(100); |
std::string fileNameA = webrtc::test::OutputPath() + "testisac_a.pcm"; |
std::string fileNameB = webrtc::test::OutputPath() + "testisac_b.pcm"; |
_outFileA.Open(fileNameA, 32000, "wb"); |