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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 | 668 |
669 float output_gain = 1.0f; | 669 float output_gain = 1.0f; |
670 { | 670 { |
671 rtc::CritScope cs(&volume_settings_critsect_); | 671 rtc::CritScope cs(&volume_settings_critsect_); |
672 output_gain = _outputGain; | 672 output_gain = _outputGain; |
673 } | 673 } |
674 | 674 |
675 // Output volume scaling | 675 // Output volume scaling |
676 if (output_gain < 0.99f || output_gain > 1.01f) { | 676 if (output_gain < 0.99f || output_gain > 1.01f) { |
677 // TODO(solenberg): Combine with mute state - this can cause clicks! | 677 // TODO(solenberg): Combine with mute state - this can cause clicks! |
678 AudioFrameOperations::ScaleWithSat(output_gain, *audioFrame); | 678 AudioFrameOperations::ScaleWithSat(output_gain, audioFrame); |
679 } | 679 } |
680 | 680 |
681 // Mix decoded PCM output with file if file mixing is enabled | 681 // Mix decoded PCM output with file if file mixing is enabled |
682 if (state.output_file_playing) { | 682 if (state.output_file_playing) { |
683 MixAudioWithFile(*audioFrame, audioFrame->sample_rate_hz_); | 683 MixAudioWithFile(*audioFrame, audioFrame->sample_rate_hz_); |
684 muted = false; // We may have added non-zero samples. | 684 muted = false; // We may have added non-zero samples. |
685 } | 685 } |
686 | 686 |
687 // Record playout if enabled | 687 // Record playout if enabled |
688 { | 688 { |
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3010 int64_t min_rtt = 0; | 3010 int64_t min_rtt = 0; |
3011 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3011 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3012 0) { | 3012 0) { |
3013 return 0; | 3013 return 0; |
3014 } | 3014 } |
3015 return rtt; | 3015 return rtt; |
3016 } | 3016 } |
3017 | 3017 |
3018 } // namespace voe | 3018 } // namespace voe |
3019 } // namespace webrtc | 3019 } // namespace webrtc |
OLD | NEW |