aboutsummaryrefslogtreecommitdiffstats
path: root/alc/bs2b.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/bs2b.cpp')
-rw-r--r--alc/bs2b.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/alc/bs2b.cpp b/alc/bs2b.cpp
index 71249d4a..fb75188c 100644
--- a/alc/bs2b.cpp
+++ b/alc/bs2b.cpp
@@ -130,7 +130,7 @@ void bs2b_clear(struct bs2b *bs2b)
std::fill(std::begin(bs2b->history), std::end(bs2b->history), bs2b::t_last_sample{});
} /* bs2b_clear */
-void bs2b_cross_feed(struct bs2b *bs2b, float *Left, float *Right, int SamplesToDo)
+void bs2b_cross_feed(struct bs2b *bs2b, float *Left, float *Right, size_t SamplesToDo)
{
const float a0_lo{bs2b->a0_lo};
const float b1_lo{bs2b->b1_lo};
@@ -140,14 +140,14 @@ void bs2b_cross_feed(struct bs2b *bs2b, float *Left, float *Right, int SamplesTo
float lsamples[128][2];
float rsamples[128][2];
- for(int base{0};base < SamplesToDo;)
+ for(size_t base{0};base < SamplesToDo;)
{
- const int todo{std::min(128, SamplesToDo-base)};
+ const size_t todo{std::min<size_t>(128, SamplesToDo-base)};
/* Process left input */
float z_lo{bs2b->history[0].lo};
float z_hi{bs2b->history[0].hi};
- for(int i{0};i < todo;i++)
+ for(size_t i{0};i < todo;i++)
{
lsamples[i][0] = a0_lo*Left[i] + z_lo;
z_lo = b1_lo*lsamples[i][0];
@@ -161,7 +161,7 @@ void bs2b_cross_feed(struct bs2b *bs2b, float *Left, float *Right, int SamplesTo
/* Process right input */
z_lo = bs2b->history[1].lo;
z_hi = bs2b->history[1].hi;
- for(int i{0};i < todo;i++)
+ for(size_t i{0};i < todo;i++)
{
rsamples[i][0] = a0_lo*Right[i] + z_lo;
z_lo = b1_lo*rsamples[i][0];
@@ -173,9 +173,9 @@ void bs2b_cross_feed(struct bs2b *bs2b, float *Left, float *Right, int SamplesTo
bs2b->history[1].hi = z_hi;
/* Crossfeed */
- for(int i{0};i < todo;i++)
+ for(size_t i{0};i < todo;i++)
*(Left++) = lsamples[i][1] + rsamples[i][0];
- for(int i{0};i < todo;i++)
+ for(size_t i{0};i < todo;i++)
*(Right++) = rsamples[i][1] + lsamples[i][0];
base += todo;