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

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

Issue 2750783004: Add mute state field to AudioFrame. (Closed)
Patch Set: Third round of comments Created 3 years, 9 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 _inFileA.SetNum10MsBlocksToRead(50); 458 _inFileA.SetNum10MsBlocksToRead(50);
459 // Fast-forward 1 second (100 blocks) since the file starts with silence. 459 // Fast-forward 1 second (100 blocks) since the file starts with silence.
460 _inFileA.FastForward(100); 460 _inFileA.FastForward(100);
461 461
462 while (!_inFileA.EndOfFile()) { 462 while (!_inFileA.EndOfFile()) {
463 EXPECT_GT(_inFileA.Read10MsData(audioFrame), 0); 463 EXPECT_GT(_inFileA.Read10MsData(audioFrame), 0);
464 EXPECT_GE(_acmA->Add10MsData(audioFrame), 0); 464 EXPECT_GE(_acmA->Add10MsData(audioFrame), 0);
465 bool muted; 465 bool muted;
466 EXPECT_EQ(0, _acmB->PlayoutData10Ms(outFreqHzB, &audioFrame, &muted)); 466 EXPECT_EQ(0, _acmB->PlayoutData10Ms(outFreqHzB, &audioFrame, &muted));
467 ASSERT_FALSE(muted); 467 ASSERT_FALSE(muted);
468 _outFileB.Write10MsData(audioFrame.data_, audioFrame.samples_per_channel_); 468 _outFileB.Write10MsData(audioFrame.data(), audioFrame.samples_per_channel_);
469 } 469 }
470 _inFileA.Rewind(); 470 _inFileA.Rewind();
471 } 471 }
472 472
473 void TestRedFec::OpenOutFile(int16_t test_number) { 473 void TestRedFec::OpenOutFile(int16_t test_number) {
474 std::string file_name; 474 std::string file_name;
475 std::stringstream file_stream; 475 std::stringstream file_stream;
476 file_stream << webrtc::test::OutputPath(); 476 file_stream << webrtc::test::OutputPath();
477 file_stream << "TestRedFec_outFile_"; 477 file_stream << "TestRedFec_outFile_";
478 file_stream << test_number << ".pcm"; 478 file_stream << test_number << ".pcm";
479 file_name = file_stream.str(); 479 file_name = file_stream.str();
480 _outFileB.Open(file_name, 16000, "wb"); 480 _outFileB.Open(file_name, 16000, "wb");
481 } 481 }
482 482
483 } // namespace webrtc 483 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698