aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/nds/entry.cpp4
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;