mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
- fixed CD music playback in SW on maps with no MIDI defined.
This commit is contained in:
parent
67b5cd2cb3
commit
1054356cef
1 changed files with 2 additions and 6 deletions
|
@ -924,19 +924,15 @@ extern short Level;
|
||||||
|
|
||||||
SWBOOL PlaySong(const char* mapname, const char* song_file_name, int cdaudio_track, bool isThemeTrack) //(nullptr, nullptr, -1, false) starts the normal level music.
|
SWBOOL PlaySong(const char* mapname, const char* song_file_name, int cdaudio_track, bool isThemeTrack) //(nullptr, nullptr, -1, false) starts the normal level music.
|
||||||
{
|
{
|
||||||
if (mapname == nullptr && song_file_name == nullptr && cdaudio_track == -1)
|
|
||||||
{
|
|
||||||
// Get the music defined for the current level.
|
|
||||||
|
|
||||||
}
|
|
||||||
// Play CD audio if enabled.
|
// Play CD audio if enabled.
|
||||||
if (cdaudio_track >= 0 && mus_redbook)
|
if (cdaudio_track >= 0 && (mus_redbook || *song_file_name == 0))
|
||||||
{
|
{
|
||||||
FStringf trackname("track%02d.ogg", cdaudio_track);
|
FStringf trackname("track%02d.ogg", cdaudio_track);
|
||||||
if (!Mus_Play(mapname, trackname, true))
|
if (!Mus_Play(mapname, trackname, true))
|
||||||
{
|
{
|
||||||
buildprintf("Can't find CD track %i!\n", cdaudio_track);
|
buildprintf("Can't find CD track %i!\n", cdaudio_track);
|
||||||
}
|
}
|
||||||
|
else return true;
|
||||||
}
|
}
|
||||||
if (!Mus_Play(mapname, song_file_name, true))
|
if (!Mus_Play(mapname, song_file_name, true))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue