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

Unified Diff: webrtc/modules/audio_processing/vad/standalone_vad.h

Issue 1228803003: Update audio code to use size_t more correctly, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments 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/vad/standalone_vad.h
diff --git a/webrtc/modules/audio_processing/vad/standalone_vad.h b/webrtc/modules/audio_processing/vad/standalone_vad.h
index 4017a72c60f4b5d7be2e852019ecb43fddcc5cad..6a25424dab537f40145ec9dcfc55284c615f5cfe 100644
--- a/webrtc/modules/audio_processing/vad/standalone_vad.h
+++ b/webrtc/modules/audio_processing/vad/standalone_vad.h
@@ -41,10 +41,10 @@ class StandaloneVad {
// classified as passive. In this way, when probabilities are combined, the
// effect of the stand-alone VAD is neutral if the input is classified as
// active.
- int GetActivity(double* p, int length_p);
+ int GetActivity(double* p, size_t length_p);
// Expecting 10 ms of 16 kHz audio to be pushed in.
- int AddAudio(const int16_t* data, int length);
+ int AddAudio(const int16_t* data, size_t length);
// Set aggressiveness of VAD, 0 is the least aggressive and 3 is the most
// aggressive mode. Returns -1 if the input is less than 0 or larger than 3,
@@ -56,12 +56,12 @@ class StandaloneVad {
private:
explicit StandaloneVad(VadInst* vad);
- static const int kMaxNum10msFrames = 3;
+ static const size_t kMaxNum10msFrames = 3;
// TODO(turajs): Is there a way to use scoped-pointer here?
VadInst* vad_;
int16_t buffer_[kMaxNum10msFrames * kLength10Ms];
- int index_;
+ size_t index_;
int mode_;
};
« no previous file with comments | « webrtc/modules/audio_processing/vad/pole_zero_filter.cc ('k') | webrtc/modules/audio_processing/vad/standalone_vad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698