diff options
author | notaz | 2009-05-21 18:36:58 +0300 |
---|---|---|
committer | notaz | 2009-05-21 18:49:42 +0300 |
commit | e9c7b1376a93375f3ebbc5b58c9b69c065b17060 (patch) | |
tree | 686fa947b57a6deecac1106b1554a63103163a4d | |
parent | 5da9148dd11760c74db86d316d39ca329f8df24f (diff) | |
download | picogpsp-e9c7b1376a93375f3ebbc5b58c9b69c065b17060.tar.gz picogpsp-e9c7b1376a93375f3ebbc5b58c9b69c065b17060.tar.bz2 picogpsp-e9c7b1376a93375f3ebbc5b58c9b69c065b17060.zip |
race condition fix from 2007 (gpsp09-2xb_1)
-rw-r--r-- | sound.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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() \ |