mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@646 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bda7764beb
commit
5d1abf26a8
1 changed files with 8 additions and 15 deletions
|
@ -70,7 +70,6 @@ static int music_initialized = 0;
|
||||||
static int music_context = 0;
|
static int music_context = 0;
|
||||||
static int music_loopflag = MUSIC_PlayOnce;
|
static int music_loopflag = MUSIC_PlayOnce;
|
||||||
static Mix_Music *music_musicchunk = NULL;
|
static Mix_Music *music_musicchunk = NULL;
|
||||||
static SDL_RWops *music_rw = NULL;
|
|
||||||
static char *music_songdata = NULL;
|
static char *music_songdata = NULL;
|
||||||
|
|
||||||
// This gets called all over the place for information and debugging messages.
|
// This gets called all over the place for information and debugging messages.
|
||||||
|
@ -286,13 +285,10 @@ int MUSIC_StopSong(void)
|
||||||
|
|
||||||
if (music_musicchunk)
|
if (music_musicchunk)
|
||||||
Mix_FreeMusic(music_musicchunk);
|
Mix_FreeMusic(music_musicchunk);
|
||||||
/* if (music_rw)
|
|
||||||
SDL_FreeRW (music_rw); */
|
|
||||||
if (music_songdata)
|
if (music_songdata)
|
||||||
Bfree (music_songdata);
|
Bfree (music_songdata);
|
||||||
|
|
||||||
music_musicchunk = NULL;
|
music_musicchunk = NULL;
|
||||||
music_rw = NULL;
|
|
||||||
music_songdata = NULL;
|
music_songdata = NULL;
|
||||||
|
|
||||||
return(MUSIC_Ok);
|
return(MUSIC_Ok);
|
||||||
|
@ -323,7 +319,7 @@ void PlayMusic(char *_filename)
|
||||||
return;
|
return;
|
||||||
} // if
|
} // if
|
||||||
|
|
||||||
music_songdata = malloc(size);
|
music_songdata = Bcalloc(size,sizeof(char));
|
||||||
if (music_songdata == NULL)
|
if (music_songdata == NULL)
|
||||||
{
|
{
|
||||||
kclose(handle);
|
kclose(handle);
|
||||||
|
@ -339,9 +335,7 @@ void PlayMusic(char *_filename)
|
||||||
return;
|
return;
|
||||||
} // if
|
} // if
|
||||||
|
|
||||||
{
|
music_musicchunk = Mix_LoadMUS_RW(SDL_RWFromMem((char *) music_songdata, size));
|
||||||
music_rw = SDL_RWFromMem((void *) music_songdata, size);
|
|
||||||
music_musicchunk = Mix_LoadMUS_RW(music_rw);
|
|
||||||
|
|
||||||
if (music_musicchunk != NULL)
|
if (music_musicchunk != NULL)
|
||||||
{
|
{
|
||||||
|
@ -350,7 +344,6 @@ void PlayMusic(char *_filename)
|
||||||
Mix_PlayMusic(music_musicchunk, -1);
|
Mix_PlayMusic(music_musicchunk, -1);
|
||||||
} // if
|
} // if
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_SetContext(int context)
|
void MUSIC_SetContext(int context)
|
||||||
|
|
Loading…
Reference in a new issue