aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-08 11:54:05 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-08 11:54:05 +0100
commitfb3d9b016893c29e0bb0b1ebd29480c4e86c2e31 (patch)
tree0fef566d719115fcbfa50c959a4fca2ff28d7554
parent118e8e7db21040ad9e5e94cb824c4f389a8b5dcf (diff)
downloadgold-mine-run-fb3d9b016893c29e0bb0b1ebd29480c4e86c2e31.tar.gz
gold-mine-run-fb3d9b016893c29e0bb0b1ebd29480c4e86c2e31.zip
Update less frequently
This is a wilde guess. Assuming the DMA buffer is big enough.
-rw-r--r--src/sound.c6
1 files changed, 3 insertions, 3 deletions
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();