pcm16b: Make input arrays const and use uint8_t[] for byte arrays

There were both uint8 and uint16 versions of the pcm16b encode and
decode functions; this patch removes the latter.

BUG=909
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8309}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8309 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kwiberg@webrtc.org
2015-02-10 09:18:28 +00:00
parent 948d61724c
commit 648f5d6dc7
8 changed files with 40 additions and 153 deletions

View File

@ -75,11 +75,9 @@ AudioDecoderPcm16B::AudioDecoderPcm16B() {}
int AudioDecoderPcm16B::Decode(const uint8_t* encoded, size_t encoded_len,
int16_t* decoded, SpeechType* speech_type) {
int16_t temp_type = 1; // Default is speech.
int16_t ret = WebRtcPcm16b_DecodeW16(
reinterpret_cast<int16_t*>(const_cast<uint8_t*>(encoded)),
static_cast<int16_t>(encoded_len), decoded, &temp_type);
*speech_type = ConvertSpeechType(temp_type);
int16_t ret =
WebRtcPcm16b_Decode(encoded, static_cast<int16_t>(encoded_len), decoded);
*speech_type = ConvertSpeechType(1);
return ret;
}