Add Music_FadeOutDuration

This commit is contained in:
James R 2023-12-29 04:26:05 -08:00
parent fed42c4cd6
commit 8855486864
2 changed files with 10 additions and 0 deletions

View file

@ -347,6 +347,12 @@ tic_t Music_TotalDuration(const char* id)
return tune ? tune->duration() : 0u;
}
unsigned int Music_FadeOutDuration(const char* id)
{
const Tune* tune = g_tunes.find(id);
return tune ? tune->fade_out : 0;
}
void Music_Loop(const char* id, boolean loop)
{
Tune* tune = g_tunes.find(id);

View file

@ -137,6 +137,10 @@ tic_t Music_DurationLeft(const char *id);
// Returns the total duration of the tune, in tics.
tic_t Music_TotalDuration(const char *id);
// Returns the number of milliseconds a tune is configured to
// fade for.
unsigned int Music_FadeOutDuration(const char *id);
// Returns the song name mapped to a tune.
const char *Music_Song(const char *id);