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

Unified Diff: webrtc/modules/audio_coding/main/test/APITest.cc

Issue 1362943004: ACM: Removing runtime APIs related to playout mode (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years, 3 months 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/main/test/APITest.cc
diff --git a/webrtc/modules/audio_coding/main/test/APITest.cc b/webrtc/modules/audio_coding/main/test/APITest.cc
index 3c485fd9c2aa8cef65d6265eb5844bc91b4e1c80..c84d3c076a4616a0733b738fb38207cdaeaadb13 100644
--- a/webrtc/modules/audio_coding/main/test/APITest.cc
+++ b/webrtc/modules/audio_coding/main/test/APITest.cc
@@ -424,7 +424,7 @@ void APITest::RunTest(char thread) {
{
WriteLockScoped cs(_apiTestRWLock);
if (thread == 'A') {
- _testNumA = (_testNumB + 1 + (rand() % 4)) % 5;
+ _testNumA = (_testNumB + 1 + (rand() % 3)) % 4;
testNum = _testNumA;
_movingDot[_dotPositionA] = ' ';
@@ -437,7 +437,7 @@ void APITest::RunTest(char thread) {
_dotPositionA += _dotMoveDirectionA;
_movingDot[_dotPositionA] = (_dotMoveDirectionA > 0) ? '>' : '<';
} else {
- _testNumB = (_testNumA + 1 + (rand() % 4)) % 5;
+ _testNumB = (_testNumA + 1 + (rand() % 3)) % 4;
testNum = _testNumB;
_movingDot[_dotPositionB] = ' ';
@@ -459,18 +459,15 @@ void APITest::RunTest(char thread) {
ChangeCodec('A');
break;
case 1:
- TestPlayout('B');
- break;
- case 2:
if (!_randomTest) {
fprintf(stdout, "\nTesting Delay ...\n");
}
TestDelay('A');
break;
- case 3:
+ case 2:
TestSendVAD('A');
break;
- case 4:
+ case 3:
TestRegisteration('A');
break;
default:
@@ -493,7 +490,6 @@ bool APITest::APIRunA() {
} else {
CurrentCodec('A');
ChangeCodec('A');
- TestPlayout('B');
if (_codecCntrA == 0) {
fprintf(stdout, "\nTesting Delay ...\n");
TestDelay('A');
@@ -922,67 +918,6 @@ void APITest::TestRegisteration(char sendSide) {
}
}
-// Playout Mode, background noise mode.
-// Receiver Frequency, playout frequency.
-void APITest::TestPlayout(char receiveSide) {
- AudioCodingModule* receiveACM;
- AudioPlayoutMode* playoutMode = NULL;
- switch (receiveSide) {
- case 'A': {
- receiveACM = _acmA.get();
- playoutMode = &_playoutModeA;
- break;
- }
- case 'B': {
- receiveACM = _acmB.get();
- playoutMode = &_playoutModeB;
- break;
- }
- default:
- receiveACM = _acmA.get();
- }
-
- int32_t receiveFreqHz = receiveACM->ReceiveFrequency();
- int32_t playoutFreqHz = receiveACM->PlayoutFrequency();
-
- CHECK_ERROR_MT(receiveFreqHz);
- CHECK_ERROR_MT(playoutFreqHz);
-
-
- char playoutString[25];
- switch (*playoutMode) {
- case voice: {
- *playoutMode = fax;
- strncpy(playoutString, "FAX", 25);
- break;
- }
- case fax: {
- *playoutMode = streaming;
- strncpy(playoutString, "Streaming", 25);
- break;
- }
- case streaming: {
- *playoutMode = voice;
- strncpy(playoutString, "Voice", 25);
- break;
- }
- default:
- *playoutMode = voice;
- strncpy(playoutString, "Voice", 25);
- }
- CHECK_ERROR_MT(receiveACM->SetPlayoutMode(*playoutMode));
- playoutString[24] = '\0';
-
- if (!_randomTest) {
- fprintf(stdout, "\n");
- fprintf(stdout, "In Side %c\n", receiveSide);
- fprintf(stdout, "---------------------------------\n");
- fprintf(stdout, "Receive Frequency....... %d Hz\n", receiveFreqHz);
- fprintf(stdout, "Playout Frequency....... %d Hz\n", playoutFreqHz);
- fprintf(stdout, "Audio Playout Mode...... %s\n", playoutString);
- }
-}
-
void APITest::TestSendVAD(char side) {
if (_randomTest) {
return;
« no previous file with comments | « webrtc/modules/audio_coding/main/test/APITest.h ('k') | webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698