| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 314 } |
| 315 capture_muted_ = muted; | 315 capture_muted_ = muted; |
| 316 | 316 |
| 317 if (!muted) { | 317 if (!muted) { |
| 318 // When we unmute, we should reset things to be safe. | 318 // When we unmute, we should reset things to be safe. |
| 319 check_volume_on_next_process_ = true; | 319 check_volume_on_next_process_ = true; |
| 320 } | 320 } |
| 321 } | 321 } |
| 322 | 322 |
| 323 float AgcManagerDirect::voice_probability() { | 323 float AgcManagerDirect::voice_probability() { |
| 324 return agc_->voice_probability(); | 324 return static_cast<float>(agc_->voice_probability()); |
| 325 } | 325 } |
| 326 | 326 |
| 327 int AgcManagerDirect::CheckVolumeAndReset() { | 327 int AgcManagerDirect::CheckVolumeAndReset() { |
| 328 int level = volume_callbacks_->GetMicVolume(); | 328 int level = volume_callbacks_->GetMicVolume(); |
| 329 if (level < 0) { | 329 if (level < 0) { |
| 330 return -1; | 330 return -1; |
| 331 } | 331 } |
| 332 // Reasons for taking action at startup: | 332 // Reasons for taking action at startup: |
| 333 // 1) A person starting a call is expected to be heard. | 333 // 1) A person starting a call is expected to be heard. |
| 334 // 2) Independent of interpretation of |level| == 0 we should raise it so the | 334 // 2) Independent of interpretation of |level| == 0 we should raise it so the |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 if (new_compression != compression_) { | 433 if (new_compression != compression_) { |
| 434 compression_ = new_compression; | 434 compression_ = new_compression; |
| 435 compression_accumulator_ = new_compression; | 435 compression_accumulator_ = new_compression; |
| 436 if (gctrl_->set_compression_gain_db(compression_) != 0) { | 436 if (gctrl_->set_compression_gain_db(compression_) != 0) { |
| 437 LOG_FERR1(LS_ERROR, set_compression_gain_db, compression_); | 437 LOG_FERR1(LS_ERROR, set_compression_gain_db, compression_); |
| 438 } | 438 } |
| 439 } | 439 } |
| 440 } | 440 } |
| 441 | 441 |
| 442 } // namespace webrtc | 442 } // namespace webrtc |
| OLD | NEW |