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

Unified Diff: webrtc/modules/audio_processing/vad/voice_activity_detector.cc

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
Index: webrtc/modules/audio_processing/vad/voice_activity_detector.cc
diff --git a/webrtc/modules/audio_processing/vad/voice_activity_detector.cc b/webrtc/modules/audio_processing/vad/voice_activity_detector.cc
index 05995ed186bb54f31a74c189d149273d5b16c22b..c5c849847b6eaeca740d268045d3470b840bd8c0 100644
--- a/webrtc/modules/audio_processing/vad/voice_activity_detector.cc
+++ b/webrtc/modules/audio_processing/vad/voice_activity_detector.cc
@@ -17,7 +17,7 @@
namespace webrtc {
namespace {
-const int kMaxLength = 320;
+const size_t kMaxLength = 320;
const int kNumChannels = 1;
const double kDefaultVoiceValue = 1.0;
@@ -35,9 +35,9 @@ VoiceActivityDetector::VoiceActivityDetector()
// |chunkwise_voice_probabilities_| and |chunkwise_rms_| when there is new data.
// Otherwise it clears them.
void VoiceActivityDetector::ProcessChunk(const int16_t* audio,
- int length,
+ size_t length,
int sample_rate_hz) {
- DCHECK_EQ(length, sample_rate_hz / 100);
+ DCHECK_EQ(static_cast<int>(length), sample_rate_hz / 100);
DCHECK_LE(length, kMaxLength);
// Resample to the required rate.
const int16_t* resampled_ptr = audio;
« no previous file with comments | « webrtc/modules/audio_processing/vad/voice_activity_detector.h ('k') | webrtc/modules/audio_processing/voice_detection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698