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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 assert(channel < num_channels_); | 59 assert(channel < num_channels_); |
60 return channel_parameters_[channel].mute_factor; | 60 return channel_parameters_[channel].mute_factor; |
61 } | 61 } |
62 | 62 |
63 // Accessors and mutators. | 63 // Accessors and mutators. |
64 virtual size_t overlap_length() const; | 64 virtual size_t overlap_length() const; |
65 int16_t max_lag() const { return max_lag_; } | 65 int16_t max_lag() const { return max_lag_; } |
66 | 66 |
67 protected: | 67 protected: |
68 static const int kMaxConsecutiveExpands = 200; | 68 static const int kMaxConsecutiveExpands = 200; |
69 void GenerateRandomVector(int seed_increment, | 69 void GenerateRandomVector(int16_t seed_increment, |
70 size_t length, | 70 size_t length, |
71 int16_t* random_vector); | 71 int16_t* random_vector); |
72 | 72 |
73 void GenerateBackgroundNoise(int16_t* random_vector, | 73 void GenerateBackgroundNoise(int16_t* random_vector, |
74 size_t channel, | 74 size_t channel, |
75 int16_t mute_slope, | 75 int16_t mute_slope, |
76 bool too_many_expands, | 76 bool too_many_expands, |
77 size_t num_noise_samples, | 77 size_t num_noise_samples, |
78 int16_t* buffer); | 78 int16_t* buffer); |
79 | 79 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 virtual Expand* Create(BackgroundNoise* background_noise, | 144 virtual Expand* Create(BackgroundNoise* background_noise, |
145 SyncBuffer* sync_buffer, | 145 SyncBuffer* sync_buffer, |
146 RandomVector* random_vector, | 146 RandomVector* random_vector, |
147 int fs, | 147 int fs, |
148 size_t num_channels) const; | 148 size_t num_channels) const; |
149 }; | 149 }; |
150 | 150 |
151 } // namespace webrtc | 151 } // namespace webrtc |
152 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_EXPAND_H_ | 152 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_EXPAND_H_ |
OLD | NEW |