diff --git a/src/sound.cpp b/src/sound.cpp index ac27188f..e17dae72 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -564,9 +564,10 @@ void FCEU_SoundCPUHook(int cycles) /* Unbelievably ugly hack */ if(FSettings.SndRate) { - soundtsoffs+=DMCacc; - DoPCM(); - soundtsoffs-=DMCacc; + const uint32 fudge = std::min(-DMCacc, soundtsoffs + timestamp); + soundtsoffs -= fudge; + DoPCM(); + soundtsoffs += fudge; } RawDALatch+=t; if(RawDALatch&0x80)