OLD | NEW |
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 Loading... |
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 |
OLD | NEW |