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

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

Issue 2024633002: AudioDecoder: New method SampleRateHz, + implementations for our codecs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add TODO fix PCM A U at 8 kHz Created 4 years, 7 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.h
diff --git a/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h b/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h
index 692cb9428219c2323e78f14a980194c7ceddd77a..df94a6a6bdd0092a1b901572238e357de2bcedae 100644
--- a/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h
+++ b/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.h
@@ -18,9 +18,10 @@ namespace webrtc {
class AudioDecoderPcm16B final : public AudioDecoder {
public:
- explicit AudioDecoderPcm16B(size_t num_channels);
+ AudioDecoderPcm16B(int sample_rate_hz, size_t num_channels);
void Reset() override;
int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override;
+ int SampleRateHz() const override;
size_t Channels() const override;
protected:
@@ -31,6 +32,7 @@ class AudioDecoderPcm16B final : public AudioDecoder {
SpeechType* speech_type) override;
private:
+ const int sample_rate_hz_;
const size_t num_channels_;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16B);
};

Powered by Google App Engine
This is Rietveld 408576698