From fb3d9b016893c29e0bb0b1ebd29480c4e86c2e31 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 8 Jul 2023 11:54:05 +0100 Subject: Update less frequently This is a wilde guess. Assuming the DMA buffer is big enough. --- src/sound.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sound.c') diff --git a/src/sound.c b/src/sound.c index 0a10ae4..871fcaa 100644 --- a/src/sound.c +++ b/src/sound.c @@ -78,11 +78,11 @@ uint8_t sound_init(uint8_t nosound) volatile static uint8_t divider = 0; -/* To be called from the timer int, so we update every 540ms approx by using a - * counter and updating 1 in 10 interrupts */ +/* To be called from the timer int, so we update every 1080ms approx by using a + * counter and updating 1 in 20 interrupts */ void sound_update() { - if (++divider == 10) + if (++divider == 20) { divider = 0; MikMod_Update(); -- cgit v1.2.3