Upconvert various types to int.

Per comments from HL/kwiberg on https://webrtc-codereview.appspot.com/42569004 , when there is existing usage of mixed types (int16_t, int, etc.), we'd prefer to standardize on larger types like int and phase out use of int16_t.

Specifically, "Using int16 just because we're sure all reasonable values will fit in 16 bits isn't usually meaningful in C."

This converts some existing uses of int16_t (and, in a few cases, other types such as uint16_t) to int (or, in a few places, int32_t).  Other locations will be converted to size_t in a separate change.

BUG=none
R=andrew@webrtc.org, kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9405}
This commit is contained in:
Peter Kasting
2015-06-09 17:19:57 -07:00
parent 54b0ca553f
commit 83ad33a8ae
61 changed files with 314 additions and 314 deletions

View File

@ -78,11 +78,11 @@ int16_t WebRtcOpus_EncoderFree(OpusEncInst* inst) {
}
}
int16_t WebRtcOpus_Encode(OpusEncInst* inst,
const int16_t* audio_in,
int16_t samples,
int16_t length_encoded_buffer,
uint8_t* encoded) {
int WebRtcOpus_Encode(OpusEncInst* inst,
const int16_t* audio_in,
int16_t samples,
int16_t length_encoded_buffer,
uint8_t* encoded) {
int res;
if (samples > 48 * kWebRtcOpusMaxEncodeFrameSizeMs) {
@ -291,9 +291,9 @@ static int DecodeNative(OpusDecInst* inst, const uint8_t* encoded,
return res;
}
int16_t WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type) {
int WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type) {
int decoded_samples;
if (encoded_bytes == 0) {
@ -318,8 +318,8 @@ int16_t WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
return decoded_samples;
}
int16_t WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
int16_t number_of_lost_frames) {
int WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
int number_of_lost_frames) {
int16_t audio_type = 0;
int decoded_samples;
int plc_samples;
@ -339,9 +339,9 @@ int16_t WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
return decoded_samples;
}
int16_t WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type) {
int WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
int16_t encoded_bytes, int16_t* decoded,
int16_t* audio_type) {
int decoded_samples;
int fec_samples;