fix for rare crash
This commit is contained in:
parent
14b07ab5f2
commit
4c3d727ad0
|
@ -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);
|
||||||
|
soundtsoffs -= fudge;
|
||||||
DoPCM();
|
DoPCM();
|
||||||
soundtsoffs-=DMCacc;
|
soundtsoffs += fudge;
|
||||||
}
|
}
|
||||||
RawDALatch+=t;
|
RawDALatch+=t;
|
||||||
if(RawDALatch&0x80)
|
if(RawDALatch&0x80)
|
||||||
|
|
Loading…
Reference in New Issue