VGM export: fix playback speed being wrong

if audio rate wasn't 44100Hz
This commit is contained in:
tildearrow 2022-01-30 23:07:09 -05:00
parent a1d3d3d873
commit ff5357de10
1 changed files with 4 additions and 0 deletions

View File

@ -2509,6 +2509,8 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop) {
stop();
setOrder(0);
isBusy.lock();
double origRate=got.rate;
got.rate=44100;
// determine loop point
int loopOrder=0;
int loopRow=0;
@ -3174,6 +3176,8 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop) {
// end of song
w->writeC(0x66);
got.rate=origRate;
for (int i=0; i<song.systemLen; i++) {
disCont[i].dispatch->toggleRegisterDump(false);
}