Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Unified Diff: webrtc/modules/audio_coding/acm2/acm_resampler.cc

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/acm2/acm_resampler.cc
diff --git a/webrtc/modules/audio_coding/acm2/acm_resampler.cc b/webrtc/modules/audio_coding/acm2/acm_resampler.cc
index d7ceb8ac9f2991d0f0f4ba6ced1f6231cd1bf271..dfc3ef7e2746fd4d28ea62d51f058e9afb499a2f 100644
--- a/webrtc/modules/audio_coding/acm2/acm_resampler.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_resampler.cc
@@ -28,10 +28,10 @@ ACMResampler::~ACMResampler() {
int ACMResampler::Resample10Msec(const int16_t* in_audio,
int in_freq_hz,
int out_freq_hz,
- int num_audio_channels,
+ size_t num_audio_channels,
size_t out_capacity_samples,
int16_t* out_audio) {
- size_t in_length = static_cast<size_t>(in_freq_hz * num_audio_channels / 100);
+ size_t in_length = in_freq_hz * num_audio_channels / 100;
if (in_freq_hz == out_freq_hz) {
if (out_capacity_samples < in_length) {
assert(false);
@@ -56,7 +56,7 @@ int ACMResampler::Resample10Msec(const int16_t* in_audio,
return -1;
}
- return out_length / num_audio_channels;
+ return static_cast<int>(out_length / num_audio_channels);
}
} // namespace acm2
« no previous file with comments | « webrtc/modules/audio_coding/acm2/acm_resampler.h ('k') | webrtc/modules/audio_coding/acm2/audio_coding_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698