Minor update to scale the phase offset, thanks to kode54.
--- a/src/in_ncsf/SSEQPlayer/Channel.cpp
+++ b/src/in_ncsf/SSEQPlayer/Channel.cpp
@@ -611,10 +611,11 @@
double kernel[LANCZOS_WIDTH * 2], kernel_sum = 0.0;
int i = LANCZOS_WIDTH, shift = static_cast<int>(std::floor(ratio * LANCZOS_RESOLUTION));
int step = this->reg.sampleIncrease > 1.0 ? static_cast<int>(LANCZOS_RESOLUTION / this->reg.sampleIncrease) : LANCZOS_RESOLUTION;
+ int shift_adj = shift * step / LANCZOS_RESOLUTION;
for (; i >= -static_cast<int>(LANCZOS_WIDTH - 1); --i)
{
int pos = i * step;
- kernel_sum += kernel[i + LANCZOS_WIDTH - 1] = this->lanczos_lut[std::abs(shift - pos)];
+ kernel_sum += kernel[i + LANCZOS_WIDTH - 1] = this->lanczos_lut[std::abs(shift_adj - pos)];
}
double sum = 0.0;
for (i = 0; i < static_cast<int>(LANCZOS_WIDTH * 2); ++i)
--- a/src/in_ncsf/XSFConfig_NCSF.cpp
+++ b/src/in_ncsf/XSFConfig_NCSF.cpp
@@ -42,7 +42,7 @@
unsigned XSFConfig::initSampleRate = 44100;
std::wstring XSFConfig::commonName = L"NCSF Decoder";
-std::wstring XSFConfig::versionNumber = L"1.7";
+std::wstring XSFConfig::versionNumber = L"1.7.1";
unsigned XSFConfig_NCSF::initInterpolation = 5;
std::wstring XSFConfig_NCSF::initMutes = L"0000000000000000";