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

Unified Diff: webrtc/common_audio/vad/vad_sp.c

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 4 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
« no previous file with comments | « webrtc/common_audio/vad/vad_sp.h ('k') | webrtc/common_audio/vad/vad_sp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/vad/vad_sp.c
diff --git a/webrtc/common_audio/vad/vad_sp.c b/webrtc/common_audio/vad/vad_sp.c
index 217ef26566f19c94044a13c65ac6e328eaed46bb..a54be17daacae5eaf97ec09db0c71efc7d8e31e9 100644
--- a/webrtc/common_audio/vad/vad_sp.c
+++ b/webrtc/common_audio/vad/vad_sp.c
@@ -27,12 +27,13 @@ static const int16_t kSmoothingUp = 32439; // 0.99 in Q15.
void WebRtcVad_Downsampling(const int16_t* signal_in,
int16_t* signal_out,
int32_t* filter_state,
- int in_length) {
+ size_t in_length) {
int16_t tmp16_1 = 0, tmp16_2 = 0;
int32_t tmp32_1 = filter_state[0];
int32_t tmp32_2 = filter_state[1];
- int n = 0;
- int half_length = (in_length >> 1); // Downsampling by 2 gives half length.
+ size_t n = 0;
+ // Downsampling by 2 gives half length.
+ size_t half_length = (in_length >> 1);
// Filter coefficients in Q13, filter state in Q0.
for (n = 0; n < half_length; n++) {
« no previous file with comments | « webrtc/common_audio/vad/vad_sp.h ('k') | webrtc/common_audio/vad/vad_sp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698