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:
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user