aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-03-26 23:07:42 +0200
committerandreas128 <Andreas>2017-03-26 23:07:42 +0200
commit5c29e8776e1bd833e1ea60b57698a09b4d7f60e7 (patch)
treecbb933d82a00f6edbf9afed021172dae6dcb7c62 /src
parente45d89bdd7ad54bf4fcd4f3220a35ec1d80e94bf (diff)
downloaddabmod-5c29e8776e1bd833e1ea60b57698a09b4d7f60e7.tar.gz
dabmod-5c29e8776e1bd833e1ea60b57698a09b4d7f60e7.tar.bz2
dabmod-5c29e8776e1bd833e1ea60b57698a09b4d7f60e7.zip
Fix resampler amplitude
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));