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 9b4f71aa..c7bb6c8d 100644
--- a/src/s_sound.c
+++ b/src/s_sound.c
@@ -136,6 +136,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:
@@ -154,6 +155,7 @@ static music_module_t *music_modules[] =
{
#ifdef FEATURE_SOUND
&music_sdl_module,
+ &music_opl_module,
#endif
NULL,
};
@@ -802,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);