| 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 |
| 11 #include "webrtc/modules/audio_coding/neteq/normal.h" | 11 #include "webrtc/modules/audio_coding/neteq/normal.h" |
| 12 | 12 |
| 13 #include <string.h> // memset, memcpy | 13 #include <string.h> // memset, memcpy |
| 14 | 14 |
| 15 #include <algorithm> // min | 15 #include <algorithm> // min |
| 16 | 16 |
| 17 #include "webrtc/api/audio_codecs/audio_decoder.h" | 17 #include "webrtc/api/audio_codecs/audio_decoder.h" |
| 18 #include "webrtc/base/checks.h" | |
| 19 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 18 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
| 20 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" | 19 #include "webrtc/modules/audio_coding/neteq/audio_multi_vector.h" |
| 21 #include "webrtc/modules/audio_coding/neteq/background_noise.h" | 20 #include "webrtc/modules/audio_coding/neteq/background_noise.h" |
| 22 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" | 21 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" |
| 23 #include "webrtc/modules/audio_coding/neteq/expand.h" | 22 #include "webrtc/modules/audio_coding/neteq/expand.h" |
| 23 #include "webrtc/rtc_base/checks.h" |
| 24 | 24 |
| 25 namespace webrtc { | 25 namespace webrtc { |
| 26 | 26 |
| 27 int Normal::Process(const int16_t* input, | 27 int Normal::Process(const int16_t* input, |
| 28 size_t length, | 28 size_t length, |
| 29 Modes last_mode, | 29 Modes last_mode, |
| 30 int16_t* external_mute_factor_array, | 30 int16_t* external_mute_factor_array, |
| 31 AudioMultiVector* output) { | 31 AudioMultiVector* output) { |
| 32 if (length == 0) { | 32 if (length == 0) { |
| 33 // Nothing to process. | 33 // Nothing to process. |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 external_mute_factor_array[channel_ix] = static_cast<int16_t>(std::min( | 207 external_mute_factor_array[channel_ix] = static_cast<int16_t>(std::min( |
| 208 16384, external_mute_factor_array[channel_ix] + increment)); | 208 16384, external_mute_factor_array[channel_ix] + increment)); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 | 212 |
| 213 return static_cast<int>(length); | 213 return static_cast<int>(length); |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace webrtc | 216 } // namespace webrtc |
| OLD | NEW |