Add define wrappers for classic Doom in sound/OpenAL/AL_SoundHardware.cpp, similar to XAudio2

Also add MSVC 2019 Win10 OpenAL CMake batch file
This commit is contained in:
raynorpat 2021-05-25 18:38:49 -04:00
parent 447d11b1ee
commit e574c50526
2 changed files with 13 additions and 1 deletions

View file

@ -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

View file

@ -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 );