summaryrefslogtreecommitdiff
path: root/sounddsp
diff options
context:
space:
mode:
authorJames Cowgill <jcowgill@debian.org>2018-06-17 09:48:25 +0100
committerJames Cowgill <jcowgill@debian.org>2018-06-17 09:48:25 +0100
commit5dc6e89cb009da0ebe2a434f76db35414cd696ed (patch)
tree100f600b3db7a1a38a594b8fad9c7a5540eba116 /sounddsp
parentbec06ae5b9e0510f50f13e127be0f84ff529787d (diff)
New upstream version 0.3.10
Diffstat (limited to 'sounddsp')
-rw-r--r--sounddsp/Reverb.cpp11
-rw-r--r--sounddsp/Reverb.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/sounddsp/Reverb.cpp b/sounddsp/Reverb.cpp
index 89f2483..ce7817f 100644
--- a/sounddsp/Reverb.cpp
+++ b/sounddsp/Reverb.cpp
@@ -64,6 +64,8 @@ CReverbSettings::CReverbSettings()
CReverb::CReverb()
{
+ m_currentPreset = nullptr;
+
// Shared reverb state
InitMixBuffer(MixReverbBuffer, static_cast<uint32>(mpt::size(MixReverbBuffer)));
gnRvbROfsVol = 0;
@@ -326,18 +328,17 @@ void CReverb::Shutdown()
void CReverb::Initialize(bool bReset, uint32 MixingFreq)
{
if (m_Settings.m_nReverbType >= NUM_REVERBTYPES) m_Settings.m_nReverbType = 0;
- static SNDMIX_REVERB_PROPERTIES *spCurrentPreset = nullptr;
- SNDMIX_REVERB_PROPERTIES *pRvbPreset = &gRvbPresets[m_Settings.m_nReverbType].Preset;
+ const SNDMIX_REVERB_PROPERTIES *rvbPreset = &gRvbPresets[m_Settings.m_nReverbType].Preset;
- if ((pRvbPreset != spCurrentPreset) || (bReset))
+ if ((rvbPreset != m_currentPreset) || (bReset))
{
// Reverb output frequency is half of the dry output rate
float flOutputFrequency = (float)MixingFreq;
EnvironmentReverb rvb;
// Reset reverb parameters
- spCurrentPreset = pRvbPreset;
- I3dl2_to_Generic(pRvbPreset, &rvb, flOutputFrequency,
+ m_currentPreset = rvbPreset;
+ I3dl2_to_Generic(rvbPreset, &rvb, flOutputFrequency,
RVBMINREFDELAY, RVBMAXREFDELAY,
RVBMINRVBDELAY, RVBMAXRVBDELAY,
( RVBDIF1L_LEN + RVBDIF1R_LEN
diff --git a/sounddsp/Reverb.h b/sounddsp/Reverb.h
index d018a9d..1b4c08d 100644
--- a/sounddsp/Reverb.h
+++ b/sounddsp/Reverb.h
@@ -59,6 +59,8 @@ struct SWRvbRefDelay
LR16 RefOut[SNDMIX_REVERB_DELAY_MASK + 1]; // stereo output of reflections
};
+struct SNDMIX_REVERB_PROPERTIES;
+
// Late reverberation
// Tank diffusers lengths
@@ -145,6 +147,7 @@ public:
mixsample_t gnRvbROfsVol, gnRvbLOfsVol;
private:
+ const SNDMIX_REVERB_PROPERTIES *m_currentPreset;
uint32 gnReverbSend;