From 0dd69e827325a28b74f2a2d997bae7eb7ae48db3 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Thu, 3 Oct 2013 01:23:16 -0700 Subject: [PATCH] Fix incorrect condition in FIFO sampling --- src/gba/gba-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/gba-audio.c b/src/gba/gba-audio.c index 909a3a0b2..1268ba1fa 100644 --- a/src/gba/gba-audio.c +++ b/src/gba/gba-audio.c @@ -143,7 +143,7 @@ void GBAAudioSampleFIFO(struct GBAAudio* audio, int fifoId) { GBALog(audio->p, GBA_LOG_ERROR, "Bad FIFO write to address 0x%03x", fifoId); return; } - if (CircleBufferSize(&channel->fifo) < 4 * sizeof(int32_t)) { + if (CircleBufferSize(&channel->fifo) <= 4 * sizeof(int32_t)) { struct GBADMA* dma = &audio->p->memory.dma[channel->dmaSource]; dma->nextCount = 4; GBAMemoryServiceDMA(&audio->p->memory, channel->dmaSource, dma);