Debug messages

This commit is contained in:
mazmazz 2018-08-20 08:47:41 -04:00
parent 18daf255ee
commit 17e2c3f5be
2 changed files with 12 additions and 1 deletions

View File

@ -1403,6 +1403,8 @@ void S_ChangeMusicWithFade(const char *mmusic, UINT16 mflags, boolean looping, U
return;
}
CONS_Debug(DBG_DETAILED, "Now playing song %s\n", newmusic);
if (digiexists && !nodigimusic && !digital_disabled) // digmusic?
{
if (prefadems && I_MusicType() != MU_MID) //have to queue post-fade // allow even if the music is the same

View File

@ -821,6 +821,12 @@ boolean I_StartDigSong(const char *musicname, boolean looping)
return true;
}
if (I_MusicType() == MU_MP3)
{
CONS_Debug(DBG_BASIC, "MP3 songs are unsupported and may crash! Use OGG instead.\n");
CONS_Debug(DBG_DETAILED, "MP3 songs are unsupported and may crash! Use OGG instead.\n");
}
// Find the OGG loop point.
is_looping = looping;
loop_point = 0.0f;
@ -928,6 +934,9 @@ boolean I_StartDigSong(const char *musicname, boolean looping)
}
}
if (!music_length && (I_MusicType() == MU_OGG || I_MusicType() == MU_MP3 || I_MusicType() == MU_FLAC))
CONS_Debug(DBG_DETAILED, "This song is missing a LENGTHMS= tag! Required to make seeking work properly.");
if (I_MusicType() != MU_MOD && Mix_PlayMusic(music, 0) == -1)
{
CONS_Alert(CONS_ERROR, "Mix_PlayMusic: %s\n", Mix_GetError());
@ -1040,7 +1049,7 @@ UINT32 I_GetMusicLength(void)
// SDL mixer can't read music length itself.
length = (UINT32)(music_length*1000);
if (!length)
CONS_Debug(DBG_BASIC, "Getting music length: music is missing LENGTHMS= in music tag.\n");
CONS_Debug(DBG_DETAILED, "Getting music length: music is missing LENGTHMS= tag. Needed for seeking.\n");
return length;
}
}