AudioDecoder: Document that the sample rate and number of channels is constant

Review-Url: https://codereview.webrtc.org/2029273003
Cr-Commit-Position: refs/heads/master@{#13012}
This commit is contained in:
kwiberg
2016-06-02 03:19:23 -07:00
committed by Commit bot
parent abe95ba323
commit f882880947

View File

@ -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: