X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sound.c;h=81a0a8d7b54f00211c5524f08f95136ffe993cab;hb=eac69717338922e6bb55076e57d7674080291fe9;hp=55985fce4fe394af96cb386e365e4f31f4f5c1f0;hpb=2823a4c8196a02da86ee180cf55586d4e8c91a2f;p=gpsp.git diff --git a/sound.c b/sound.c index 55985fc..81a0a8d 100644 --- a/sound.c +++ b/sound.c @@ -25,11 +25,7 @@ u32 global_enable_audio = 1; direct_sound_struct direct_sound_channel[2]; gbc_sound_struct gbc_sound_channel[4]; -#if defined(GP2X_BUILD) || defined(TAVI_BUILD) u32 sound_frequency = 44100; -#else -u32 sound_frequency = 44100; -#endif SDL_AudioSpec sound_settings; SDL_mutex *sound_mutex; @@ -579,13 +575,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() \