| 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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 } | 799 } |
| 800 } | 800 } |
| 801 | 801 |
| 802 // Run received side of ACM | 802 // Run received side of ACM |
| 803 bool muted; | 803 bool muted; |
| 804 EXPECT_EQ(0, acm_b_->PlayoutData10Ms(out_freq_hz_b, &audio_frame, &muted)); | 804 EXPECT_EQ(0, acm_b_->PlayoutData10Ms(out_freq_hz_b, &audio_frame, &muted)); |
| 805 ASSERT_FALSE(muted); | 805 ASSERT_FALSE(muted); |
| 806 | 806 |
| 807 // Write output speech to file | 807 // Write output speech to file |
| 808 out_file_.Write10MsData( | 808 out_file_.Write10MsData( |
| 809 audio_frame.data_, | 809 audio_frame.data(), |
| 810 audio_frame.samples_per_channel_ * audio_frame.num_channels_); | 810 audio_frame.samples_per_channel_ * audio_frame.num_channels_); |
| 811 } | 811 } |
| 812 | 812 |
| 813 EXPECT_EQ(0, error_count); | 813 EXPECT_EQ(0, error_count); |
| 814 | 814 |
| 815 // Check that packet size is in the right range for variable rate codecs, | 815 // Check that packet size is in the right range for variable rate codecs, |
| 816 // such as Opus. | 816 // such as Opus. |
| 817 if (variable_packets > 0) { | 817 if (variable_packets > 0) { |
| 818 variable_bytes /= variable_packets; | 818 variable_bytes /= variable_packets; |
| 819 EXPECT_NEAR(variable_bytes, pack_size_bytes_, 18); | 819 EXPECT_NEAR(variable_bytes, pack_size_bytes_, 18); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 845 printf("%s -> ", send_codec->plname); | 845 printf("%s -> ", send_codec->plname); |
| 846 } | 846 } |
| 847 CodecInst receive_codec; | 847 CodecInst receive_codec; |
| 848 acm_b_->ReceiveCodec(&receive_codec); | 848 acm_b_->ReceiveCodec(&receive_codec); |
| 849 if (test_mode_ != 0) { | 849 if (test_mode_ != 0) { |
| 850 printf("%s\n", receive_codec.plname); | 850 printf("%s\n", receive_codec.plname); |
| 851 } | 851 } |
| 852 } | 852 } |
| 853 | 853 |
| 854 } // namespace webrtc | 854 } // namespace webrtc |
| OLD | NEW |