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

Unified Diff: webrtc/modules/audio_processing/rms_level.h

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/modules/audio_processing/ns/nsx_core_neon.c ('k') | webrtc/modules/audio_processing/rms_level.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/rms_level.h
diff --git a/webrtc/modules/audio_processing/rms_level.h b/webrtc/modules/audio_processing/rms_level.h
index 055d271bb1980c1d0c9f4903a3fc8b24098461c5..12fa2125f08acdd3820971dddbcb370f3d25cdfa 100644
--- a/webrtc/modules/audio_processing/rms_level.h
+++ b/webrtc/modules/audio_processing/rms_level.h
@@ -11,6 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
+#include <cstddef>
+
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -35,11 +37,11 @@ class RMSLevel {
void Reset();
// Pass each chunk of audio to Process() to accumulate the level.
- void Process(const int16_t* data, int length);
+ void Process(const int16_t* data, size_t length);
// If all samples with the given |length| have a magnitude of zero, this is
// a shortcut to avoid some computation.
- void ProcessMuted(int length);
+ void ProcessMuted(size_t length);
// Computes the RMS level over all data passed to Process() since the last
// call to RMS(). The returned value is positive but should be interpreted as
@@ -48,7 +50,7 @@ class RMSLevel {
private:
float sum_square_;
- int sample_count_;
+ size_t sample_count_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/modules/audio_processing/ns/nsx_core_neon.c ('k') | webrtc/modules/audio_processing/rms_level.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698