OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 fwd_frame_.num_channels_, | 82 fwd_frame_.num_channels_, |
83 msg.input_data().size()); | 83 msg.input_data().size()); |
84 memcpy(fwd_frame_.data_, msg.input_data().data(), msg.input_data().size()); | 84 memcpy(fwd_frame_.data_, msg.input_data().data(), msg.input_data().size()); |
85 } else { | 85 } else { |
86 // Float interface processing. | 86 // Float interface processing. |
87 // Verify interface invariance. | 87 // Verify interface invariance. |
88 RTC_CHECK(interface_used_ == InterfaceType::kFloatInterface || | 88 RTC_CHECK(interface_used_ == InterfaceType::kFloatInterface || |
89 interface_used_ == InterfaceType::kNotSpecified); | 89 interface_used_ == InterfaceType::kNotSpecified); |
90 interface_used_ = InterfaceType::kFloatInterface; | 90 interface_used_ = InterfaceType::kFloatInterface; |
91 | 91 |
92 RTC_CHECK_EQ(in_buf_->num_channels(), | 92 // RTC_CHECK_EQ(in_buf_->num_channels(), |
93 static_cast<size_t>(msg.input_channel_size())); | 93 // static_cast<size_t>(msg.input_channel_size())); |
94 | 94 |
95 // Populate input buffer. | 95 // Populate input buffer. |
96 for (int i = 0; i < msg.input_channel_size(); ++i) { | 96 for (size_t i = 0; i < in_buf_->num_channels(); ++i) { |
97 RTC_CHECK_EQ(in_buf_->num_frames() * sizeof(*in_buf_->channels()[i]), | 97 RTC_CHECK_EQ(in_buf_->num_frames() * sizeof(*in_buf_->channels()[i]), |
98 msg.input_channel(i).size()); | 98 msg.input_channel(i).size()); |
99 std::memcpy(in_buf_->channels()[i], msg.input_channel(i).data(), | 99 std::memcpy(in_buf_->channels()[i], msg.input_channel(i).data(), |
100 msg.input_channel(i).size()); | 100 msg.input_channel(i).size()); |
aleloi
2017/04/04 12:18:50
Here we read from msg.input_channel(i) index i for
peah-webrtc
2017/04/04 13:57:12
That was done by mistake (while analyzing a 4 chan
| |
101 } | 101 } |
102 } | 102 } |
103 | 103 |
104 if (artificial_nearend_buffer_reader_) { | 104 if (artificial_nearend_buffer_reader_) { |
105 if (artificial_nearend_buffer_reader_->Read( | 105 if (artificial_nearend_buffer_reader_->Read( |
106 artificial_nearend_buf_.get())) { | 106 artificial_nearend_buf_.get())) { |
107 if (msg.has_input_data()) { | 107 if (msg.has_input_data()) { |
108 for (size_t k = 0; k < in_buf_->num_frames(); ++k) { | 108 for (size_t k = 0; k < in_buf_->num_frames(); ++k) { |
109 fwd_frame_.data_[k] = rtc::saturated_cast<int16_t>( | 109 fwd_frame_.data_[k] = rtc::saturated_cast<int16_t>( |
110 fwd_frame_.data_[k] + | 110 fwd_frame_.data_[k] + |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
574 } | 574 } |
575 | 575 |
576 void AecDumpBasedSimulator::HandleMessage( | 576 void AecDumpBasedSimulator::HandleMessage( |
577 const webrtc::audioproc::ReverseStream& msg) { | 577 const webrtc::audioproc::ReverseStream& msg) { |
578 PrepareReverseProcessStreamCall(msg); | 578 PrepareReverseProcessStreamCall(msg); |
579 ProcessReverseStream(interface_used_ == InterfaceType::kFixedInterface); | 579 ProcessReverseStream(interface_used_ == InterfaceType::kFixedInterface); |
580 } | 580 } |
581 | 581 |
582 } // namespace test | 582 } // namespace test |
583 } // namespace webrtc | 583 } // namespace webrtc |
OLD | NEW |