From 55744eff097e331c2efd79b82f32bf4a92e6f596 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Thu, 24 Oct 2019 05:47:06 +0000 Subject: [PATCH] Remove second EMIDICard / ForceEMIDI parameter from MUSIC_Init which only served to clobber the value entered using the cvar git-svn-id: https://svn.eduke32.com/eduke32@8257 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/audiolib/include/music.h | 2 +- source/audiolib/src/music.cpp | 3 +-- source/sw/src/sounds.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/audiolib/include/music.h b/source/audiolib/include/music.h index b75d2da2f..0fe4b03a5 100644 --- a/source/audiolib/include/music.h +++ b/source/audiolib/include/music.h @@ -61,7 +61,7 @@ typedef struct extern const char *MUSIC_ErrorString(int ErrorNumber); -int MUSIC_Init(int SoundCard, int ForceEMIDI = -1); +int MUSIC_Init(int SoundCard); int MUSIC_Shutdown(void); void MUSIC_SetVolume(int volume); int MUSIC_GetVolume(void); diff --git a/source/audiolib/src/music.cpp b/source/audiolib/src/music.cpp index 0c68144b4..c0c4f03f2 100644 --- a/source/audiolib/src/music.cpp +++ b/source/audiolib/src/music.cpp @@ -52,7 +52,7 @@ const char *MUSIC_ErrorString(int ErrorNumber) } -int MUSIC_Init(int SoundCard, int EMIDICard /*= -1*/) +int MUSIC_Init(int SoundCard) { int detected = 0; @@ -82,7 +82,6 @@ failed: } ASS_MIDISoundDriver = SoundCard; - ASS_EMIDICard = EMIDICard; int status = SoundDriver_MIDI_Init(&MUSIC_MidiFunctions); diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 9acf8c351..23e88eb19 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -1197,7 +1197,7 @@ void MusicStartup(void) { // if they chose None lets return - if (MUSIC_Init(0, 0) == MUSIC_Ok || MUSIC_Init(1, 0) == MUSIC_Ok) + if (MUSIC_Init(MusicDevice) == MUSIC_Ok || MUSIC_Init(0) == MUSIC_Ok || MUSIC_Init(1) == MUSIC_Ok) { MusicInitialized = TRUE; MUSIC_SetVolume(mus_volume);