From e574c50526c31cac268094445d35416f1d557639 Mon Sep 17 00:00:00 2001 From: raynorpat Date: Tue, 25 May 2021 18:38:49 -0400 Subject: [PATCH] Add define wrappers for classic Doom in sound/OpenAL/AL_SoundHardware.cpp, similar to XAudio2 Also add MSVC 2019 Win10 OpenAL CMake batch file --- neo/cmake-vs2019-64bit-windows10-openal.bat | 6 ++++++ neo/sound/OpenAL/AL_SoundHardware.cpp | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 neo/cmake-vs2019-64bit-windows10-openal.bat diff --git a/neo/cmake-vs2019-64bit-windows10-openal.bat b/neo/cmake-vs2019-64bit-windows10-openal.bat new file mode 100644 index 00000000..e84d5857 --- /dev/null +++ b/neo/cmake-vs2019-64bit-windows10-openal.bat @@ -0,0 +1,6 @@ +cd .. +del /s /q build +mkdir build +cd build +cmake -G "Visual Studio 16" -A x64 -DWINDOWS10=ON -DUSE_OPENAL=ON ../neo +pause \ No newline at end of file diff --git a/neo/sound/OpenAL/AL_SoundHardware.cpp b/neo/sound/OpenAL/AL_SoundHardware.cpp index ac03c56d..23c929df 100644 --- a/neo/sound/OpenAL/AL_SoundHardware.cpp +++ b/neo/sound/OpenAL/AL_SoundHardware.cpp @@ -30,7 +30,9 @@ If you have questions concerning this license or the applicable additional terms #pragma hdrstop #include "precompiled.h" #include "../snd_local.h" -#include "../../../doomclassic/doom/i_sound.h" +#if defined(USE_DOOMCLASSIC) + #include "../../../doomclassic/doom/i_sound.h" +#endif idCVar s_showLevelMeter( "s_showLevelMeter", "0", CVAR_BOOL | CVAR_ARCHIVE, "Show VU meter" ); idCVar s_meterTopTime( "s_meterTopTime", "1000", CVAR_INTEGER | CVAR_ARCHIVE, "How long (in milliseconds) peaks are displayed on the VU meter" ); @@ -198,10 +200,12 @@ void idSoundHardware_OpenAL::Init() //idSoundVoice::InitSurround( outputChannels, channelMask ); +#if defined(USE_DOOMCLASSIC) // --------------------- // Initialize the Doom classic sound system. // --------------------- I_InitSoundHardware( voices.Max(), 0 ); +#endif // --------------------- // Create VU Meter Effect @@ -280,10 +284,12 @@ void idSoundHardware_OpenAL::Shutdown() freeVoices.Clear(); zombieVoices.Clear(); +#if defined(USE_DOOMCLASSIC) // --------------------- // Shutdown the Doom classic sound system. // --------------------- I_ShutdownSoundHardware(); +#endif alcMakeContextCurrent( NULL );