Browse code

2sf: fix JIT enable, fix sample rate

Adam Higerd authored on 2021/02/11 18:16:28
Showing 3 changed files
... ...
@@ -41,7 +41,7 @@ public:
41 41
 	void About(HWND parent);
42 42
 };
43 43
 
44
-unsigned XSFConfig::initSampleRate = 44100;
44
+unsigned XSFConfig::initSampleRate = DESMUME_SAMPLE_RATE;
45 45
 std::string XSFConfig::commonName = "2SF Decoder";
46 46
 std::string XSFConfig::versionNumber = "0.9b";
47 47
 unsigned XSFConfig_2SF::initInterpolation = 2;
... ...
@@ -54,7 +54,7 @@ XSFConfig *XSFConfig::Create()
54 54
 
55 55
 XSFConfig_2SF::XSFConfig_2SF() : XSFConfig(), interpolation(0), mutes()
56 56
 {
57
-	this->supportedSampleRates.push_back(44100);
57
+	this->supportedSampleRates.push_back(DESMUME_SAMPLE_RATE);
58 58
 }
59 59
 
60 60
 void XSFConfig_2SF::LoadSpecificConfig()
... ...
@@ -224,6 +224,7 @@ bool XSFPlayer_2SF::Load()
224 224
 	}
225 225
 
226 226
 	CommonSettings.use_jit = true;
227
+	CommonSettings.jit_max_block_size = 100;
227 228
 	NDS_Reset();
228 229
 
229 230
 	execute = true;
... ...
@@ -236,8 +237,9 @@ bool XSFPlayer_2SF::Load()
236 237
 	}
237 238
 
238 239
 	sndifwork.xfs_load = true;
239
-	//CommonSettings.spu_advanced = true;
240
-	//CommonSettings.advanced_timing = false;
240
+	CommonSettings.rigorous_timing = true;
241
+	CommonSettings.spu_advanced = true;
242
+	CommonSettings.advanced_timing = true;
241 243
 
242 244
 	return XSFPlayer::Load();
243 245
 }
... ...
@@ -96,7 +96,7 @@ static const s16 wavedutytbl[8][8] = {
96 96
 
97 97
 static const double ARM7_CLOCK = 33513982;
98 98
 
99
-double DESMUME_SAMPLE_RATE = 48000;
99
+double DESMUME_SAMPLE_RATE = 32728.498;
100 100
 static double samples_per_hline = (DESMUME_SAMPLE_RATE / 59.8261f) / 263.0f;
101 101
 static double sampleLength = DESMUME_SAMPLE_RATE / 32728.498;
102 102