summaryrefslogtreecommitdiffstats
path: root/src/Resampler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Resampler.cpp')
-rw-r--r--src/Resampler.cpp5
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;
}