Propagate muted parameter to VoE::Channel
Deleted the temporary ACM method without the muted parameter, and had
to modify several tests for this. The muted parameter is not yet propagated to the AudioConferenceMixer; this is the next step.
BUG=webrtc:5609
TBR=perkj@webrtc.org
Review-Url: https://codereview.webrtc.org/1985743002
Cr-Commit-Position: refs/heads/master@{#12779}
diff --git a/webrtc/modules/utility/source/coder.cc b/webrtc/modules/utility/source/coder.cc
index 9e43ca8..3c065e7 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 @@
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,