Rev 9213 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9213 | Rev 9790 | ||
---|---|---|---|
Line 68... | Line 68... | ||
68 | #endif |
68 | #endif |
Line 69... | Line 69... | ||
69 | 69 | ||
70 | #if defined(MP3_MUSIC) || defined(MP3_MAD_MUSIC) |
70 | #if defined(MP3_MUSIC) || defined(MP3_MAD_MUSIC) |
71 | static SDL_AudioSpec used_mixer; |
71 | static SDL_AudioSpec used_mixer; |
72 | #endif |
72 | #endif |
73 | unsigned uSDL_GetTicks(); |
- | |
74 | - | ||
75 | #define uSDL_Delay SDL_Delay |
- | |
Line 76... | Line 73... | ||
76 | #define uSDL_GetTicks SDL_GetTicks |
73 | unsigned SDL_GetTicks(); |
77 | 74 | ||
78 | int volatile music_active = 1; |
75 | int volatile music_active = 1; |
79 | static int volatile music_stopped = 0; |
76 | static int volatile music_stopped = 0; |
Line 762... | Line 759... | ||
762 | SDL_LockAudio(); |
759 | SDL_LockAudio(); |
763 | if ( music == music_playing ) { |
760 | if ( music == music_playing ) { |
764 | /* Wait for any fade out to finish */ |
761 | /* Wait for any fade out to finish */ |
765 | while ( music->fading == MIX_FADING_OUT ) { |
762 | while ( music->fading == MIX_FADING_OUT ) { |
766 | SDL_UnlockAudio(); |
763 | SDL_UnlockAudio(); |
767 | uSDL_Delay(100); |
764 | SDL_Delay(100); |
768 | SDL_LockAudio(); |
765 | SDL_LockAudio(); |
769 | } |
766 | } |
770 | if ( music == music_playing ) { |
767 | if ( music == music_playing ) { |
771 | music_internal_halt(); |
768 | music_internal_halt(); |
772 | } |
769 | } |
Line 1014... | Line 1011... | ||
1014 | /* Play the puppy */ |
1011 | /* Play the puppy */ |
1015 | SDL_LockAudio(); |
1012 | SDL_LockAudio(); |
1016 | /* If the current music is fading out, wait for the fade to complete */ |
1013 | /* If the current music is fading out, wait for the fade to complete */ |
1017 | while ( music_playing && (music_playing->fading == MIX_FADING_OUT) ) { |
1014 | while ( music_playing && (music_playing->fading == MIX_FADING_OUT) ) { |
1018 | SDL_UnlockAudio(); |
1015 | SDL_UnlockAudio(); |
1019 | uSDL_Delay(100); |
1016 | SDL_Delay(100); |
1020 | SDL_LockAudio(); |
1017 | SDL_LockAudio(); |
1021 | } |
1018 | } |
1022 | music_active = 1; |
1019 | music_active = 1; |
1023 | if (loops == 1) { |
1020 | if (loops == 1) { |
1024 | /* Loop is the number of times to play the audio */ |
1021 | /* Loop is the number of times to play the audio */ |