G711: Make input arrays const and use uint8_t[] for byte arrays
BUG=909 R=henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/39809004 Cr-Commit-Position: refs/heads/master@{#8294} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8294 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -41,9 +41,8 @@ namespace webrtc {
|
||||
int AudioDecoderPcmU::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 = WebRtcG711_DecodeU(
|
||||
reinterpret_cast<int16_t*>(const_cast<uint8_t*>(encoded)),
|
||||
static_cast<int16_t>(encoded_len), decoded, &temp_type);
|
||||
int16_t ret = WebRtcG711_DecodeU(encoded, static_cast<int16_t>(encoded_len),
|
||||
decoded, &temp_type);
|
||||
*speech_type = ConvertSpeechType(temp_type);
|
||||
return ret;
|
||||
}
|
||||
@ -58,9 +57,8 @@ int AudioDecoderPcmU::PacketDuration(const uint8_t* encoded,
|
||||
int AudioDecoderPcmA::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 = WebRtcG711_DecodeA(
|
||||
reinterpret_cast<int16_t*>(const_cast<uint8_t*>(encoded)),
|
||||
static_cast<int16_t>(encoded_len), decoded, &temp_type);
|
||||
int16_t ret = WebRtcG711_DecodeA(encoded, static_cast<int16_t>(encoded_len),
|
||||
decoded, &temp_type);
|
||||
*speech_type = ConvertSpeechType(temp_type);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user