| Index: webrtc/common_audio/include/audio_util.h
|
| diff --git a/webrtc/common_audio/include/audio_util.h b/webrtc/common_audio/include/audio_util.h
|
| index 99771dd6003497b143bfad561b2ec1690eb3565a..d8e1ce378e4007b09dbbbacc7cdf0e5ae96e92fd 100644
|
| --- a/webrtc/common_audio/include/audio_util.h
|
| +++ b/webrtc/common_audio/include/audio_util.h
|
| @@ -86,13 +86,13 @@ void CopyAudioIfNeeded(const T* const* src,
|
| // per buffer).
|
| template <typename T>
|
| void Deinterleave(const T* interleaved,
|
| - int samples_per_channel,
|
| + size_t samples_per_channel,
|
| int num_channels,
|
| T* const* deinterleaved) {
|
| for (int i = 0; i < num_channels; ++i) {
|
| T* channel = deinterleaved[i];
|
| int interleaved_idx = i;
|
| - for (int j = 0; j < samples_per_channel; ++j) {
|
| + for (size_t j = 0; j < samples_per_channel; ++j) {
|
| channel[j] = interleaved[interleaved_idx];
|
| interleaved_idx += num_channels;
|
| }
|
| @@ -104,13 +104,13 @@ void Deinterleave(const T* interleaved,
|
| // (|samples_per_channel| * |num_channels|).
|
| template <typename T>
|
| void Interleave(const T* const* deinterleaved,
|
| - int samples_per_channel,
|
| + size_t samples_per_channel,
|
| int num_channels,
|
| T* interleaved) {
|
| for (int i = 0; i < num_channels; ++i) {
|
| const T* channel = deinterleaved[i];
|
| int interleaved_idx = i;
|
| - for (int j = 0; j < samples_per_channel; ++j) {
|
| + for (size_t j = 0; j < samples_per_channel; ++j) {
|
| interleaved[interleaved_idx] = channel[j];
|
| interleaved_idx += num_channels;
|
| }
|
| @@ -135,10 +135,10 @@ void UpmixMonoToInterleaved(const T* mono,
|
|
|
| template <typename T, typename Intermediate>
|
| void DownmixToMono(const T* const* input_channels,
|
| - int num_frames,
|
| + size_t num_frames,
|
| int num_channels,
|
| T* out) {
|
| - for (int i = 0; i < num_frames; ++i) {
|
| + for (size_t i = 0; i < num_frames; ++i) {
|
| Intermediate value = input_channels[0][i];
|
| for (int j = 1; j < num_channels; ++j) {
|
| value += input_channels[j][i];
|
| @@ -151,11 +151,11 @@ void DownmixToMono(const T* const* input_channels,
|
| // all channels.
|
| template <typename T, typename Intermediate>
|
| void DownmixInterleavedToMonoImpl(const T* interleaved,
|
| - int num_frames,
|
| + size_t num_frames,
|
| int num_channels,
|
| T* deinterleaved) {
|
| DCHECK_GT(num_channels, 0);
|
| - DCHECK_GT(num_frames, 0);
|
| + DCHECK_GT(num_frames, 0u);
|
|
|
| const T* const end = interleaved + num_frames * num_channels;
|
|
|
| @@ -173,13 +173,13 @@ void DownmixInterleavedToMonoImpl(const T* interleaved,
|
|
|
| template <typename T>
|
| void DownmixInterleavedToMono(const T* interleaved,
|
| - int num_frames,
|
| + size_t num_frames,
|
| int num_channels,
|
| T* deinterleaved);
|
|
|
| template <>
|
| void DownmixInterleavedToMono<int16_t>(const int16_t* interleaved,
|
| - int num_frames,
|
| + size_t num_frames,
|
| int num_channels,
|
| int16_t* deinterleaved);
|
|
|
|
|