2sf: fix JIT enable, fix sample rate
--- a/src/in_2sf/XSFConfig_2SF.cpp
+++ b/src/in_2sf/XSFConfig_2SF.cpp
@@ -41,7 +41,7 @@
void About(HWND parent);
};
-unsigned XSFConfig::initSampleRate = 44100;
+unsigned XSFConfig::initSampleRate = DESMUME_SAMPLE_RATE;
std::string XSFConfig::commonName = "2SF Decoder";
std::string XSFConfig::versionNumber = "0.9b";
unsigned XSFConfig_2SF::initInterpolation = 2;
@@ -54,7 +54,7 @@
XSFConfig_2SF::XSFConfig_2SF() : XSFConfig(), interpolation(0), mutes()
{
- this->supportedSampleRates.push_back(44100);
+ this->supportedSampleRates.push_back(DESMUME_SAMPLE_RATE);
}
void XSFConfig_2SF::LoadSpecificConfig()
--- a/src/in_2sf/XSFPlayer_2SF.cpp
+++ b/src/in_2sf/XSFPlayer_2SF.cpp
@@ -224,6 +224,7 @@
}
CommonSettings.use_jit = true;
+ CommonSettings.jit_max_block_size = 100;
NDS_Reset();
execute = true;
@@ -236,8 +237,9 @@
}
sndifwork.xfs_load = true;
- //CommonSettings.spu_advanced = true;
- //CommonSettings.advanced_timing = false;
+ CommonSettings.rigorous_timing = true;
+ CommonSettings.spu_advanced = true;
+ CommonSettings.advanced_timing = true;
return XSFPlayer::Load();
}
--- a/src/in_2sf/desmume/SPU.cpp
+++ b/src/in_2sf/desmume/SPU.cpp
@@ -96,7 +96,7 @@
static const double ARM7_CLOCK = 33513982;
-double DESMUME_SAMPLE_RATE = 48000;
+double DESMUME_SAMPLE_RATE = 32728.498;
static double samples_per_hline = (DESMUME_SAMPLE_RATE / 59.8261f) / 263.0f;
static double sampleLength = DESMUME_SAMPLE_RATE / 32728.498;