Subversion Repositories Kolibri OS

Rev

Rev 8645 | Rev 9213 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8645 Rev 9097
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;
Line -... Line 72...
-
 
72
#endif
-
 
73
 
-
 
74
#ifdef _KOLIBRI
-
 
75
    extern void      uSDL_Delay(unsigned int time);
-
 
76
    extern unsigned  uSDL_GetTicks(); 
-
 
77
#else
-
 
78
    #define uSDL_Delay SDL_Delay
Line 72... Line 79...
72
#endif
79
    #define  uSDL_GetTicks SDL_GetTicks
73
 
80
#endif
74
 
81
 
75
int volatile music_active = 1;
82
int volatile music_active = 1;
Line 759... Line 766...
759
		SDL_LockAudio();
766
		SDL_LockAudio();
760
		if ( music == music_playing ) {
767
		if ( music == music_playing ) {
761
			/* Wait for any fade out to finish */
768
			/* Wait for any fade out to finish */
762
			while ( music->fading == MIX_FADING_OUT ) {
769
			while ( music->fading == MIX_FADING_OUT ) {
763
				SDL_UnlockAudio();
770
				SDL_UnlockAudio();
764
				SDL_Delay(100);
771
				uSDL_Delay(100);
765
				SDL_LockAudio();
772
				SDL_LockAudio();
766
			}
773
			}
767
			if ( music == music_playing ) {
774
			if ( music == music_playing ) {
768
				music_internal_halt();
775
				music_internal_halt();
769
			}
776
			}
Line 1011... Line 1018...
1011
	/* Play the puppy */
1018
	/* Play the puppy */
1012
	SDL_LockAudio();
1019
	SDL_LockAudio();
1013
	/* If the current music is fading out, wait for the fade to complete */
1020
	/* If the current music is fading out, wait for the fade to complete */
1014
	while ( music_playing && (music_playing->fading == MIX_FADING_OUT) ) {
1021
	while ( music_playing && (music_playing->fading == MIX_FADING_OUT) ) {
1015
		SDL_UnlockAudio();
1022
		SDL_UnlockAudio();
1016
		SDL_Delay(100);
1023
		uSDL_Delay(100);
1017
		SDL_LockAudio();
1024
		SDL_LockAudio();
1018
	}
1025
	}
1019
	music_active = 1;
1026
	music_active = 1;
1020
	if (loops == 1) {
1027
	if (loops == 1) {
1021
		/* Loop is the number of times to play the audio */
1028
		/* Loop is the number of times to play the audio */