| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Prepare the object to do extra expansion during merge operation following | 55 // Prepare the object to do extra expansion during merge operation following |
| 56 // a period of expands. | 56 // a period of expands. |
| 57 virtual void SetParametersForMergeAfterExpand(); | 57 virtual void SetParametersForMergeAfterExpand(); |
| 58 | 58 |
| 59 // Returns the mute factor for |channel|. | 59 // Returns the mute factor for |channel|. |
| 60 int16_t MuteFactor(size_t channel) { | 60 int16_t MuteFactor(size_t channel) { |
| 61 assert(channel < num_channels_); | 61 assert(channel < num_channels_); |
| 62 return channel_parameters_[channel].mute_factor; | 62 return channel_parameters_[channel].mute_factor; |
| 63 } | 63 } |
| 64 | 64 |
| 65 // Returns true if expansion has been faded down to zero amplitude (for all |
| 66 // channels); false otherwise. |
| 67 bool Muted() const; |
| 68 |
| 65 // Accessors and mutators. | 69 // Accessors and mutators. |
| 66 virtual size_t overlap_length() const; | 70 virtual size_t overlap_length() const; |
| 67 size_t max_lag() const { return max_lag_; } | 71 size_t max_lag() const { return max_lag_; } |
| 68 | 72 |
| 69 protected: | 73 protected: |
| 70 static const int kMaxConsecutiveExpands = 200; | 74 static const int kMaxConsecutiveExpands = 200; |
| 71 void GenerateRandomVector(int16_t seed_increment, | 75 void GenerateRandomVector(int16_t seed_increment, |
| 72 size_t length, | 76 size_t length, |
| 73 int16_t* random_vector); | 77 int16_t* random_vector); |
| 74 | 78 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 virtual Expand* Create(BackgroundNoise* background_noise, | 152 virtual Expand* Create(BackgroundNoise* background_noise, |
| 149 SyncBuffer* sync_buffer, | 153 SyncBuffer* sync_buffer, |
| 150 RandomVector* random_vector, | 154 RandomVector* random_vector, |
| 151 StatisticsCalculator* statistics, | 155 StatisticsCalculator* statistics, |
| 152 int fs, | 156 int fs, |
| 153 size_t num_channels) const; | 157 size_t num_channels) const; |
| 154 }; | 158 }; |
| 155 | 159 |
| 156 } // namespace webrtc | 160 } // namespace webrtc |
| 157 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_EXPAND_H_ | 161 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_EXPAND_H_ |
| OLD | NEW |