| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 #if defined(OPUS_FIXED_POINT) | 177 #if defined(OPUS_FIXED_POINT) |
| 178 const int16_t kDtxBoundForSilence = 20; | 178 const int16_t kDtxBoundForSilence = 20; |
| 179 #else | 179 #else |
| 180 const int16_t kDtxBoundForSilence = 2; | 180 const int16_t kDtxBoundForSilence = 2; |
| 181 #endif | 181 #endif |
| 182 | 182 |
| 183 OutputTest test(-kDtxBoundForSilence, kDtxBoundForSilence); | 183 OutputTest test(-kDtxBoundForSilence, kDtxBoundForSilence); |
| 184 Random random(1234ull); | 184 Random random(1234ull); |
| 185 | 185 |
| 186 uint32_t start_time = rtc::Time(); | 186 int64_t start_time = rtc::TimeMillis(); |
| 187 test.Start(); | 187 test.Start(); |
| 188 while (rtc::TimeSince(start_time) < kRuntimeMs) { | 188 while (rtc::TimeSince(start_time) < kRuntimeMs) { |
| 189 webrtc::SleepMs(random.Rand(kUnmuteTimeMs - kUnmuteTimeMs / 10, | 189 webrtc::SleepMs(random.Rand(kUnmuteTimeMs - kUnmuteTimeMs / 10, |
| 190 kUnmuteTimeMs + kUnmuteTimeMs / 10)); | 190 kUnmuteTimeMs + kUnmuteTimeMs / 10)); |
| 191 test.Mute(); | 191 test.Mute(); |
| 192 webrtc::SleepMs(kCheckAfterMute); | 192 webrtc::SleepMs(kCheckAfterMute); |
| 193 test.EnableOutputCheck(); | 193 test.EnableOutputCheck(); |
| 194 webrtc::SleepMs(random.Rand(kCheckTimeMs - kCheckTimeMs / 10, | 194 webrtc::SleepMs(random.Rand(kCheckTimeMs - kCheckTimeMs / 10, |
| 195 kCheckTimeMs + kCheckTimeMs / 10)); | 195 kCheckTimeMs + kCheckTimeMs / 10)); |
| 196 test.DisableOutputCheck(); | 196 test.DisableOutputCheck(); |
| 197 test.SetBitRate(random.Rand(kMinOpusRate, kMaxOpusRate)); | 197 test.SetBitRate(random.Rand(kMinOpusRate, kMaxOpusRate)); |
| 198 test.Unmute(); | 198 test.Unmute(); |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace voetest | 202 } // namespace voetest |
| OLD | NEW |