Merge branch 'master' of github.com:TASVideos/fceux

This commit is contained in:
mjbudd77 2021-02-17 21:35:07 -05:00
commit e7e6aac71d
1 changed files with 4 additions and 3 deletions

View File

@ -564,9 +564,10 @@ void FCEU_SoundCPUHook(int cycles)
/* Unbelievably ugly hack */ /* Unbelievably ugly hack */
if(FSettings.SndRate) if(FSettings.SndRate)
{ {
soundtsoffs+=DMCacc; const uint32 fudge = std::min<uint32>(-DMCacc, soundtsoffs + timestamp);
DoPCM(); soundtsoffs -= fudge;
soundtsoffs-=DMCacc; DoPCM();
soundtsoffs += fudge;
} }
RawDALatch+=t; RawDALatch+=t;
if(RawDALatch&0x80) if(RawDALatch&0x80)