Index: webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc |
diff --git a/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc b/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc |
index 90359a876820ffdb983b6c362563d007fa821e2f..7d07b23a3c29708101e48284815acf5c22c5b195 100644 |
--- a/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc |
+++ b/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc |
@@ -15,12 +15,15 @@ |
namespace webrtc { |
-AudioDecoderPcm16B::AudioDecoderPcm16B() {} |
+AudioDecoderPcm16B::AudioDecoderPcm16B(size_t num_channels) |
+ : num_channels_(num_channels) { |
+ RTC_DCHECK_GE(num_channels, 1u); |
+} |
void AudioDecoderPcm16B::Reset() {} |
size_t AudioDecoderPcm16B::Channels() const { |
- return 1; |
+ return num_channels_; |
} |
int AudioDecoderPcm16B::DecodeInternal(const uint8_t* encoded, |
@@ -42,13 +45,4 @@ int AudioDecoderPcm16B::PacketDuration(const uint8_t* encoded, |
return static_cast<int>(encoded_len / (2 * Channels())); |
} |
-AudioDecoderPcm16BMultiCh::AudioDecoderPcm16BMultiCh(size_t num_channels) |
- : channels_(num_channels) { |
- RTC_DCHECK(num_channels > 0); |
-} |
- |
-size_t AudioDecoderPcm16BMultiCh::Channels() const { |
- return channels_; |
-} |
- |
} // namespace webrtc |