diff options
author | andreas128 <Andreas> | 2017-03-26 23:07:42 +0200 |
---|---|---|
committer | andreas128 <Andreas> | 2017-03-26 23:07:42 +0200 |
commit | 5c29e8776e1bd833e1ea60b57698a09b4d7f60e7 (patch) | |
tree | cbb933d82a00f6edbf9afed021172dae6dcb7c62 /src/Resampler.cpp | |
parent | e45d89bdd7ad54bf4fcd4f3220a35ec1d80e94bf (diff) | |
download | dabmod-5c29e8776e1bd833e1ea60b57698a09b4d7f60e7.tar.gz dabmod-5c29e8776e1bd833e1ea60b57698a09b4d7f60e7.tar.bz2 dabmod-5c29e8776e1bd833e1ea60b57698a09b4d7f60e7.zip |
Fix resampler amplitude
Diffstat (limited to 'src/Resampler.cpp')
-rw-r--r-- | src/Resampler.cpp | 4 |
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)); |