summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Resampler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Resampler.cpp b/src/Resampler.cpp
index ee2b865..8786e91 100644
--- a/src/Resampler.cpp
+++ b/src/Resampler.cpp
@@ -76,9 +76,9 @@ Resampler::Resampler(size_t inputRate, size_t outputRate, size_t resolution) :
PDEBUG(" FFT size in: %zu, FFT size out: %zu\n", myFftSizeIn, myFftSizeOut);
if (myFftSizeIn > myFftSizeOut) {
- myFactor = 1.0f / myFftSizeIn;
+ myFactor = 1.0f / myFftSizeIn * outputRate / inputRate;
} else {
- myFactor = 1.0f / myFftSizeOut;
+ myFactor = 1.0f / myFftSizeOut * outputRate / inputRate;
}
myWindow = (float*)memalign(16, myFftSizeIn * sizeof(float));