| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // Return the current target gain set. Modify this array to set the targets. | 58 // Return the current target gain set. Modify this array to set the targets. |
| 59 float* target() { return target_.data(); } | 59 float* target() { return target_.data(); } |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 const size_t num_freqs_; | 62 const size_t num_freqs_; |
| 63 const float relative_change_limit_; | 63 const float relative_change_limit_; |
| 64 std::vector<float> target_; | 64 std::vector<float> target_; |
| 65 std::vector<float> current_; | 65 std::vector<float> current_; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // Helper class to delay a signal by an integer number of samples. |
| 69 class DelayBuffer { |
| 70 public: |
| 71 DelayBuffer(size_t delay, size_t num_channels); |
| 72 |
| 73 ~DelayBuffer(); |
| 74 |
| 75 void Delay(float* const* data, size_t length); |
| 76 |
| 77 private: |
| 78 std::vector<std::vector<float>> buffer_; |
| 79 size_t read_index_; |
| 80 }; |
| 81 |
| 68 } // namespace intelligibility | 82 } // namespace intelligibility |
| 69 | 83 |
| 70 } // namespace webrtc | 84 } // namespace webrtc |
| 71 | 85 |
| 72 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS
_H_ | 86 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS
_H_ |
| OLD | NEW |