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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 } | 816 } |
817 | 817 |
818 void ApmTest::TestChangingReverseChannels( | 818 void ApmTest::TestChangingReverseChannels( |
819 int num_rev_channels, | 819 int num_rev_channels, |
820 AudioProcessing::Error expected_return) { | 820 AudioProcessing::Error expected_return) { |
821 const ProcessingConfig processing_config = { | 821 const ProcessingConfig processing_config = { |
822 {{ frame_->sample_rate_hz_, apm_->num_input_channels() }, | 822 {{ frame_->sample_rate_hz_, apm_->num_input_channels() }, |
823 { output_sample_rate_hz_, apm_->num_output_channels() }, | 823 { output_sample_rate_hz_, apm_->num_output_channels() }, |
824 { frame_->sample_rate_hz_, num_rev_channels }}}; | 824 { frame_->sample_rate_hz_, num_rev_channels }}}; |
825 | 825 |
826 EXPECT_EQ(expected_return, | 826 EXPECT_EQ( |
827 apm_->AnalyzeReverseStream(float_cb_->channels(), | 827 expected_return, |
828 processing_config.reverse_stream())); | 828 apm_->ProcessReverseStream( |
| 829 float_cb_->channels(), processing_config.reverse_input_stream(), |
| 830 processing_config.reverse_output_stream(), float_cb_->channels())); |
829 } | 831 } |
830 | 832 |
831 TEST_F(ApmTest, ChannelsInt16Interface) { | 833 TEST_F(ApmTest, ChannelsInt16Interface) { |
832 // Testing number of invalid and valid channels. | 834 // Testing number of invalid and valid channels. |
833 Init(16000, 16000, 16000, 4, 4, 4, false); | 835 Init(16000, 16000, 16000, 4, 4, 4, false); |
834 | 836 |
835 TestChangingChannelsInt16Interface(0, apm_->kBadNumberChannelsError); | 837 TestChangingChannelsInt16Interface(0, apm_->kBadNumberChannelsError); |
836 | 838 |
837 for (int i = 1; i < 4; i++) { | 839 for (int i = 1; i < 4; i++) { |
838 TestChangingChannelsInt16Interface(i, kNoErr); | 840 TestChangingChannelsInt16Interface(i, kNoErr); |
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2674 std::tr1::make_tuple(16000, 16000, 32000, 40), | 2676 std::tr1::make_tuple(16000, 16000, 32000, 40), |
2675 std::tr1::make_tuple(16000, 16000, 16000, 0))); | 2677 std::tr1::make_tuple(16000, 16000, 16000, 0))); |
2676 #endif | 2678 #endif |
2677 | 2679 |
2678 // TODO(henrike): re-implement functionality lost when removing the old main | 2680 // TODO(henrike): re-implement functionality lost when removing the old main |
2679 // function. See | 2681 // function. See |
2680 // https://code.google.com/p/webrtc/issues/detail?id=1981 | 2682 // https://code.google.com/p/webrtc/issues/detail?id=1981 |
2681 | 2683 |
2682 } // namespace | 2684 } // namespace |
2683 } // namespace webrtc | 2685 } // namespace webrtc |
OLD | NEW |