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

Unified Diff: webrtc/modules/audio_coding/test/iSACTest.cc

Issue 1513223002: Reduce the runtime of some ACM tests in modules_tests (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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
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");

Powered by Google App Engine
This is Rietveld 408576698