From 14996d930b92c13e477553a0bdae1d88896f44c7 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Thu, 24 Oct 2019 05:47:11 +0000 Subject: [PATCH] Prefer "MIDI driver" to "Music device" git-svn-id: https://svn.eduke32.com/eduke32@8258 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/duke3d/src/sounds_mapster32.cpp # source/sw/src/sounds.cpp --- source/duke3d/src/menus.cpp | 12 ++++++------ source/duke3d/src/sounds.cpp | 2 +- source/sw/src/sounds.cpp | 6 +++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 9ea14eed2..cdd8d974c 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -1165,22 +1165,22 @@ static MenuRangeInt32_t MEO_SOUND_NUMVOICES = MAKE_MENURANGE( &soundvoices, &MF_ static MenuEntry_t ME_SOUND_NUMVOICES = MAKE_MENUENTRY( "Voices:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_NUMVOICES, RangeInt32 ); #endif -static char const *MEOSN_SOUND_MUSICDEVICE[] = { +static char const *MEOSN_SOUND_MIDIDRIVER[] = { "OPL3", #ifdef _WIN32 "Windows", #endif }; -static int32_t MEOSV_SOUND_MUSICDEVICE[] = { +static int32_t MEOSV_SOUND_MIDIDRIVER[] = { ASS_OPL3, #ifdef _WIN32 ASS_WinMM, #endif }; -static MenuOptionSet_t MEOS_SOUND_MUSICDEVICE = MAKE_MENUOPTIONSET( MEOSN_SOUND_MUSICDEVICE, MEOSV_SOUND_MUSICDEVICE, 0x2 ); -static MenuOption_t MEO_SOUND_MUSICDEVICE = MAKE_MENUOPTION( &MF_Redfont, &MEOS_SOUND_MUSICDEVICE, &musicdevice ); -static MenuEntry_t ME_SOUND_MUSICDEVICE = MAKE_MENUENTRY( "Music device:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_MUSICDEVICE, Option ); +static MenuOptionSet_t MEOS_SOUND_MIDIDRIVER = MAKE_MENUOPTIONSET( MEOSN_SOUND_MIDIDRIVER, MEOSV_SOUND_MIDIDRIVER, 0x2 ); +static MenuOption_t MEO_SOUND_MIDIDRIVER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_SOUND_MIDIDRIVER, &musicdevice ); +static MenuEntry_t ME_SOUND_MIDIDRIVER = MAKE_MENUENTRY( "MIDI driver:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_MIDIDRIVER, Option ); static MenuEntry_t ME_SOUND_RESTART = MAKE_MENUENTRY( "Apply Changes", &MF_Redfont, &MEF_BigOptions_Apply, &MEO_NULL, Link ); @@ -1207,7 +1207,7 @@ static MenuEntry_t *MEL_ADVSOUND[] = { &ME_SOUND_NUMVOICES, &ME_Space2_Redfont, #endif - &ME_SOUND_MUSICDEVICE, + &ME_SOUND_MIDIDRIVER, &ME_SOUND_RESTART, }; diff --git a/source/duke3d/src/sounds.cpp b/source/duke3d/src/sounds.cpp index 48c8f2c24..ef75f2b3b 100644 --- a/source/duke3d/src/sounds.cpp +++ b/source/duke3d/src/sounds.cpp @@ -113,7 +113,7 @@ void S_SoundShutdown(void) void S_MusicStartup(void) { - initprintf("Initializing music... "); + initprintf("Initializing MIDI driver... "); if (MUSIC_Init(ud.config.MusicDevice) == MUSIC_Ok || MUSIC_Init(0) == MUSIC_Ok || MUSIC_Init(1) == MUSIC_Ok) { diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 23e88eb19..c22406f71 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -1130,7 +1130,9 @@ SoundStartup(void) //snd_enabled = TRUE; - status = FX_Init(snd_numvoices, snd_numchannels, snd_mixrate, initdata); + + + status = FX_Init(NumVoices, NumChannels, MixRate, initdata); if (status == FX_Ok) { FxInitialized = TRUE; @@ -1197,6 +1199,8 @@ void MusicStartup(void) { // if they chose None lets return + buildprintf("Initializing MIDI driver... "); + if (MUSIC_Init(MusicDevice) == MUSIC_Ok || MUSIC_Init(0) == MUSIC_Ok || MUSIC_Init(1) == MUSIC_Ok) { MusicInitialized = TRUE;