diff --git a/jail_audio.cpp b/jail_audio.cpp index c1d4002..0f29982 100644 --- a/jail_audio.cpp +++ b/jail_audio.cpp @@ -46,7 +46,7 @@ float JA_soundVolume[JA_MAX_GROUPS]; bool JA_musicEnabled { true }; bool JA_soundEnabled { true }; SDL_AudioDeviceID sdlAudioDevice { 0 }; -SDL_TimerID JA_timerID { 0 }; +//SDL_TimerID JA_timerID { 0 }; bool fading = false; int fade_start_time; @@ -54,7 +54,7 @@ int fade_duration; int fade_initial_volume; -Uint32 JA_UpdateCallback(void *userdata, SDL_TimerID timerID, Uint32 interval) +void JA_Update() { if (JA_musicEnabled && current_music && current_music->state == JA_MUSIC_PLAYING) { @@ -63,7 +63,7 @@ Uint32 JA_UpdateCallback(void *userdata, SDL_TimerID timerID, Uint32 interval) if (time > (fade_start_time+fade_duration)) { fading = false; JA_StopMusic(); - return 30; + return; } else { const int time_passed = time - fade_start_time; const float percent = (float)time_passed / (float)fade_duration; @@ -104,7 +104,7 @@ Uint32 JA_UpdateCallback(void *userdata, SDL_TimerID timerID, Uint32 interval) } - return 30; + return; } void JA_Init(const int freq, const SDL_AudioFormat format, const int num_channels) @@ -121,12 +121,12 @@ void JA_Init(const int freq, const SDL_AudioFormat format, const int num_channel for (int i=0; i