diff options
author | Chris Robinson <[email protected]> | 2019-08-20 05:26:51 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-08-20 05:26:51 -0700 |
commit | 7a8f81259c515291126f29a0e65aff791efe16b0 (patch) | |
tree | 124b56dc301dec0116dd6394d0f46389123da7b2 /alc/filters | |
parent | 102ef6cb3356ef81e2a392d3aa8bd6324eb3ff30 (diff) |
Use size_t for the NFC and biquad filters' sample count
Diffstat (limited to 'alc/filters')
-rw-r--r-- | alc/filters/biquad.cpp | 2 | ||||
-rw-r--r-- | alc/filters/biquad.h | 3 | ||||
-rw-r--r-- | alc/filters/nfc.cpp | 8 | ||||
-rw-r--r-- | alc/filters/nfc.h | 11 |
4 files changed, 14 insertions, 10 deletions
diff --git a/alc/filters/biquad.cpp b/alc/filters/biquad.cpp index 871c4af4..a4d81604 100644 --- a/alc/filters/biquad.cpp +++ b/alc/filters/biquad.cpp @@ -89,7 +89,7 @@ void BiquadFilterR<Real>::setParams(BiquadType type, Real gain, Real f0norm, Rea } template<typename Real> -void BiquadFilterR<Real>::process(Real *dst, const Real *src, int numsamples) +void BiquadFilterR<Real>::process(Real *dst, const Real *src, const size_t numsamples) { ASSUME(numsamples > 0); diff --git a/alc/filters/biquad.h b/alc/filters/biquad.h index f8d7f0ba..9de86f2f 100644 --- a/alc/filters/biquad.h +++ b/alc/filters/biquad.h @@ -2,6 +2,7 @@ #define FILTERS_BIQUAD_H #include <cmath> +#include <cstddef> #include <utility> #include "math_defs.h" @@ -72,7 +73,7 @@ public: } - void process(Real *dst, const Real *src, int numsamples); + void process(Real *dst, const Real *src, const size_t numsamples); /* Rather hacky. It's just here to support "manual" processing. */ std::pair<Real,Real> getComponents() const noexcept diff --git a/alc/filters/nfc.cpp b/alc/filters/nfc.cpp index 4e36bc66..e4436b27 100644 --- a/alc/filters/nfc.cpp +++ b/alc/filters/nfc.cpp @@ -278,7 +278,7 @@ void NfcFilter::adjust(const float w0) noexcept } -void NfcFilter::process1(float *RESTRICT dst, const float *RESTRICT src, const int count) +void NfcFilter::process1(float *RESTRICT dst, const float *RESTRICT src, const size_t count) { ASSUME(count > 0); @@ -297,7 +297,7 @@ void NfcFilter::process1(float *RESTRICT dst, const float *RESTRICT src, const i first.z[0] = z1; } -void NfcFilter::process2(float *RESTRICT dst, const float *RESTRICT src, const int count) +void NfcFilter::process2(float *RESTRICT dst, const float *RESTRICT src, const size_t count) { ASSUME(count > 0); @@ -321,7 +321,7 @@ void NfcFilter::process2(float *RESTRICT dst, const float *RESTRICT src, const i second.z[1] = z2; } -void NfcFilter::process3(float *RESTRICT dst, const float *RESTRICT src, const int count) +void NfcFilter::process3(float *RESTRICT dst, const float *RESTRICT src, const size_t count) { ASSUME(count > 0); @@ -353,7 +353,7 @@ void NfcFilter::process3(float *RESTRICT dst, const float *RESTRICT src, const i third.z[2] = z3; } -void NfcFilter::process4(float *RESTRICT dst, const float *RESTRICT src, const int count) +void NfcFilter::process4(float *RESTRICT dst, const float *RESTRICT src, const size_t count) { ASSUME(count > 0); diff --git a/alc/filters/nfc.h b/alc/filters/nfc.h index b656850a..d2bf3339 100644 --- a/alc/filters/nfc.h +++ b/alc/filters/nfc.h @@ -1,6 +1,9 @@ #ifndef FILTER_NFC_H #define FILTER_NFC_H +#include <cstddef> + + struct NfcFilter1 { float base_gain, gain; float b1, a1; @@ -43,16 +46,16 @@ public: void adjust(const float w0) noexcept; /* Near-field control filter for first-order ambisonic channels (1-3). */ - void process1(float *RESTRICT dst, const float *RESTRICT src, const int count); + void process1(float *RESTRICT dst, const float *RESTRICT src, const size_t count); /* Near-field control filter for second-order ambisonic channels (4-8). */ - void process2(float *RESTRICT dst, const float *RESTRICT src, const int count); + void process2(float *RESTRICT dst, const float *RESTRICT src, const size_t count); /* Near-field control filter for third-order ambisonic channels (9-15). */ - void process3(float *RESTRICT dst, const float *RESTRICT src, const int count); + void process3(float *RESTRICT dst, const float *RESTRICT src, const size_t count); /* Near-field control filter for fourth-order ambisonic channels (16-24). */ - void process4(float *RESTRICT dst, const float *RESTRICT src, const int count); + void process4(float *RESTRICT dst, const float *RESTRICT src, const size_t count); }; #endif /* FILTER_NFC_H */ |