Chromium Code Reviews

Unified Diff: webrtc/modules/audio_coding/codecs/audio_decoder.h

Issue 2029273003: AudioDecoder: Document that the sample rate and number of channels is constant (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/codecs/audio_decoder.h
diff --git a/webrtc/modules/audio_coding/codecs/audio_decoder.h b/webrtc/modules/audio_coding/codecs/audio_decoder.h
index c77a069fc3799274365013e4305b1bf90695f6c9..7b7047f7de6d2eb34ab2835e49089760b9d0b5ef 100644
--- a/webrtc/modules/audio_coding/codecs/audio_decoder.h
+++ b/webrtc/modules/audio_coding/codecs/audio_decoder.h
@@ -93,7 +93,8 @@ class AudioDecoder {
// Returns true if the packet has FEC and false otherwise.
virtual bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const;
- // Returns the actual sample rate of the decoder's output.
+ // Returns the actual sample rate of the decoder's output. This value may not
+ // change during the lifetime of the decoder.
// NOTE: For now, this has a default implementation that returns an unusable
// value (-1). That default implementation will go away soon, and at the same
// time callers will start relying on the return value, so make sure you
@@ -101,6 +102,8 @@ class AudioDecoder {
// TODO(kwiberg): Remove the default implementation.
virtual int SampleRateHz() const;
+ // The number of channels in the decoder's output. This value may not change
+ // during the lifetime of the decoder.
virtual size_t Channels() const = 0;
protected:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine