diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-05-27 16:29:38 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-05-27 16:29:38 +0200 |
commit | 4fe6a33685ce9cc0be44319fca5ce30e05bfb090 (patch) | |
tree | c11d2171eeb0a11fdeec87770baa47fbeb6452b5 /src/Resampler.cpp | |
parent | c3f5387d9d8d3fd36e8bcf562c1ad4cc99e38a91 (diff) | |
download | dabmod-4fe6a33685ce9cc0be44319fca5ce30e05bfb090.tar.gz dabmod-4fe6a33685ce9cc0be44319fca5ce30e05bfb090.tar.bz2 dabmod-4fe6a33685ce9cc0be44319fca5ce30e05bfb090.zip |
Replace some unsigned types
Diffstat (limited to 'src/Resampler.cpp')
-rw-r--r-- | src/Resampler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Resampler.cpp b/src/Resampler.cpp index 4ad6638..f09a58d 100644 --- a/src/Resampler.cpp +++ b/src/Resampler.cpp @@ -38,7 +38,8 @@ # define FFT_IMAG(x) x[1] #endif -unsigned gcd(unsigned a, unsigned b) +template<class T> +T gcd(T a, T b) { if (b == 0) { return a; @@ -106,7 +107,7 @@ Resampler::Resampler(size_t inputRate, size_t outputRate, size_t resolution) : M = inputRate / divisor; PDEBUG(" gcd: %zu, L: %zu, M: %zu\n", divisor, L, M); { - unsigned factor = resolution * 2 / M; + size_t factor = resolution * 2 / M; if (factor & 1) { ++factor; } |