Browse code

Update XSFPlayer_2SF.cpp

Make it substantially more obvious how to hack the 2sf player to output at a different samplerate by removing the secret implicit 44100 based calculation

zeromus authored on 2017/11/09 16:15:56 • GitHub committed on 2017/11/09 16:15:56
Showing 1 changed files
... ...
@@ -211,7 +211,8 @@ bool XSFPlayer_2SF::Load()
211 211
 	if (NDS_Init())
212 212
 		return false;
213 213
 
214
-	SPU_ChangeSoundCore(SNDIFID_2SF, 737);
214
+	static const int BUFFERSIZE = DESMUME_SAMPLE_RATE / 59.837; //truncates to 737, the traditional value, for 44100
215
+	SPU_ChangeSoundCore(SNDIFID_2SF, BUFFERSIZE);
215 216
 
216 217
 	execute = false;
217 218