| 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 |
| 11 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" | 11 #include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h" |
| 12 | 12 |
| 13 #include <algorithm> |
| 14 |
| 13 #include "webrtc/base/checks.h" | 15 #include "webrtc/base/checks.h" |
| 14 #include "webrtc/base/safe_conversions.h" | 16 #include "webrtc/base/safe_conversions.h" |
| 15 #include "webrtc/common_types.h" | 17 #include "webrtc/common_types.h" |
| 16 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" | 18 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h" |
| 17 | 19 |
| 18 namespace webrtc { | 20 namespace webrtc { |
| 19 | 21 |
| 20 namespace { | 22 namespace { |
| 21 | 23 |
| 22 const int kSampleRateHz = 48000; | 24 const int kSampleRateHz = 48000; |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 RTC_CHECK_EQ(0, WebRtcOpus_DisableDtx(inst_)); | 260 RTC_CHECK_EQ(0, WebRtcOpus_DisableDtx(inst_)); |
| 259 } | 261 } |
| 260 RTC_CHECK_EQ(0, | 262 RTC_CHECK_EQ(0, |
| 261 WebRtcOpus_SetPacketLossRate( | 263 WebRtcOpus_SetPacketLossRate( |
| 262 inst_, static_cast<int32_t>(packet_loss_rate_ * 100 + .5))); | 264 inst_, static_cast<int32_t>(packet_loss_rate_ * 100 + .5))); |
| 263 config_ = config; | 265 config_ = config; |
| 264 return true; | 266 return true; |
| 265 } | 267 } |
| 266 | 268 |
| 267 } // namespace webrtc | 269 } // namespace webrtc |
| OLD | NEW |