| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 282 |
| 283 if (swap_stereo_channels_ && stereo_codec_) | 283 if (swap_stereo_channels_ && stereo_codec_) |
| 284 // Only bother swapping if we're using a stereo codec. | 284 // Only bother swapping if we're using a stereo codec. |
| 285 AudioFrameOperations::SwapStereoChannels(&_audioFrame); | 285 AudioFrameOperations::SwapStereoChannels(&_audioFrame); |
| 286 | 286 |
| 287 // --- Annoying typing detection (utilizes the APM/VAD decision) | 287 // --- Annoying typing detection (utilizes the APM/VAD decision) |
| 288 #if WEBRTC_VOICE_ENGINE_TYPING_DETECTION | 288 #if WEBRTC_VOICE_ENGINE_TYPING_DETECTION |
| 289 TypingDetection(keyPressed); | 289 TypingDetection(keyPressed); |
| 290 #endif | 290 #endif |
| 291 | 291 |
| 292 // --- Mute signal | |
| 293 AudioFrameOperations::Mute(&_audioFrame, _mute, _mute); | |
| 294 | |
| 295 // --- Mix with file (does not affect the mixing frequency) | 292 // --- Mix with file (does not affect the mixing frequency) |
| 296 if (_filePlaying) | 293 if (_filePlaying) |
| 297 { | 294 { |
| 298 MixOrReplaceAudioWithFile(_audioFrame.sample_rate_hz_); | 295 MixOrReplaceAudioWithFile(_audioFrame.sample_rate_hz_); |
| 299 } | 296 } |
| 300 | 297 |
| 301 // --- Record to file | 298 // --- Record to file |
| 302 bool file_recording = false; | 299 bool file_recording = false; |
| 303 { | 300 { |
| 304 rtc::CritScope cs(&_critSect); | 301 rtc::CritScope cs(&_critSect); |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 884 |
| 888 return 0; | 885 return 0; |
| 889 } | 886 } |
| 890 | 887 |
| 891 void | 888 void |
| 892 TransmitMixer::SetMixWithMicStatus(bool mix) | 889 TransmitMixer::SetMixWithMicStatus(bool mix) |
| 893 { | 890 { |
| 894 _mixFileWithMicrophone = mix; | 891 _mixFileWithMicrophone = mix; |
| 895 } | 892 } |
| 896 | 893 |
| 897 int | |
| 898 TransmitMixer::SetMute(bool enable) | |
| 899 { | |
| 900 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1), | |
| 901 "TransmitMixer::SetMute(enable=%d)", enable); | |
| 902 _mute = enable; | |
| 903 return 0; | |
| 904 } | |
| 905 | |
| 906 bool | |
| 907 TransmitMixer::Mute() const | |
| 908 { | |
| 909 return _mute; | |
| 910 } | |
| 911 | |
| 912 int8_t TransmitMixer::AudioLevel() const | 894 int8_t TransmitMixer::AudioLevel() const |
| 913 { | 895 { |
| 914 // Speech + file level [0,9] | 896 // Speech + file level [0,9] |
| 915 return _audioLevel.Level(); | 897 return _audioLevel.Level(); |
| 916 } | 898 } |
| 917 | 899 |
| 918 int16_t TransmitMixer::AudioLevelFullRange() const | 900 int16_t TransmitMixer::AudioLevelFullRange() const |
| 919 { | 901 { |
| 920 // Speech + file level [0,32767] | 902 // Speech + file level [0,32767] |
| 921 return _audioLevel.LevelFullRange(); | 903 return _audioLevel.LevelFullRange(); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 void TransmitMixer::EnableStereoChannelSwapping(bool enable) { | 1095 void TransmitMixer::EnableStereoChannelSwapping(bool enable) { |
| 1114 swap_stereo_channels_ = enable; | 1096 swap_stereo_channels_ = enable; |
| 1115 } | 1097 } |
| 1116 | 1098 |
| 1117 bool TransmitMixer::IsStereoChannelSwappingEnabled() { | 1099 bool TransmitMixer::IsStereoChannelSwappingEnabled() { |
| 1118 return swap_stereo_channels_; | 1100 return swap_stereo_channels_; |
| 1119 } | 1101 } |
| 1120 | 1102 |
| 1121 } // namespace voe | 1103 } // namespace voe |
| 1122 } // namespace webrtc | 1104 } // namespace webrtc |
| OLD | NEW |