Opus wrapper: Use const for inputs and uint8[] for byte streams

About half of the functions already followed the desired pattern; this
patch fixes the other half.

BUG=909
R=aluebs@webrtc.org, bjornv@webrtc.org, henrik.lundin@webrtc.org, minyue@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7409 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kwiberg@webrtc.org
2014-10-09 11:21:10 +00:00
parent 1bada48401
commit 4bd2db9a55
3 changed files with 41 additions and 44 deletions

View File

@ -42,8 +42,11 @@ int16_t WebRtcOpus_EncoderFree(OpusEncInst* inst);
* Return value : >0 - Length (in bytes) of coded data
* -1 - Error
*/
int16_t WebRtcOpus_Encode(OpusEncInst* inst, int16_t* audio_in, int16_t samples,
int16_t length_encoded_buffer, uint8_t* encoded);
int16_t WebRtcOpus_Encode(OpusEncInst* inst,
const int16_t* audio_in,
int16_t samples,
int16_t length_encoded_buffer,
uint8_t* encoded);
/****************************************************************************
* WebRtcOpus_SetBitRate(...)
@ -190,10 +193,10 @@ int16_t WebRtcOpus_DecoderInitSlave(OpusDecInst* inst);
int16_t WebRtcOpus_DecodeNew(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type);
int16_t WebRtcOpus_Decode(OpusDecInst* inst, const int16_t* encoded,
int16_t WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type);
int16_t WebRtcOpus_DecodeSlave(OpusDecInst* inst, const int16_t* encoded,
int16_t WebRtcOpus_DecodeSlave(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type);