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

Unified Diff: webrtc/modules/audio_processing/aec/aec_resampler.c

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/aec/aec_resampler.c
diff --git a/webrtc/modules/audio_processing/aec/aec_resampler.c b/webrtc/modules/audio_processing/aec/aec_resampler.c
index 62a830ba65f49c6b81fb7668dbd3e2a45543d378..99c39efa8818e16be8e8d95f2dbc77b8a1c717ed 100644
--- a/webrtc/modules/audio_processing/aec/aec_resampler.c
+++ b/webrtc/modules/audio_processing/aec/aec_resampler.c
@@ -64,17 +64,16 @@ void WebRtcAec_FreeResampler(void* resampInst) {
void WebRtcAec_ResampleLinear(void* resampInst,
const float* inspeech,
- int size,
+ size_t size,
float skew,
float* outspeech,
- int* size_out) {
+ size_t* size_out) {
AecResampler* obj = (AecResampler*)resampInst;
float* y;
float be, tnew;
- int tn, mm;
+ size_t tn, mm;
- assert(size >= 0);
assert(size <= 2 * FRAME_LEN);
assert(resampInst != NULL);
assert(inspeech != NULL);
@@ -94,7 +93,7 @@ void WebRtcAec_ResampleLinear(void* resampInst,
y = &obj->buffer[FRAME_LEN]; // Point at current frame
tnew = be * mm + obj->position;
- tn = (int)tnew;
+ tn = (size_t)tnew;
while (tn < size) {
« no previous file with comments | « webrtc/modules/audio_processing/aec/aec_resampler.h ('k') | webrtc/modules/audio_processing/aec/echo_cancellation.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698