Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 2706 -- Mix_PlayMusic broken logic when loop > 1
Peter Kosyh This code in Mix_FadeInMusicPos ---------- if (loops == 1) { /* Loop is the number of times to play the audio */ loops = 0; } ----------- and music_halt_or_loop: ----------- if (music_loops) { Mix_Fading current_fade; if (music_loops > 0) { --music_loops; } current_fade = music_playing->fading; music_internal_play(music_playing, 0.0); music_playing->fading = current_fade; } ----------- makes loop parameter very strange. Mix_PlayMusic(x, 1) -> will play 1 time Mix_PlayMusic(x, 2) -> will play 3 time Mix_PlayMusic(x, n) -> will play n+1 time Can you tell me if it is bug or i will make workaround in my application? May be right fix would be: if (loops > 0) { /* Loop is the number of times to play the audio */ loops = loops - 1; }
- Loading branch information