Chromium Code Reviews| 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..3e9383df05ceeb5d104f6d0be59fdd1094474cf0 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. |
| + RTC_DCHECK(!config.neteq_config.enable_fast_accelerate); |
|
minyue-webrtc
2016/05/17 02:20:57
fast_accelerate or muted states?
why not setting
hlundin-webrtc
2016/05/17 07:18:43
Excellent point. And thanks for finding the error.
|
| + 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, |