Set decoder output frequency in AudioDecoder::Decode call

This CL changes the way the decoder sample rate is set and updated. In
practice, it only concerns the iSAC (float) codec.

One single iSAC decoder instance is used for both wideband and
super-wideband decoding, and the instance must be told to switch
output frequency if the payload type changes. This used to be done
through a call to UpdateDecoderSampleRate, but is now instead done in
the Decode call as an extra parameter.

R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34349004

Cr-Commit-Position: refs/heads/master@{#8476}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8476 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2015-02-24 15:58:17 +00:00
parent f88791d783
commit b9c18d5643
20 changed files with 201 additions and 184 deletions

View File

@ -18,9 +18,10 @@ namespace webrtc {
int AudioDecoder::DecodeRedundant(const uint8_t* encoded,
size_t encoded_len,
int sample_rate_hz,
int16_t* decoded,
SpeechType* speech_type) {
return Decode(encoded, encoded_len, decoded, speech_type);
return Decode(encoded, encoded_len, sample_rate_hz, decoded, speech_type);
}
bool AudioDecoder::HasDecodePlc() const { return false; }