summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common_audio/audio_util.cc12
-rw-r--r--common_audio/include/audio_util.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/common_audio/audio_util.cc b/common_audio/audio_util.cc
index 0c961e1a..f2936b07 100644
--- a/common_audio/audio_util.cc
+++ b/common_audio/audio_util.cc
@@ -14,18 +14,18 @@
namespace webrtc {
-void RoundToInt16(const float* src, int size, int16_t* dest) {
- for (int i = 0; i < size; ++i)
+void RoundToInt16(const float* src, size_t size, int16_t* dest) {
+ for (size_t i = 0; i < size; ++i)
dest[i] = RoundToInt16(src[i]);
}
-void ScaleAndRoundToInt16(const float* src, int size, int16_t* dest) {
- for (int i = 0; i < size; ++i)
+void ScaleAndRoundToInt16(const float* src, size_t size, int16_t* dest) {
+ for (size_t i = 0; i < size; ++i)
dest[i] = ScaleAndRoundToInt16(src[i]);
}
-void ScaleToFloat(const int16_t* src, int size, float* dest) {
- for (int i = 0; i < size; ++i)
+void ScaleToFloat(const int16_t* src, size_t size, float* dest) {
+ for (size_t i = 0; i < size; ++i)
dest[i] = ScaleToFloat(src[i]);
}
diff --git a/common_audio/include/audio_util.h b/common_audio/include/audio_util.h
index 18fdbe2a..9972a0e0 100644
--- a/common_audio/include/audio_util.h
+++ b/common_audio/include/audio_util.h
@@ -47,14 +47,14 @@ static inline float ScaleToFloat(int16_t v) {
}
// Round |size| elements of |src| to int16 with clamping and write to |dest|.
-void RoundToInt16(const float* src, int size, int16_t* dest);
+void RoundToInt16(const float* src, size_t size, int16_t* dest);
// Scale (from [-1, 1]) and round |size| elements of |src| to full-range int16
// with clamping and write to |dest|.
-void ScaleAndRoundToInt16(const float* src, int size, int16_t* dest);
+void ScaleAndRoundToInt16(const float* src, size_t size, int16_t* dest);
// Scale |size| elements of |src| to float [-1, 1] and write to |dest|.
-void ScaleToFloat(const int16_t* src, int size, float* dest);
+void ScaleToFloat(const int16_t* src, size_t size, float* dest);
// Deinterleave audio from |interleaved| to the channel buffers pointed to
// by |deinterleaved|. There must be sufficient space allocated in the