Skip to content
Snippets Groups Projects
Commit 44557d9c authored by Marco Z's avatar Marco Z
Browse files

I_MusicPlaying, I_MusicPaused other targets

(cherry picked from commit d5ec3881)
parent 011a043d
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,16 @@ musictype_t I_GetMusicType(void)
return MU_NONE;
}
boolean I_MusicPlaying(void)
{
return false;
}
boolean I_MusicPaused(void)
{
return false;
}
void I_InitMusic(void){}
void I_ShutdownMusic(void){}
......
......@@ -321,6 +321,7 @@ static MIDI* currsong; //im assuming only 1 song will be played at once
static int islooping=0;
static int musicdies=-1;
UINT8 music_started=0;
boolean songpaused=false;
musictype_t I_GetMusicType(void)
{
......@@ -330,6 +331,16 @@ musictype_t I_GetMusicType(void)
return MU_NONE;
}
boolean I_MusicPlaying()
{
return (boolean)currsong;
}
boolean I_MusicPaused()
{
return songpaused;
}
/* load_midi_mem:
* Loads a standard MIDI file from memory, returning a pointer to
* a MIDI structure, * or NULL on error.
......@@ -403,6 +414,7 @@ void I_InitMusic(void)
I_AddExitFunc(I_ShutdownMusic);
music_started = true;
songpaused = false;
}
void I_ShutdownMusic(void)
......@@ -433,8 +445,8 @@ void I_PauseSong (INT32 handle)
handle = 0;
if (nomidimusic)
return;
midi_pause();
songpaused = true;
}
void I_ResumeSong (INT32 handle)
......@@ -442,8 +454,8 @@ void I_ResumeSong (INT32 handle)
handle = 0;
if (nomidimusic)
return;
midi_resume();
songpaused = false;
}
void I_StopSong(void)
......@@ -455,6 +467,7 @@ void I_StopSong(void)
islooping = 0;
musicdies = 0;
stop_midi();
songpaused = false;
}
// Is the song playing?
......
......@@ -66,6 +66,16 @@ musictype_t I_GetMusicType(void)
return MU_NONE;
}
boolean I_MusicPlaying(void)
{
return false;
}
boolean I_MusicPaused(void)
{
return false;
}
void I_InitMusic(void){}
void I_ShutdownMusic(void){}
......
......@@ -1336,6 +1336,16 @@ musictype_t I_GetMusicType(void)
#endif
}
boolean I_MusicPlaying(void)
{
return music_started;
}
boolean I_MusicPaused(void)
{
return Mix_PausedMusic();
}
#ifdef HAVE_LIBGME
static void I_ShutdownGMEMusic(void)
{
......
......@@ -478,6 +478,19 @@ musictype_t I_GetMusicType(void)
return MU_NONE;
}
boolean I_MusicPlaying(void)
{
return (boolean)music_stream;
}
boolean I_MusicPaused(void)
{
boolean fmpaused = false;
if (music_stream)
FMOD_Channel_GetPaused(music_channel, &fmpaused);
return fmpaused;
}
void I_InitMusic(void)
{
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment