diff --git a/src/pcm/Dsd2Pcm.cxx b/src/pcm/Dsd2Pcm.cxx index 7acaeb335..37421804b 100644 --- a/src/pcm/Dsd2Pcm.cxx +++ b/src/pcm/Dsd2Pcm.cxx @@ -162,10 +162,10 @@ Dsd2Pcm::Reset() noexcept } inline float -Dsd2Pcm::CalcOutputSample(unsigned ffp) const noexcept +Dsd2Pcm::CalcOutputSample(size_t ffp) const noexcept { double acc = 0; - for (unsigned i = 0; i < CTABLES; ++i) { + for (size_t i = 0; i < CTABLES; ++i) { unsigned bite1 = fifo[(ffp -i) & FIFOMASK] & 0xFF; unsigned bite2 = fifo[(ffp-(CTABLES*2-1)+i) & FIFOMASK] & 0xFF; acc += ctables[i][bite1] + ctables[i][bite2]; @@ -179,7 +179,7 @@ Dsd2Pcm::Translate(size_t samples, bool lsbf, float *dst, ptrdiff_t dst_stride) noexcept { - unsigned ffp = fifopos; + size_t ffp = fifopos; while (samples-- > 0) { unsigned bite1 = *src & 0xFFu; if (lsbf) bite1 = bit_reverse(bite1); diff --git a/src/pcm/Dsd2Pcm.hxx b/src/pcm/Dsd2Pcm.hxx index 5ec8260a3..027a004a3 100644 --- a/src/pcm/Dsd2Pcm.hxx +++ b/src/pcm/Dsd2Pcm.hxx @@ -47,7 +47,7 @@ private: static constexpr size_t FIFOMASK = FIFOSIZE - 1; uint8_t fifo[FIFOSIZE]; - unsigned fifopos; + size_t fifopos; public: Dsd2Pcm() noexcept { @@ -76,7 +76,7 @@ public: float *dst, ptrdiff_t dst_stride) noexcept; private: - float CalcOutputSample(unsigned ffp) const noexcept; + float CalcOutputSample(size_t ffp) const noexcept; }; #endif /* include guard DSD2PCM_H_INCLUDED */