| 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 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1155 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1156 if (debug_dump_.debug_file->is_open()) { | 1156 if (debug_dump_.debug_file->is_open()) { |
| 1157 RETURN_ON_ERR(WriteConfigMessage(false)); | 1157 RETURN_ON_ERR(WriteConfigMessage(false)); |
| 1158 | 1158 |
| 1159 debug_dump_.capture.event_msg->set_type(audioproc::Event::STREAM); | 1159 debug_dump_.capture.event_msg->set_type(audioproc::Event::STREAM); |
| 1160 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); | 1160 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); |
| 1161 const size_t data_size = | 1161 const size_t data_size = |
| 1162 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; | 1162 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; |
| 1163 msg->set_input_data(frame->data_, data_size); | 1163 msg->set_input_data(frame->data(), data_size); |
| 1164 } | 1164 } |
| 1165 #endif | 1165 #endif |
| 1166 | 1166 |
| 1167 capture_.capture_audio->DeinterleaveFrom(frame); | 1167 capture_.capture_audio->DeinterleaveFrom(frame); |
| 1168 RETURN_ON_ERR(ProcessCaptureStreamLocked()); | 1168 RETURN_ON_ERR(ProcessCaptureStreamLocked()); |
| 1169 capture_.capture_audio->InterleaveTo( | 1169 capture_.capture_audio->InterleaveTo( |
| 1170 frame, submodule_states_.CaptureMultiBandProcessingActive() || | 1170 frame, submodule_states_.CaptureMultiBandProcessingActive() || |
| 1171 submodule_states_.CaptureFullBandProcessingActive()); | 1171 submodule_states_.CaptureFullBandProcessingActive()); |
| 1172 | 1172 |
| 1173 if (aec_dump_) { | 1173 if (aec_dump_) { |
| 1174 RecordProcessedCaptureStream(*frame); | 1174 RecordProcessedCaptureStream(*frame); |
| 1175 } | 1175 } |
| 1176 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1176 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1177 if (debug_dump_.debug_file->is_open()) { | 1177 if (debug_dump_.debug_file->is_open()) { |
| 1178 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); | 1178 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); |
| 1179 const size_t data_size = | 1179 const size_t data_size = |
| 1180 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; | 1180 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; |
| 1181 msg->set_output_data(frame->data_, data_size); | 1181 msg->set_output_data(frame->data(), data_size); |
| 1182 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1182 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
| 1183 &debug_dump_.num_bytes_left_for_log_, | 1183 &debug_dump_.num_bytes_left_for_log_, |
| 1184 &crit_debug_, &debug_dump_.capture)); | 1184 &crit_debug_, &debug_dump_.capture)); |
| 1185 } | 1185 } |
| 1186 #endif | 1186 #endif |
| 1187 | 1187 |
| 1188 return kNoError; | 1188 return kNoError; |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 int AudioProcessingImpl::ProcessCaptureStreamLocked() { | 1191 int AudioProcessingImpl::ProcessCaptureStreamLocked() { |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1507 return kBadDataLengthError; | 1507 return kBadDataLengthError; |
| 1508 } | 1508 } |
| 1509 | 1509 |
| 1510 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1510 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1511 if (debug_dump_.debug_file->is_open()) { | 1511 if (debug_dump_.debug_file->is_open()) { |
| 1512 debug_dump_.render.event_msg->set_type(audioproc::Event::REVERSE_STREAM); | 1512 debug_dump_.render.event_msg->set_type(audioproc::Event::REVERSE_STREAM); |
| 1513 audioproc::ReverseStream* msg = | 1513 audioproc::ReverseStream* msg = |
| 1514 debug_dump_.render.event_msg->mutable_reverse_stream(); | 1514 debug_dump_.render.event_msg->mutable_reverse_stream(); |
| 1515 const size_t data_size = | 1515 const size_t data_size = |
| 1516 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; | 1516 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; |
| 1517 msg->set_data(frame->data_, data_size); | 1517 msg->set_data(frame->data(), data_size); |
| 1518 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1518 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
| 1519 &debug_dump_.num_bytes_left_for_log_, | 1519 &debug_dump_.num_bytes_left_for_log_, |
| 1520 &crit_debug_, &debug_dump_.render)); | 1520 &crit_debug_, &debug_dump_.render)); |
| 1521 } | 1521 } |
| 1522 #endif | 1522 #endif |
| 1523 if (aec_dump_) { | 1523 if (aec_dump_) { |
| 1524 aec_dump_->WriteRenderStreamMessage(*frame); | 1524 aec_dump_->WriteRenderStreamMessage(*frame); |
| 1525 } | 1525 } |
| 1526 | 1526 |
| 1527 render_.render_audio->DeinterleaveFrom(frame); | 1527 render_.render_audio->DeinterleaveFrom(frame); |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2255 previous_agc_level(0), | 2255 previous_agc_level(0), |
| 2256 echo_path_gain_change(false) {} | 2256 echo_path_gain_change(false) {} |
| 2257 | 2257 |
| 2258 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 2258 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
| 2259 | 2259 |
| 2260 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 2260 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
| 2261 | 2261 |
| 2262 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 2262 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
| 2263 | 2263 |
| 2264 } // namespace webrtc | 2264 } // namespace webrtc |
| OLD | NEW |