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

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

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

Powered by Google App Engine
This is Rietveld 408576698