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

Unified Diff: webrtc/modules/audio_processing/high_pass_filter_impl.cc

Issue 1227213002: Update audio code to use size_t more correctly, webrtc/modules/audio_processing/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 5 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_processing/high_pass_filter_impl.cc
diff --git a/webrtc/modules/audio_processing/high_pass_filter_impl.cc b/webrtc/modules/audio_processing/high_pass_filter_impl.cc
index 588ba414159bd2a50ac34882ddc82f13b01026d5..6302f13fcf985081c2c3fdf8e63addc5dba4225e 100644
--- a/webrtc/modules/audio_processing/high_pass_filter_impl.cc
+++ b/webrtc/modules/audio_processing/high_pass_filter_impl.cc
@@ -47,7 +47,7 @@ int InitializeFilter(FilterState* hpf, int sample_rate_hz) {
return AudioProcessing::kNoError;
}
-int Filter(FilterState* hpf, int16_t* data, int length) {
+int Filter(FilterState* hpf, int16_t* data, size_t length) {
assert(hpf != NULL);
int32_t tmp_int32 = 0;
@@ -55,7 +55,7 @@ int Filter(FilterState* hpf, int16_t* data, int length) {
int16_t* x = hpf->x;
const int16_t* ba = hpf->ba;
- for (int i = 0; i < length; i++) {
+ for (size_t i = 0; i < length; i++) {
// y[i] = b[0] * x[i] + b[1] * x[i-1] + b[2] * x[i-2]
// + -a[1] * y[i-1] + -a[2] * y[i-2];
« no previous file with comments | « webrtc/modules/audio_processing/gain_control_impl.cc ('k') | webrtc/modules/audio_processing/include/audio_processing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698