Skip to content

Commit

Permalink
Revert Merging parts of ReGBA commit. 62df27d
Browse files Browse the repository at this point in the history
  • Loading branch information
gameblabla committed Jun 28, 2019
1 parent 34e46b9 commit aa5fe6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit aa5fe6a

Please sign in to comment.