summaryrefslogtreecommitdiff
path: root/src/s_sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/s_sound.c')
-rw-r--r--src/s_sound.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/s_sound.c b/src/s_sound.c
index 1c56efb2..6c18f65e 100644
--- a/src/s_sound.c
+++ b/src/s_sound.c
@@ -128,6 +128,7 @@ int snd_sfxdevice = SNDDEVICE_SB;
extern sound_module_t sound_sdl_module;
extern sound_module_t sound_pcsound_module;
extern music_module_t music_sdl_module;
+extern music_module_t music_opl_module;
// Compiled-in sound modules:
@@ -146,6 +147,7 @@ static music_module_t *music_modules[] =
{
#ifdef FEATURE_SOUND
&music_sdl_module,
+ &music_opl_module,
#endif
NULL,
};
@@ -794,6 +796,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);