race condition fix from 2007 (gpsp09-2xb_1)

This commit is contained in:
notaz 2009-05-21 18:36:58 +03:00 committed by notaz
parent 5da9148dd1
commit e9c7b1376a
1 changed files with 4 additions and 4 deletions

View File

@ -579,13 +579,13 @@ void update_gbc_sound(u32 cpu_ticks)
address16(io_registers, 0x84) = sound_status;
SDL_CondSignal(sound_cv);
SDL_UnlockMutex(sound_mutex);
gbc_sound_last_cpu_ticks = cpu_ticks;
gbc_sound_buffer_index =
(gbc_sound_buffer_index + (buffer_ticks * 2)) % BUFFER_SIZE;
SDL_UnlockMutex(sound_mutex);
SDL_CondSignal(sound_cv);
}
#define sound_copy_normal() \