diff options
author | Nebuleon Fumika | 2013-02-08 03:22:27 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-02-08 03:22:27 -0500 |
commit | d4fcf2697c9a45594e3ee0b8bf82e480ddd0b69b (patch) | |
tree | 3588c9f6d03e034918dead8dcd3dd790b9d922f1 /source | |
parent | 4676a520e1b181e5891550331100b2629d7cbd7f (diff) | |
download | snes9x2005-d4fcf2697c9a45594e3ee0b8bf82e480ddd0b69b.tar.gz snes9x2005-d4fcf2697c9a45594e3ee0b8bf82e480ddd0b69b.tar.bz2 snes9x2005-d4fcf2697c9a45594e3ee0b8bf82e480ddd0b69b.zip |
Require one audio buffer to be free again. Otherwise, if the 4 buffers get full, it's already game over, and getAudiobuff becomes NULL for about 400 milliseconds, stopping all emulation.
Diffstat (limited to 'source')
-rw-r--r-- | source/nds/entry.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp index af832f9..77620bf 100644 --- a/source/nds/entry.cpp +++ b/source/nds/entry.cpp @@ -1004,7 +1004,7 @@ void S9xProcessSound (unsigned int) unsigned int Now = getSysTime(); if (Now - LastSoundEmissionTime >= SOUND_EMISSION_INTERVAL) { - if(ds2_checkAudiobuff() > AUDIO_BUFFER_COUNT) + if(ds2_checkAudiobuff() > AUDIO_BUFFER_COUNT - 1) { LastSoundEmissionTime++; return; @@ -1022,7 +1022,7 @@ void S9xProcessSound (unsigned int) { LastSoundEmissionTime += SOUND_EMISSION_INTERVAL; SoundEmissionTimeError += SOUND_EMISSION_INTERVAL_ERROR; - if (SoundEmissionTimeError > FIXED_POINT) + if (SoundEmissionTimeError >= FIXED_POINT) { LastSoundEmissionTime += SoundEmissionTimeError >> FIXED_POINT_SHIFT; SoundEmissionTimeError &= FIXED_POINT_REMAINDER; |