From 8871729a65615df0eab213bbbf942abe75771704 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 8 Jul 2023 22:35:16 +0100 Subject: Avoid drawing the whole screen on each frame This allows supporting 386DX "just about" (there will be flickering). --- src/sound.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/sound.c') diff --git a/src/sound.c b/src/sound.c index 871fcaa..c9e3b1c 100644 --- a/src/sound.c +++ b/src/sound.c @@ -30,11 +30,6 @@ static uint32_t voice = 0; static MODULE *music = NULL; -#define MAX_QUEUE 4 - -static uint8_t queue[MAX_QUEUE]; -static uint8_t queue_top; - uint8_t sound_init(uint8_t nosound) { MikMod_InitThreads(); @@ -71,8 +66,6 @@ uint8_t sound_init(uint8_t nosound) Player_Start(music); MikMod_EnableOutput(); - queue_top = 0; - return 1; } @@ -126,21 +119,3 @@ void sound_play_efx(uint8_t efxno) cur = efxno; voice = Sample_Play(efx[cur].s, 0, 0); } - -void sound_queue_efx(uint8_t efxno) -{ - if (queue_top >= MAX_QUEUE) - return; - - queue[queue_top++] = efxno; -} - -void sound_play_queue() -{ - while (queue_top > 0) - sound_play_efx(queue[--queue_top]); - - disable(); - MikMod_Update(); - enable(); -} -- cgit v1.2.3