diff --git a/src/doomdef.h b/src/doomdef.h index b09aaa415..51ff25076 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -356,6 +356,8 @@ typedef enum #define NEWTICRATERATIO 1 // try 4 for 140 fps :) #define NEWTICRATE (TICRATE*NEWTICRATERATIO) +#define MUSICRATE 1000 // sound timing is calculated by milliseconds + #define RING_DIST 512*FRACUNIT // how close you need to be to a ring to attract it #define PUSHACCEL (2*FRACUNIT) // Acceleration for MF2_SLIDEPUSH items. diff --git a/src/s_sound.c b/src/s_sound.c index de6a28f24..2126dfc07 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1394,6 +1394,11 @@ musictype_t S_MusicType(void) return I_SongType(); } +const char *S_MusicName(void) +{ + return music_name; +} + boolean S_MusicInfo(char *mname, UINT16 *mflags, boolean *looping) { if (!I_SongPlaying()) diff --git a/src/s_sound.h b/src/s_sound.h index d5323da3a..3cb05000b 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -20,9 +20,6 @@ #include "command.h" #include "tables.h" // angle_t -// sound timing is calculated by milliseconds -#define MUSICRATE 1000 - // mask used to indicate sound origin is player item pickup #define PICKUP_SOUND 0x8000 @@ -139,6 +136,7 @@ boolean S_MusicDisabled(void); boolean S_MusicPlaying(void); boolean S_MusicPaused(void); musictype_t S_MusicType(void); +const char *S_MusicName(void); boolean S_MusicInfo(char *mname, UINT16 *mflags, boolean *looping); boolean S_MusicExists(const char *mname, boolean checkMIDI, boolean checkDigi); #define S_DigExists(a) S_MusicExists(a, false, true)