| 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 |
| 11 #include "webrtc/modules/audio_processing/level_controller/gain_applier.h" | 11 #include "webrtc/modules/audio_processing/level_controller/gain_applier.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 | 14 |
| 15 #include "webrtc/rtc_base/array_view.h" | 15 #include "webrtc/api/array_view.h" |
| 16 #include "webrtc/rtc_base/checks.h" | 16 #include "webrtc/rtc_base/checks.h" |
| 17 | 17 |
| 18 #include "webrtc/modules/audio_processing/audio_buffer.h" | 18 #include "webrtc/modules/audio_processing/audio_buffer.h" |
| 19 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" | 19 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" |
| 20 | 20 |
| 21 namespace webrtc { | 21 namespace webrtc { |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 const float kMaxSampleValue = 32767.f; | 24 const float kMaxSampleValue = 32767.f; |
| 25 const float kMinSampleValue = -32767.f; | 25 const float kMinSampleValue = -32767.f; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 LimitToAllowedRange(audio); | 151 LimitToAllowedRange(audio); |
| 152 old_gain_ = last_applied_gain; | 152 old_gain_ = last_applied_gain; |
| 153 } | 153 } |
| 154 | 154 |
| 155 data_dumper_->DumpRaw("lc_last_applied_gain", 1, &old_gain_); | 155 data_dumper_->DumpRaw("lc_last_applied_gain", 1, &old_gain_); |
| 156 | 156 |
| 157 return num_saturations; | 157 return num_saturations; |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace webrtc | 160 } // namespace webrtc |
| OLD | NEW |