diff --git a/src/pcm/Normalizer.cxx b/src/pcm/Normalizer.cxx index a251d95dc..866c11d49 100644 --- a/src/pcm/Normalizer.cxx +++ b/src/pcm/Normalizer.cxx @@ -5,17 +5,17 @@ #include "Normalizer.hxx" void -PcmNormalizer::ProcessS16(int16_t *audio, unsigned int count) noexcept +PcmNormalizer::ProcessS16(int16_t *audio, std::size_t count) noexcept { int16_t *ap; - unsigned int i; + std::size_t i; int curGain = gain[pos]; int newGain; int peakVal = 1; int peakPos = 0; int slot = (pos + 1) % bufsz; int *clipped_ = clipped + slot; - unsigned int ramp = count; + std::size_t ramp = count; int delta; ap = audio; diff --git a/src/pcm/Normalizer.hxx b/src/pcm/Normalizer.hxx index a18f0fabd..2191809f3 100644 --- a/src/pcm/Normalizer.hxx +++ b/src/pcm/Normalizer.hxx @@ -4,6 +4,7 @@ #pragma once +#include #include class PcmNormalizer { @@ -25,11 +26,11 @@ class PcmNormalizer { //! History of clip amounts int *const clipped; - unsigned int pos = 0; - const unsigned int bufsz; + std::size_t pos = 0; + const std::size_t bufsz; public: - PcmNormalizer(unsigned history=400) noexcept + PcmNormalizer(std::size_t history=400) noexcept :peaks(new int[history]{}), gain(new int[history]{}), clipped(new int[history]{}), @@ -44,7 +45,7 @@ public: } //! Process 16-bit signed data - void ProcessS16(int16_t *data, unsigned int count) noexcept; + void ProcessS16(int16_t *data, std::size_t count) noexcept; }; //! TODO: Compressor_Process_int32, Compressor_Process_float, others as needed