diff --git a/src/common/SurgeSynthesizer.cpp b/src/common/SurgeSynthesizer.cpp index 77a2e93ba9d..a372f2d2d30 100644 --- a/src/common/SurgeSynthesizer.cpp +++ b/src/common/SurgeSynthesizer.cpp @@ -84,6 +84,13 @@ SurgeSynthesizer::SurgeSynthesizer(PluginLayer* parent) FBQ[1] = (QuadFilterChainState*)_aligned_malloc((MAX_VOICES >> 2) * sizeof(QuadFilterChainState), 16); + for(int i=0; i<(MAX_VOICES >> 2); ++i) + { + FBQ[0][i].initToZero(); + FBQ[1][i].initToZero(); + } + + SurgePatch& patch = storage.getPatch(); patch.polylimit.val.i = 8; diff --git a/src/common/dsp/QuadFilterChain.h b/src/common/dsp/QuadFilterChain.h index 163b7fbf251..d107e859449 100644 --- a/src/common/dsp/QuadFilterChain.h +++ b/src/common/dsp/QuadFilterChain.h @@ -14,6 +14,39 @@ struct QuadFilterChainState __m128 OutL, OutR, dOutL, dOutR; __m128 Out2L, Out2R, dOut2L, dOut2R; // fb_stereo only + + void initToZero() + { + Gain = _mm_setzero_ps(); + FB = _mm_setzero_ps(); + Mix1 = _mm_setzero_ps(); + Mix2 = _mm_setzero_ps(); + Drive = _mm_setzero_ps(); + dGain = _mm_setzero_ps(); + dFB = _mm_setzero_ps(); + dMix1 = _mm_setzero_ps(); + dMix2 = _mm_setzero_ps(); + dDrive = _mm_setzero_ps(); + + wsLPF = _mm_setzero_ps(); + FBlineL = _mm_setzero_ps(); + FBlineR = _mm_setzero_ps(); + + for(auto i=0; i