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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 vad_->Reset(); | 160 vad_->Reset(); |
161 cng_encoder_.reset( | 161 cng_encoder_.reset( |
162 new ComfortNoiseEncoder(SampleRateHz(), sid_frame_interval_ms_, | 162 new ComfortNoiseEncoder(SampleRateHz(), sid_frame_interval_ms_, |
163 num_cng_coefficients_)); | 163 num_cng_coefficients_)); |
164 } | 164 } |
165 | 165 |
166 bool AudioEncoderCng::SetFec(bool enable) { | 166 bool AudioEncoderCng::SetFec(bool enable) { |
167 return speech_encoder_->SetFec(enable); | 167 return speech_encoder_->SetFec(enable); |
168 } | 168 } |
169 | 169 |
| 170 bool AudioEncoderCng::SetCbr(bool enable) { |
| 171 return speech_encoder_->SetCbr(enable); |
| 172 } |
| 173 |
170 bool AudioEncoderCng::SetDtx(bool enable) { | 174 bool AudioEncoderCng::SetDtx(bool enable) { |
171 return speech_encoder_->SetDtx(enable); | 175 return speech_encoder_->SetDtx(enable); |
172 } | 176 } |
173 | 177 |
174 bool AudioEncoderCng::SetApplication(Application application) { | 178 bool AudioEncoderCng::SetApplication(Application application) { |
175 return speech_encoder_->SetApplication(application); | 179 return speech_encoder_->SetApplication(application); |
176 } | 180 } |
177 | 181 |
178 void AudioEncoderCng::SetMaxPlaybackRate(int frequency_hz) { | 182 void AudioEncoderCng::SetMaxPlaybackRate(int frequency_hz) { |
179 speech_encoder_->SetMaxPlaybackRate(frequency_hz); | 183 speech_encoder_->SetMaxPlaybackRate(frequency_hz); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 } | 256 } |
253 } | 257 } |
254 return info; | 258 return info; |
255 } | 259 } |
256 | 260 |
257 size_t AudioEncoderCng::SamplesPer10msFrame() const { | 261 size_t AudioEncoderCng::SamplesPer10msFrame() const { |
258 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); | 262 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); |
259 } | 263 } |
260 | 264 |
261 } // namespace webrtc | 265 } // namespace webrtc |
OLD | NEW |