Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Nini <drfiemost@users.noreply.github.com>2022-06-30 06:28:39 +0300
committerkcgen <kcgen@users.noreply.github.com>2022-06-30 06:42:05 +0300
commit1b99efdb4ac30972eed7cc7df98692ee75f38050 (patch)
tree6d90096a8b3fd8b8a8f9586003229fe8dd2baaf8
parente7fda5a7d1aa466b6f72ec8cf5a5f3472570c872 (diff)
Sync reSIDfp with upstreamkc/sync-residfp-1
-rw-r--r--src/libs/residfp/Filter8580.cpp2
-rw-r--r--src/libs/residfp/resample/SincResampler.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/libs/residfp/Filter8580.cpp b/src/libs/residfp/Filter8580.cpp
index c0ff5e66a..a70285a8a 100644
--- a/src/libs/residfp/Filter8580.cpp
+++ b/src/libs/residfp/Filter8580.cpp
@@ -52,7 +52,7 @@ void Filter8580::updatedCenterFrequency()
{
wl += dacWL;
}
- dacWL *= 2;
+ dacWL *= 2.;
}
}
else
diff --git a/src/libs/residfp/resample/SincResampler.cpp b/src/libs/residfp/resample/SincResampler.cpp
index 3b3565671..3790ecc9d 100644
--- a/src/libs/residfp/resample/SincResampler.cpp
+++ b/src/libs/residfp/resample/SincResampler.cpp
@@ -97,6 +97,7 @@ int convolve(const short* a, const short* b, int bLength)
const uintptr_t offset = (uintptr_t)(a) & 0x0f;
+ // check for aligned accesses
if (offset == ((uintptr_t)(b) & 0x0f))
{
if (offset)
@@ -336,7 +337,9 @@ SincResampler::SincResampler(double clockFrequency, double samplingFrequency, do
// Calculate the sinc tables.
const double scale = 32768.0 * wc / cyclesPerSampleD / M_PI;
- const double firN_2 = static_cast<double>(firN / 2);
+ // we're not interested in the fractional part
+ // so use int division before converting to double
+ const auto firN_2 = static_cast<double>(firN / 2);
for (int i = 0; i < firRES; i++)
{