AudioDecoder: New method SampleRateHz, + implementations for our codecs

This will let NetEq (and the factory, and every layer in between) keep
track of just the decoder, instead of decoder and sample rate.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2024633002
Cr-Commit-Position: refs/heads/master@{#12968}
This commit is contained in:
kwiberg
2016-05-31 02:46:20 -07:00
committed by Commit bot
parent 946f36ef39
commit 6c2eab34f8
16 changed files with 125 additions and 27 deletions

View File

@ -82,6 +82,10 @@ 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.