Skip to content

Commit

Permalink
Merge pull request #156 from michaelwillis/denormal-protection
Browse files Browse the repository at this point in the history
Denormal Protection
  • Loading branch information
michaelwillis committed Apr 3, 2023
2 parents 1771d76 + b323bef commit 6da3cce
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common/DragonflyVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

#define MAJOR_VERSION 3
#define MINOR_VERSION 2
#define PATCH_VERSION 8
#define PATCH_VERSION 9
#define VERSION_SUFFIX ""
2 changes: 1 addition & 1 deletion dpf
Submodule dpf updated 92 files
+11 −6 .github/workflows/cmake.yml
+7 −2 .github/workflows/example-plugins.yml
+1 −1 .github/workflows/makefile.yml
+16 −5 CMakeLists.txt
+77 −16 Makefile.base.mk
+195 −87 Makefile.plugins.mk
+90 −46 cmake/DPF-plugin.cmake
+5 −0 dgl/Color.hpp
+1 −1 dgl/EventHandlers.hpp
+89 −81 dgl/Makefile
+4 −2 dgl/src/ApplicationPrivateData.cpp
+9 −0 dgl/src/Color.cpp
+1 −1 dgl/src/EventHandlers.cpp
+17 −5 dgl/src/ImageBaseWidgets.cpp
+1 −11 dgl/src/OpenGL.cpp
+0 −492 dgl/src/pugl-custom/pugl.h
+0 −441 dgl/src/pugl-custom/pugl_haiku.cpp
+0 −263 dgl/src/pugl-custom/pugl_internal.h
+0 −974 dgl/src/pugl-custom/pugl_osx.m
+0 −565 dgl/src/pugl-custom/pugl_win.cpp
+0 −739 dgl/src/pugl-custom/pugl_x11.c
+0 −29 dgl/src/pugl-extra/extras.c
+0 −50 dgl/src/pugl-extra/extras.h
+342 −21 dgl/src/pugl-extra/haiku.cpp
+12 −22 dgl/src/pugl-extra/haiku.h
+87 −0 dgl/src/pugl-extra/haiku_gl.cpp
+24 −0 dgl/src/pugl-extra/haiku_stub.cpp
+0 −48 dgl/src/pugl-extra/mac.m
+1,141 −0 dgl/src/pugl-extra/wasm.c
+45 −0 dgl/src/pugl-extra/wasm.h
+228 −0 dgl/src/pugl-extra/wasm_gl.c
+24 −0 dgl/src/pugl-extra/wasm_stub.c
+0 −118 dgl/src/pugl-extra/win.c
+0 −111 dgl/src/pugl-extra/x11.c
+1 −1 dgl/src/pugl-upstream
+39 −15 dgl/src/pugl.cpp
+5 −1 dgl/src/pugl.hpp
+1,026 −0 distrho/DistrhoDetails.hpp
+2 −913 distrho/DistrhoPlugin.hpp
+2 −1 distrho/DistrhoUI.hpp
+4 −0 distrho/DistrhoUIMain.cpp
+1 −0 distrho/DistrhoUI_macOS.mm
+10 −11 distrho/DistrhoUtils.hpp
+3 −3 distrho/extra/FileBrowserDialogImpl.hpp
+1 −1 distrho/extra/LeakDetector.hpp
+112 −0 distrho/extra/ScopedDenormalDisable.hpp
+15 −1 distrho/extra/String.hpp
+35 −29 distrho/extra/Thread.hpp
+1 −1 distrho/src/DistrhoPlugin.cpp
+43 −46 distrho/src/DistrhoPluginCLAP.cpp
+5 −1 distrho/src/DistrhoPluginChecks.h
+11 −2 distrho/src/DistrhoPluginInternal.hpp
+35 −19 distrho/src/DistrhoPluginJACK.cpp
+5 −3 distrho/src/DistrhoPluginLV2.cpp
+352 −14 distrho/src/DistrhoPluginLV2export.cpp
+19 −19 distrho/src/DistrhoPluginVST2.cpp
+37 −29 distrho/src/DistrhoPluginVST3.cpp
+2 −1 distrho/src/DistrhoUI.cpp
+3 −2 distrho/src/DistrhoUIInternal.hpp
+224 −13 distrho/src/DistrhoUILV2.cpp
+54 −35 distrho/src/DistrhoUIPrivateData.hpp
+1 −1 distrho/src/DistrhoUIVST3.cpp
+10 −9 distrho/src/DistrhoUtils.cpp
+20 −1 distrho/src/jackbridge/JackBridge.cpp
+2 −1 distrho/src/jackbridge/JackBridge.hpp
+63 −34 distrho/src/jackbridge/NativeBridge.hpp
+35 −19 distrho/src/jackbridge/RtAudioBridge.hpp
+44 −29 distrho/src/jackbridge/SDL2Bridge.hpp
+34 −14 distrho/src/jackbridge/WebBridge.hpp
+2 −5 distrho/src/jackbridge/rtaudio/RtAudio.cpp
+18 −0 examples/EmbedExternalUI/CMakeLists.txt
+1 −0 examples/EmbedExternalUI/DistrhoPluginInfo.h
+13 −0 examples/ExternalUI/CMakeLists.txt
+1 −0 examples/ExternalUI/DistrhoPluginInfo.h
+15 −14 examples/ExternalUI/ExternalExampleUI.cpp
+1 −1 examples/ExternalUI/Makefile
+1 −0 examples/Info/CMakeLists.txt
+3 −4 examples/Info/DistrhoPluginInfo.h
+3 −6 examples/Info/InfoExampleUI.cpp
+3 −0 examples/Info/Makefile
+0 −42 examples/Info/modgui.ttl
+ examples/Info/modgui/box.png
+0 −73 examples/Info/modgui/icon-info.html
+ examples/Info/modgui/screenshot-info.png
+0 −57 examples/Info/modgui/script-info.js
+0 −88 examples/Info/modgui/stylesheet-info.css
+ examples/Info/modgui/thumbnail-tinygain.png
+0 −4 examples/Info/modgui/tilesf1.LICENSE
+ examples/Info/modgui/tilesf1.jpg
+1 −1 examples/Latency/LatencyExamplePlugin.cpp
+4 −2 utils/generate-ttl.sh
+26 −0 utils/valgrind-dpf.supp
7 changes: 5 additions & 2 deletions plugins/dragonfly-early-reflections/DSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
* For a full copy of the GNU General Public License see the LICENSE file.
*/

#include "math.h"

#include "DistrhoPlugin.hpp"
#include "DistrhoPluginInfo.h"
#include "DSP.hpp"
#include "math.h"
#include "extra/ScopedDenormalDisable.hpp"

#include "DSP.hpp"

DragonflyReverbDSP::DragonflyReverbDSP(double sampleRate) {
model.setMuteOnChange(false);
Expand Down Expand Up @@ -52,6 +54,7 @@ void DragonflyReverbDSP::setParameterValue(uint32_t index, float value) {
}

void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t frames) {
const ScopedDenormalDisable sdd;
for (uint32_t index = 0; index < paramCount; index++) {
if (d_isNotEqual(oldParams[index], newParams[index])) {
oldParams[index] = newParams[index];
Expand Down
3 changes: 3 additions & 0 deletions plugins/dragonfly-hall-reverb/DSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "DistrhoPlugin.hpp"
#include "DistrhoPluginInfo.h"
#include "extra/ScopedDenormalDisable.hpp"

#include "DSP.hpp"

DragonflyReverbDSP::DragonflyReverbDSP(double sampleRate) {
Expand Down Expand Up @@ -58,6 +60,7 @@ void DragonflyReverbDSP::setParameterValue(uint32_t index, float value) {
}

void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t frames) {
const ScopedDenormalDisable sdd;
for (uint32_t index = 0; index < paramCount; index++) {
if (d_isNotEqual(oldParams[index], newParams[index])) {
oldParams[index] = newParams[index];
Expand Down
6 changes: 5 additions & 1 deletion plugins/dragonfly-plate-reverb/DSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
* For a full copy of the GNU General Public License see the LICENSE file.
*/

#include "math.h"

#include "DistrhoPlugin.hpp"
#include "DistrhoPluginInfo.h"
#include "extra/ScopedDenormalDisable.hpp"

#include "DSP.hpp"
#include "math.h"

NRev::NRev() : fv3::nrev_f() { }

Expand Down Expand Up @@ -176,6 +179,7 @@ void DragonflyReverbDSP::setParameterValue(uint32_t index, float value) {
}

void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t frames) {
const ScopedDenormalDisable sdd;
for (uint32_t index = 0; index < paramCount; index++) {
if (d_isNotEqual(oldParams[index], newParams[index])) {
oldParams[index] = newParams[index];
Expand Down
6 changes: 5 additions & 1 deletion plugins/dragonfly-room-reverb/DSP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
* For a full copy of the GNU General Public License see the LICENSE file.
*/

#include "math.h"

#include "DistrhoPlugin.hpp"
#include "DistrhoPluginInfo.h"
#include "extra/ScopedDenormalDisable.hpp"

#include "DSP.hpp"
#include "math.h"

// Increase the late level by approx 8dB
#define LATE_GAIN 2.5f
Expand Down Expand Up @@ -68,6 +71,7 @@ void DragonflyReverbDSP::setParameterValue(uint32_t index, float value) {
}

void DragonflyReverbDSP::run(const float** inputs, float** outputs, uint32_t frames) {
const ScopedDenormalDisable sdd;
for (uint32_t index = 0; index < paramCount; index++) {
if (d_isNotEqual(oldParams[index], newParams[index])) {
oldParams[index] = newParams[index];
Expand Down

0 comments on commit 6da3cce

Please sign in to comment.