- set up some basic reverb.

I'm not sure if this is working out as the original "reverb" was just too crappy and generic. It may be best to just disable it.
This commit is contained in:
Christoph Oelckers 2019-12-22 17:43:39 +01:00
parent 417d425f27
commit 3914eb5f85
3 changed files with 18 additions and 5 deletions

View file

@ -2366,5 +2366,4 @@ void I_BuildALResamplersList(FOptionValues* opt)
#endif
}
#endif // NO_OPENAL

View file

@ -39,6 +39,7 @@
#include "s_soundinternal.h"
#include "m_swap.h"
#include "superfasthash.h"
#include "c_cvars.h"
#ifdef _WIN32
#undef DrawText
@ -1725,6 +1726,22 @@ void SoundEngine::AddRandomSound(int Owner, TArray<uint32_t> list)
S_sfx[Owner].NearLimit = -1;
}
extern ReverbContainer* ForcedEnvironment;
CVAR(Bool, snd_reverb, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
void FX_SetReverb(int strength)
{
if (snd_reverb)
{
// todo: optimize environments. The original "reverb" was garbage and not usable as reference.
if (strength < 64) strength = 0x1400;
else if (strength < 192) strength = 0x1500;
else strength = 0x1900;
ForcedEnvironment = S_FindEnvironment(strength);
}
}
#include "basics.h"
#include "stats.h"
#include "v_text.h"

View file

@ -430,10 +430,7 @@ inline void FX_StopAllSounds(void)
soundEngine->StopAllChannels();
}
inline void FX_SetReverb(int strength)
{
// todo: investigate how this works and set a proper environment.
}
void FX_SetReverb(int strength);
inline void FX_SetReverbDelay(int delay)
{