From 7e2eaa105e270586e81c04fdf61bcafd7c96a34c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 13 Sep 2009 00:15:24 +0000 Subject: Change intro/introa fix to be more accurate: Doom uses d_intro, but transforms this to d_introa when using OPL playback (thanks entryway) Subversion-branch: /branches/opl-branch Subversion-revision: 1672 --- src/d_main.c | 2 +- src/s_sound.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/d_main.c b/src/d_main.c index 46dd19ac..c59a8fb7 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -521,7 +521,7 @@ void D_DoAdvanceDemo (void) if ( gamemode == commercial ) S_StartMusic(mus_dm2ttl); else - S_StartMusic (mus_introa); + S_StartMusic (mus_intro); break; case 1: G_DeferedPlayDemo(DEH_String("demo1")); diff --git a/src/s_sound.c b/src/s_sound.c index f038e9cd..9e70ec73 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -804,6 +804,15 @@ void S_ChangeMusic(int musicnum, int looping) char namebuf[9]; void *handle; + // The Doom IWAD file has two versions of the intro music: d_intro + // and d_introa. The latter is used for OPL playback. + + if (musicnum == mus_intro && (snd_musicdevice == SNDDEVICE_ADLIB + || snd_musicdevice == SNDDEVICE_SB)) + { + musicnum = mus_introa; + } + if (musicnum <= mus_None || musicnum >= NUMMUSIC) { I_Error("Bad music number %d", musicnum); -- cgit v1.2.3