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

Unified Diff: webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc

Issue 1353803002: Simple cleanups of AudioDecoder and AudioEncoder classes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@dmove-isac
Patch Set: rebase Created 5 years, 3 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
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

Powered by Google App Engine
This is Rietveld 408576698