| 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 agc_manager_->SetCaptureMuted(output_will_be_muted_); | 466 agc_manager_->SetCaptureMuted(output_will_be_muted_); |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 | 469 |
| 470 bool AudioProcessingImpl::output_will_be_muted() const { | 470 bool AudioProcessingImpl::output_will_be_muted() const { |
| 471 CriticalSectionScoped lock(crit_); | 471 CriticalSectionScoped lock(crit_); |
| 472 return output_will_be_muted_; | 472 return output_will_be_muted_; |
| 473 } | 473 } |
| 474 | 474 |
| 475 int AudioProcessingImpl::ProcessStream(const float* const* src, | 475 int AudioProcessingImpl::ProcessStream(const float* const* src, |
| 476 int samples_per_channel, | 476 size_t samples_per_channel, |
| 477 int input_sample_rate_hz, | 477 int input_sample_rate_hz, |
| 478 ChannelLayout input_layout, | 478 ChannelLayout input_layout, |
| 479 int output_sample_rate_hz, | 479 int output_sample_rate_hz, |
| 480 ChannelLayout output_layout, | 480 ChannelLayout output_layout, |
| 481 float* const* dest) { | 481 float* const* dest) { |
| 482 CriticalSectionScoped crit_scoped(crit_); | 482 CriticalSectionScoped crit_scoped(crit_); |
| 483 if (!src || !dest) { | 483 if (!src || !dest) { |
| 484 return kNullPointerError; | 484 return kNullPointerError; |
| 485 } | 485 } |
| 486 | 486 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 } | 658 } |
| 659 | 659 |
| 660 // The level estimator operates on the recombined data. | 660 // The level estimator operates on the recombined data. |
| 661 RETURN_ON_ERR(level_estimator_->ProcessStream(ca)); | 661 RETURN_ON_ERR(level_estimator_->ProcessStream(ca)); |
| 662 | 662 |
| 663 was_stream_delay_set_ = false; | 663 was_stream_delay_set_ = false; |
| 664 return kNoError; | 664 return kNoError; |
| 665 } | 665 } |
| 666 | 666 |
| 667 int AudioProcessingImpl::AnalyzeReverseStream(const float* const* data, | 667 int AudioProcessingImpl::AnalyzeReverseStream(const float* const* data, |
| 668 int samples_per_channel, | 668 size_t samples_per_channel, |
| 669 int sample_rate_hz, | 669 int sample_rate_hz, |
| 670 ChannelLayout layout) { | 670 ChannelLayout layout) { |
| 671 CriticalSectionScoped crit_scoped(crit_); | 671 CriticalSectionScoped crit_scoped(crit_); |
| 672 if (data == NULL) { | 672 if (data == NULL) { |
| 673 return kNullPointerError; | 673 return kNullPointerError; |
| 674 } | 674 } |
| 675 | 675 |
| 676 const int num_channels = ChannelsFromLayout(layout); | 676 const int num_channels = ChannelsFromLayout(layout); |
| 677 RETURN_ON_ERR(MaybeInitializeLocked(fwd_in_format_.rate(), | 677 RETURN_ON_ERR(MaybeInitializeLocked(fwd_in_format_.rate(), |
| 678 fwd_out_format_.rate(), | 678 fwd_out_format_.rate(), |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 int err = WriteMessageToDebugFile(); | 1106 int err = WriteMessageToDebugFile(); |
| 1107 if (err != kNoError) { | 1107 if (err != kNoError) { |
| 1108 return err; | 1108 return err; |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 return kNoError; | 1111 return kNoError; |
| 1112 } | 1112 } |
| 1113 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1113 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1114 | 1114 |
| 1115 } // namespace webrtc | 1115 } // namespace webrtc |
| OLD | NEW |