AudioDecoder: Remove the default implementation of SampleRateHz

And implement SampleRateHz in a bunch of mocks.

BUG=webrtc:5801
NOTRY=true

Review-Url: https://codereview.webrtc.org/2029543002
Cr-Commit-Position: refs/heads/master@{#13161}
This commit is contained in:
kwiberg
2016-06-16 01:59:09 -07:00
committed by Commit bot
parent 371b43b86a
commit 347d35129e
6 changed files with 34 additions and 26 deletions

View File

@ -82,10 +82,6 @@ bool AudioDecoder::PacketHasFec(const uint8_t* encoded,
return false;
}
int AudioDecoder::SampleRateHz() const {
return -1;
}
AudioDecoder::SpeechType AudioDecoder::ConvertSpeechType(int16_t type) {
switch (type) {
case 0: // TODO(hlundin): Both iSAC and Opus return 0 for speech.

View File

@ -95,12 +95,7 @@ class AudioDecoder {
// 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
// override it with something that returns a correct value!
// TODO(kwiberg): Remove the default implementation.
virtual int SampleRateHz() const;
virtual int SampleRateHz() const = 0;
// The number of channels in the decoder's output. This value may not change
// during the lifetime of the decoder.