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:
@ -108,7 +108,7 @@ int Normal::Process(const int16_t* input,
|
||||
}
|
||||
|
||||
// If muted increase by 0.64 for every 20 ms (NB/WB 0.0040/0.0020 in Q14).
|
||||
int16_t increment = 64 / fs_mult;
|
||||
int increment = static_cast<int>(64 / fs_mult);
|
||||
for (size_t i = 0; i < length_per_channel; i++) {
|
||||
// Scale with mute factor.
|
||||
assert(channel_ix < output->Channels());
|
||||
@ -174,7 +174,7 @@ int Normal::Process(const int16_t* input,
|
||||
// Previous was neither of Expand, FadeToBGN or RFC3389_CNG, but we are
|
||||
// still ramping up from previous muting.
|
||||
// If muted increase by 0.64 for every 20 ms (NB/WB 0.0040/0.0020 in Q14).
|
||||
int16_t increment = 64 / fs_mult;
|
||||
int increment = static_cast<int>(64 / fs_mult);
|
||||
size_t length_per_channel = length / output->Channels();
|
||||
for (size_t i = 0; i < length_per_channel; i++) {
|
||||
for (size_t channel_ix = 0; channel_ix < output->Channels();
|
||||
|
||||
Reference in New Issue
Block a user