From aa5fe6a97d04b4b279d7c1be687f1eb3b28f3a20 Mon Sep 17 00:00:00 2001 From: gameblabla Date: Fri, 28 Jun 2019 03:54:35 +0200 Subject: [PATCH] Revert Merging parts of ReGBA commit. 62df27d254c1aa3bf8f5397894da26d3db7824c3 --- sound.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound.c b/sound.c index 0a63eeeb..0c1bc776 100644 --- a/sound.c +++ b/sound.c @@ -103,7 +103,7 @@ void sound_timer_queue32(u32 channel, u32 value) sound_buffer[buffer_index + 1] += dest_sample \ #define render_samples(type) \ - while(fifo_fractional <= FP16_16_MAX_FRACTIONAL_PART) \ + while(fifo_fractional <= 0xFFFFFF) \ { \ render_sample_##type(); \ fifo_fractional += frequency_step; \ @@ -447,10 +447,10 @@ void update_gbc_sound(u32 cpu_ticks) gbc_sound_partial_ticks += fp16_16_fractional_part(buffer_ticks); buffer_ticks = fp16_16_to_u32(buffer_ticks); - if(gbc_sound_partial_ticks > FP16_16_MAX_FRACTIONAL_PART) + if(gbc_sound_partial_ticks > 0xFFFF) { buffer_ticks += FP16_16_TO_U32(gbc_sound_partial_ticks); - gbc_sound_partial_ticks &= FP16_16_MAX_FRACTIONAL_PART; + gbc_sound_partial_ticks &= 0xFFFF; } SDL_LockMutex(sound_mutex);