Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Unified Diff: webrtc/voice_engine/channel.cc

Issue 1987143003: Enable muted state by default in VoE (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@muted-connect-voe-mix
Patch Set: Fixing an error with file playing Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index abc843aef316205e74fca5fb4b4f4b1ffd29c49b..c2b95420537f4763893d1d5cea4d188240e9d527 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -496,7 +496,13 @@ MixerParticipant::AudioFrameInfo Channel::GetAudioFrameWithMuted(
// irrelevant.
return MixerParticipant::AudioFrameInfo::kError;
}
- RTC_DCHECK(!muted);
+
+ if (muted) {
+ // TODO(henrik.lundin): We should be able to do better than this. But we
+ // will have to go through all the cases below where the audio samples may
+ // be used, and handle the muted case in some way.
+ audioFrame->Mute();
+ }
if (_RxVadDetection) {
UpdateRxVadDetection(*audioFrame);
@@ -567,6 +573,7 @@ MixerParticipant::AudioFrameInfo Channel::GetAudioFrameWithMuted(
// Mix decoded PCM output with file if file mixing is enabled
if (state.output_file_playing) {
MixAudioWithFile(*audioFrame, audioFrame->sample_rate_hz_);
+ muted = false; // We may have added non-zero samples.
}
// External media
@@ -591,6 +598,7 @@ MixerParticipant::AudioFrameInfo Channel::GetAudioFrameWithMuted(
}
// Measure audio level (0-9)
+ // TODO(henrik.lundin) Use the |muted| information here too.
_outputAudioLevel.ComputeLevel(*audioFrame);
if (capture_start_rtp_time_stamp_ < 0 && audioFrame->timestamp_ != 0) {
@@ -816,7 +824,7 @@ Channel::Channel(int32_t channelId,
}
acm_config.neteq_config.enable_fast_accelerate =
config.Get<NetEqFastAccelerate>().enabled;
- acm_config.neteq_config.enable_muted_state = false;
+ acm_config.neteq_config.enable_muted_state = true;
audio_coding_.reset(AudioCodingModule::Create(acm_config));
_outputAudioLevel.Clear();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698