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

Side by Side Diff: webrtc/modules/audio_coding/test/TwoWayCommunication.cc

Issue 1985743002: Propagate muted parameter to VoE::Channel (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Resurrect the PlayoutData10Ms(int, AudioFrame*) method Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 while (!_inFileA.EndOfFile() && !_inFileB.EndOfFile()) { 254 while (!_inFileA.EndOfFile() && !_inFileB.EndOfFile()) {
255 msecPassed += 10; 255 msecPassed += 10;
256 EXPECT_GT(_inFileA.Read10MsData(audioFrame), 0); 256 EXPECT_GT(_inFileA.Read10MsData(audioFrame), 0);
257 EXPECT_GE(_acmA->Add10MsData(audioFrame), 0); 257 EXPECT_GE(_acmA->Add10MsData(audioFrame), 0);
258 EXPECT_GE(_acmRefA->Add10MsData(audioFrame), 0); 258 EXPECT_GE(_acmRefA->Add10MsData(audioFrame), 0);
259 259
260 EXPECT_GT(_inFileB.Read10MsData(audioFrame), 0); 260 EXPECT_GT(_inFileB.Read10MsData(audioFrame), 0);
261 261
262 EXPECT_GE(_acmB->Add10MsData(audioFrame), 0); 262 EXPECT_GE(_acmB->Add10MsData(audioFrame), 0);
263 EXPECT_GE(_acmRefB->Add10MsData(audioFrame), 0); 263 EXPECT_GE(_acmRefB->Add10MsData(audioFrame), 0);
264 EXPECT_EQ(0, _acmA->PlayoutData10Ms(outFreqHzA, &audioFrame)); 264 bool muted;
265 EXPECT_EQ(0, _acmA->PlayoutData10Ms(outFreqHzA, &audioFrame, &muted));
266 ASSERT_FALSE(muted);
265 _outFileA.Write10MsData(audioFrame); 267 _outFileA.Write10MsData(audioFrame);
266 EXPECT_EQ(0, _acmRefA->PlayoutData10Ms(outFreqHzA, &audioFrame)); 268 EXPECT_EQ(0, _acmRefA->PlayoutData10Ms(outFreqHzA, &audioFrame, &muted));
269 ASSERT_FALSE(muted);
267 _outFileRefA.Write10MsData(audioFrame); 270 _outFileRefA.Write10MsData(audioFrame);
268 EXPECT_EQ(0, _acmB->PlayoutData10Ms(outFreqHzB, &audioFrame)); 271 EXPECT_EQ(0, _acmB->PlayoutData10Ms(outFreqHzB, &audioFrame, &muted));
272 ASSERT_FALSE(muted);
269 _outFileB.Write10MsData(audioFrame); 273 _outFileB.Write10MsData(audioFrame);
270 EXPECT_EQ(0, _acmRefB->PlayoutData10Ms(outFreqHzB, &audioFrame)); 274 EXPECT_EQ(0, _acmRefB->PlayoutData10Ms(outFreqHzB, &audioFrame, &muted));
275 ASSERT_FALSE(muted);
271 _outFileRefB.Write10MsData(audioFrame); 276 _outFileRefB.Write10MsData(audioFrame);
272 277
273 // Update time counters each time a second of data has passed. 278 // Update time counters each time a second of data has passed.
274 if (msecPassed >= 1000) { 279 if (msecPassed >= 1000) {
275 msecPassed = 0; 280 msecPassed = 0;
276 secPassed++; 281 secPassed++;
277 } 282 }
278 // Re-register send codec on side B. 283 // Re-register send codec on side B.
279 if (((secPassed % 5) == 4) && (msecPassed >= 990)) { 284 if (((secPassed % 5) == 4) && (msecPassed >= 990)) {
280 EXPECT_EQ(0, _acmB->RegisterSendCodec(*codecInst_B)); 285 EXPECT_EQ(0, _acmB->RegisterSendCodec(*codecInst_B));
281 EXPECT_TRUE(_acmB->SendCodec()); 286 EXPECT_TRUE(_acmB->SendCodec());
282 } 287 }
283 // Initialize receiver on side A. 288 // Initialize receiver on side A.
284 if (((secPassed % 7) == 6) && (msecPassed == 0)) 289 if (((secPassed % 7) == 6) && (msecPassed == 0))
285 EXPECT_EQ(0, _acmA->InitializeReceiver()); 290 EXPECT_EQ(0, _acmA->InitializeReceiver());
286 // Re-register codec on side A. 291 // Re-register codec on side A.
287 if (((secPassed % 7) == 6) && (msecPassed >= 990)) { 292 if (((secPassed % 7) == 6) && (msecPassed >= 990)) {
288 EXPECT_EQ(0, _acmA->RegisterReceiveCodec(*codecInst_B)); 293 EXPECT_EQ(0, _acmA->RegisterReceiveCodec(*codecInst_B));
289 } 294 }
290 } 295 }
291 } 296 }
292 297
293 } // namespace webrtc 298 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/test/TestVADDTX.cc ('k') | webrtc/modules/audio_coding/test/delay_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698