| Index: webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc
|
| diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc b/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc
|
| index 9757b4a0100674095353e9e20e43f986a1b3aba8..af164c4bb72b0b25525b3999f3e6887390a0b802 100644
|
| --- a/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc
|
| +++ b/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc
|
| @@ -16,6 +16,10 @@ namespace webrtc {
|
|
|
| void AudioDecoderPcmU::Reset() {}
|
|
|
| +int AudioDecoderPcmU::SampleRateHz() const {
|
| + return 8000;
|
| +}
|
| +
|
| size_t AudioDecoderPcmU::Channels() const {
|
| return num_channels_;
|
| }
|
| @@ -25,7 +29,7 @@ int AudioDecoderPcmU::DecodeInternal(const uint8_t* encoded,
|
| int sample_rate_hz,
|
| int16_t* decoded,
|
| SpeechType* speech_type) {
|
| - RTC_DCHECK_EQ(sample_rate_hz, 8000);
|
| + RTC_DCHECK_EQ(SampleRateHz(), sample_rate_hz);
|
| int16_t temp_type = 1; // Default is speech.
|
| size_t ret = WebRtcG711_DecodeU(encoded, encoded_len, decoded, &temp_type);
|
| *speech_type = ConvertSpeechType(temp_type);
|
| @@ -40,6 +44,10 @@ int AudioDecoderPcmU::PacketDuration(const uint8_t* encoded,
|
|
|
| void AudioDecoderPcmA::Reset() {}
|
|
|
| +int AudioDecoderPcmA::SampleRateHz() const {
|
| + return 8000;
|
| +}
|
| +
|
| size_t AudioDecoderPcmA::Channels() const {
|
| return num_channels_;
|
| }
|
| @@ -49,7 +57,7 @@ int AudioDecoderPcmA::DecodeInternal(const uint8_t* encoded,
|
| int sample_rate_hz,
|
| int16_t* decoded,
|
| SpeechType* speech_type) {
|
| - RTC_DCHECK_EQ(sample_rate_hz, 8000);
|
| + RTC_DCHECK_EQ(SampleRateHz(), sample_rate_hz);
|
| int16_t temp_type = 1; // Default is speech.
|
| size_t ret = WebRtcG711_DecodeA(encoded, encoded_len, decoded, &temp_type);
|
| *speech_type = ConvertSpeechType(temp_type);
|
|
|