Browse Source

Fix a weird&stupid crash with 3bandeq/splitter on windows

tags/1.9.6
falkTX 9 years ago
parent
commit
eafdc0362d
2 changed files with 12 additions and 0 deletions
  1. +6
    -0
      source/native-plugins/distrho-3bandeq/DistrhoPlugin3BandEQ.cpp
  2. +6
    -0
      source/native-plugins/distrho-3bandsplitter/DistrhoPlugin3BandSplitter.cpp

+ 6
- 0
source/native-plugins/distrho-3bandeq/DistrhoPlugin3BandEQ.cpp View File

@@ -208,6 +208,12 @@ void DistrhoPlugin3BandEQ::d_activate()
const float sr = (float)d_getSampleRate(); const float sr = (float)d_getSampleRate();
xLP = std::exp(-2.0f * kPI * freqLP / sr); xLP = std::exp(-2.0f * kPI * freqLP / sr);
#ifdef DISTRHO_OS_WINDOWS
// don't ask me why, but this fixes a crash/exception below on windows...
printf("%f\n", -xLP);
#endif
a0LP = 1.0f - xLP; a0LP = 1.0f - xLP;
b1LP = -xLP; b1LP = -xLP;


+ 6
- 0
source/native-plugins/distrho-3bandsplitter/DistrhoPlugin3BandSplitter.cpp View File

@@ -208,6 +208,12 @@ void DistrhoPlugin3BandSplitter::d_activate()
const float sr = (float)d_getSampleRate(); const float sr = (float)d_getSampleRate();
xLP = std::exp(-2.0f * kPI * freqLP / sr); xLP = std::exp(-2.0f * kPI * freqLP / sr);
#ifdef DISTRHO_OS_WINDOWS
// don't ask me why, but this fixes a crash/exception below on windows...
printf("%f\n", -xLP);
#endif
a0LP = 1.0f - xLP; a0LP = 1.0f - xLP;
b1LP = -xLP; b1LP = -xLP;


Loading…
Cancel
Save