Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 14 matching lines...) Expand all Loading... | |
| 25 // Detects transients in an audio stream and suppress them using a simple | 25 // Detects transients in an audio stream and suppress them using a simple |
| 26 // restoration algorithm that attenuates unexpected spikes in the spectrum. | 26 // restoration algorithm that attenuates unexpected spikes in the spectrum. |
| 27 class TransientSuppressor { | 27 class TransientSuppressor { |
| 28 public: | 28 public: |
| 29 TransientSuppressor(); | 29 TransientSuppressor(); |
| 30 ~TransientSuppressor(); | 30 ~TransientSuppressor(); |
| 31 | 31 |
| 32 int Initialize(int sample_rate_hz, int detector_rate_hz, int num_channels); | 32 int Initialize(int sample_rate_hz, int detector_rate_hz, int num_channels); |
| 33 | 33 |
| 34 // Processes a |data| chunk, and returns it with keystrokes suppressed from | 34 // Processes a |data| chunk, and returns it with keystrokes suppressed from |
| 35 // it. The float format is assumed to be int16 ranged. If there are more than | 35 // it. The float format is assumed to be int16_t ranged. If there are more |
| 36 // than | |
|
hlundin-webrtc
2015/09/22 09:57:31
Malformed comment; 'than' dangling on it's own lin
| |
| 36 // one channel, the chunks are concatenated one after the other in |data|. | 37 // one channel, the chunks are concatenated one after the other in |data|. |
| 37 // |data_length| must be equal to |data_length_|. | 38 // |data_length| must be equal to |data_length_|. |
| 38 // |num_channels| must be equal to |num_channels_|. | 39 // |num_channels| must be equal to |num_channels_|. |
| 39 // A sub-band, ideally the higher, can be used as |detection_data|. If it is | 40 // A sub-band, ideally the higher, can be used as |detection_data|. If it is |
| 40 // NULL, |data| is used for the detection too. The |detection_data| is always | 41 // NULL, |data| is used for the detection too. The |detection_data| is always |
| 41 // assumed mono. | 42 // assumed mono. |
| 42 // If a reference signal (e.g. keyboard microphone) is available, it can be | 43 // If a reference signal (e.g. keyboard microphone) is available, it can be |
| 43 // passed in as |reference_data|. It is assumed mono and must have the same | 44 // passed in as |reference_data|. It is assumed mono and must have the same |
| 44 // length as |data|. NULL is accepted if unavailable. | 45 // length as |data|. NULL is accepted if unavailable. |
| 45 // This suppressor performs better if voice information is available. | 46 // This suppressor performs better if voice information is available. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 int chunks_since_voice_change_; | 112 int chunks_since_voice_change_; |
| 112 | 113 |
| 113 uint32_t seed_; | 114 uint32_t seed_; |
| 114 | 115 |
| 115 bool using_reference_; | 116 bool using_reference_; |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace webrtc | 119 } // namespace webrtc |
| 119 | 120 |
| 120 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_SUPPRESSOR_H_ | 121 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TRANSIENT_TRANSIENT_SUPPRESSOR_H_ |
| OLD | NEW |