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

Unified Diff: webrtc/modules/utility/source/coder.cc

Issue 1985743002: Propagate muted parameter to VoE::Channel (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Resurrect the PlayoutData10Ms(int, AudioFrame*) method 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 | « webrtc/modules/audio_coding/test/target_delay_unittest.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/utility/source/coder.cc
diff --git a/webrtc/modules/utility/source/coder.cc b/webrtc/modules/utility/source/coder.cc
index 9e43ca8df7629039cc24c45c4321b50c4fc18d62..3c065e7c2be29e40702e7284ccc64e7c05a3c73f 100644
--- a/webrtc/modules/utility/source/coder.cc
+++ b/webrtc/modules/utility/source/coder.cc
@@ -13,9 +13,18 @@
#include "webrtc/modules/utility/source/coder.h"
namespace webrtc {
+namespace {
+AudioCodingModule::Config GetAcmConfig(uint32_t id) {
+ AudioCodingModule::Config config;
+ // This class does not handle muted output.
+ config.neteq_config.enable_muted_state = false;
+ config.id = id;
+ return config;
+}
+} // namespace
AudioCoder::AudioCoder(uint32_t instance_id)
- : acm_(AudioCodingModule::Create(instance_id)),
+ : acm_(AudioCodingModule::Create(GetAcmConfig(instance_id))),
receive_codec_(),
encode_timestamp_(0),
encoded_data_(nullptr),
@@ -54,12 +63,19 @@ int32_t AudioCoder::Decode(AudioFrame& decoded_audio,
return -1;
}
}
- return acm_->PlayoutData10Ms((uint16_t)samp_freq_hz, &decoded_audio);
+ bool muted;
+ int32_t ret =
+ acm_->PlayoutData10Ms((uint16_t)samp_freq_hz, &decoded_audio, &muted);
+ RTC_DCHECK(!muted);
+ return ret;
}
int32_t AudioCoder::PlayoutData(AudioFrame& decoded_audio,
uint16_t& samp_freq_hz) {
- return acm_->PlayoutData10Ms(samp_freq_hz, &decoded_audio);
+ bool muted;
+ int32_t ret = acm_->PlayoutData10Ms(samp_freq_hz, &decoded_audio, &muted);
+ RTC_DCHECK(!muted);
+ return ret;
}
int32_t AudioCoder::Encode(const AudioFrame& audio,
« no previous file with comments | « webrtc/modules/audio_coding/test/target_delay_unittest.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698