| 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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1072 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1073 if (debug_dump_.debug_file->is_open()) { | 1073 if (debug_dump_.debug_file->is_open()) { |
| 1074 RETURN_ON_ERR(WriteConfigMessage(false)); | 1074 RETURN_ON_ERR(WriteConfigMessage(false)); |
| 1075 | 1075 |
| 1076 debug_dump_.capture.event_msg->set_type(audioproc::Event::STREAM); | 1076 debug_dump_.capture.event_msg->set_type(audioproc::Event::STREAM); |
| 1077 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); | 1077 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); |
| 1078 const size_t data_size = | 1078 const size_t data_size = |
| 1079 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; | 1079 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; |
| 1080 msg->set_input_data(frame->data_, data_size); | 1080 msg->set_input_data(frame->data(), data_size); |
| 1081 } | 1081 } |
| 1082 #endif | 1082 #endif |
| 1083 | 1083 |
| 1084 capture_.capture_audio->DeinterleaveFrom(frame); | 1084 capture_.capture_audio->DeinterleaveFrom(frame); |
| 1085 RETURN_ON_ERR(ProcessCaptureStreamLocked()); | 1085 RETURN_ON_ERR(ProcessCaptureStreamLocked()); |
| 1086 capture_.capture_audio->InterleaveTo( | 1086 capture_.capture_audio->InterleaveTo( |
| 1087 frame, submodule_states_.CaptureMultiBandProcessingActive()); | 1087 frame, submodule_states_.CaptureMultiBandProcessingActive()); |
| 1088 | 1088 |
| 1089 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1089 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1090 if (debug_dump_.debug_file->is_open()) { | 1090 if (debug_dump_.debug_file->is_open()) { |
| 1091 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); | 1091 audioproc::Stream* msg = debug_dump_.capture.event_msg->mutable_stream(); |
| 1092 const size_t data_size = | 1092 const size_t data_size = |
| 1093 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; | 1093 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; |
| 1094 msg->set_output_data(frame->data_, data_size); | 1094 msg->set_output_data(frame->data(), data_size); |
| 1095 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1095 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
| 1096 &debug_dump_.num_bytes_left_for_log_, | 1096 &debug_dump_.num_bytes_left_for_log_, |
| 1097 &crit_debug_, &debug_dump_.capture)); | 1097 &crit_debug_, &debug_dump_.capture)); |
| 1098 } | 1098 } |
| 1099 #endif | 1099 #endif |
| 1100 | 1100 |
| 1101 return kNoError; | 1101 return kNoError; |
| 1102 } | 1102 } |
| 1103 | 1103 |
| 1104 int AudioProcessingImpl::ProcessCaptureStreamLocked() { | 1104 int AudioProcessingImpl::ProcessCaptureStreamLocked() { |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 return kBadDataLengthError; | 1402 return kBadDataLengthError; |
| 1403 } | 1403 } |
| 1404 | 1404 |
| 1405 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 1405 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1406 if (debug_dump_.debug_file->is_open()) { | 1406 if (debug_dump_.debug_file->is_open()) { |
| 1407 debug_dump_.render.event_msg->set_type(audioproc::Event::REVERSE_STREAM); | 1407 debug_dump_.render.event_msg->set_type(audioproc::Event::REVERSE_STREAM); |
| 1408 audioproc::ReverseStream* msg = | 1408 audioproc::ReverseStream* msg = |
| 1409 debug_dump_.render.event_msg->mutable_reverse_stream(); | 1409 debug_dump_.render.event_msg->mutable_reverse_stream(); |
| 1410 const size_t data_size = | 1410 const size_t data_size = |
| 1411 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; | 1411 sizeof(int16_t) * frame->samples_per_channel_ * frame->num_channels_; |
| 1412 msg->set_data(frame->data_, data_size); | 1412 msg->set_data(frame->data(), data_size); |
| 1413 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1413 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
| 1414 &debug_dump_.num_bytes_left_for_log_, | 1414 &debug_dump_.num_bytes_left_for_log_, |
| 1415 &crit_debug_, &debug_dump_.render)); | 1415 &crit_debug_, &debug_dump_.render)); |
| 1416 } | 1416 } |
| 1417 #endif | 1417 #endif |
| 1418 render_.render_audio->DeinterleaveFrom(frame); | 1418 render_.render_audio->DeinterleaveFrom(frame); |
| 1419 RETURN_ON_ERR(ProcessRenderStreamLocked()); | 1419 RETURN_ON_ERR(ProcessRenderStreamLocked()); |
| 1420 render_.render_audio->InterleaveTo( | 1420 render_.render_audio->InterleaveTo( |
| 1421 frame, submodule_states_.RenderMultiBandProcessingActive()); | 1421 frame, submodule_states_.RenderMultiBandProcessingActive()); |
| 1422 return kNoError; | 1422 return kNoError; |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1985 capture_processing_format(kSampleRate16kHz), | 1985 capture_processing_format(kSampleRate16kHz), |
| 1986 split_rate(kSampleRate16kHz) {} | 1986 split_rate(kSampleRate16kHz) {} |
| 1987 | 1987 |
| 1988 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; | 1988 AudioProcessingImpl::ApmCaptureState::~ApmCaptureState() = default; |
| 1989 | 1989 |
| 1990 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; | 1990 AudioProcessingImpl::ApmRenderState::ApmRenderState() = default; |
| 1991 | 1991 |
| 1992 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; | 1992 AudioProcessingImpl::ApmRenderState::~ApmRenderState() = default; |
| 1993 | 1993 |
| 1994 } // namespace webrtc | 1994 } // namespace webrtc |
| OLD | NEW |