Signed-off-by: falkTX <falktx@falktx.com>pull/272/head
@@ -20,6 +20,16 @@ | |||||
#include "extra/LeakDetector.hpp" | #include "extra/LeakDetector.hpp" | ||||
#include "src/DistrhoPluginChecks.h" | #include "src/DistrhoPluginChecks.h" | ||||
#ifdef DGL_CAIRO | |||||
# include "Cairo.hpp" | |||||
#endif | |||||
#ifdef DGL_OPENGL | |||||
# include "OpenGL.hpp" | |||||
#endif | |||||
#ifdef DGL_VULKAN | |||||
# include "Vulkan.hpp" | |||||
#endif | |||||
#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI | #if DISTRHO_PLUGIN_HAS_EXTERNAL_UI | ||||
# include "../dgl/Base.hpp" | # include "../dgl/Base.hpp" | ||||
# include "extra/ExternalWindow.hpp" | # include "extra/ExternalWindow.hpp" | ||||
@@ -38,13 +48,6 @@ typedef DGL_NAMESPACE::NanoTopLevelWidget UIWidget; | |||||
typedef DGL_NAMESPACE::TopLevelWidget UIWidget; | typedef DGL_NAMESPACE::TopLevelWidget UIWidget; | ||||
#endif | #endif | ||||
#ifdef DGL_CAIRO | |||||
# include "Cairo.hpp" | |||||
#endif | |||||
#ifdef DGL_OPENGL | |||||
# include "OpenGL.hpp" | |||||
#endif | |||||
START_NAMESPACE_DISTRHO | START_NAMESPACE_DISTRHO | ||||
/* ------------------------------------------------------------------------------------------------------------ | /* ------------------------------------------------------------------------------------------------------------ | ||||
@@ -77,7 +77,13 @@ public: | |||||
void run(const float** inputs, float** outputs, uint32_t frames) | void run(const float** inputs, float** outputs, uint32_t frames) | ||||
{ | { | ||||
memcpy(outputs[0], inputs[0], frames * sizeof(float)); | |||||
/** | |||||
This plugin does nothing, it just demonstrates cairo UI usage. | |||||
So here we directly copy inputs over outputs, leaving the audio untouched. | |||||
We need to be careful in case the host re-uses the same buffer for both inputs and outputs. | |||||
*/ | |||||
if (outputs[0] != inputs[0]) | |||||
std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | |||||
} | } | ||||
}; | }; | ||||
@@ -157,7 +157,7 @@ protected: | |||||
/** | /** | ||||
This plugin does nothing, it just demonstrates information usage. | This plugin does nothing, it just demonstrates information usage. | ||||
So here we directly copy inputs over outputs, leaving the audio untouched. | So here we directly copy inputs over outputs, leaving the audio untouched. | ||||
We need to be careful in case the host re-uses the same buffer for both ins and outs. | |||||
We need to be careful in case the host re-uses the same buffer for both inputs and outputs. | |||||
*/ | */ | ||||
if (outputs[0] != inputs[0]) | if (outputs[0] != inputs[0]) | ||||
std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | ||||
@@ -227,7 +227,7 @@ protected: | |||||
/** | /** | ||||
This plugin doesn't do audio, it just demonstrates file handling usage. | This plugin doesn't do audio, it just demonstrates file handling usage. | ||||
So here we directly copy inputs over outputs, leaving the audio untouched. | So here we directly copy inputs over outputs, leaving the audio untouched. | ||||
We need to be careful in case the host re-uses the same buffer for both ins and outs. | |||||
We need to be careful in case the host re-uses the same buffer for both inputs and outputs. | |||||
*/ | */ | ||||
if (outputs[0] != inputs[0]) | if (outputs[0] != inputs[0]) | ||||
std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | ||||
@@ -208,7 +208,7 @@ protected: | |||||
/** | /** | ||||
This plugin does nothing, it just demonstrates information usage. | This plugin does nothing, it just demonstrates information usage. | ||||
So here we directly copy inputs over outputs, leaving the audio untouched. | So here we directly copy inputs over outputs, leaving the audio untouched. | ||||
We need to be careful in case the host re-uses the same buffer for both ins and outs. | |||||
We need to be careful in case the host re-uses the same buffer for both inputs and outputs. | |||||
*/ | */ | ||||
if (outputs[0] != inputs[0]) | if (outputs[0] != inputs[0]) | ||||
std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | ||||
@@ -251,7 +251,7 @@ The plugin will be treated as an effect, but it will not change the host audio." | |||||
/** | /** | ||||
This plugin does nothing, it just demonstrates parameter usage. | This plugin does nothing, it just demonstrates parameter usage. | ||||
So here we directly copy inputs over outputs, leaving the audio untouched. | So here we directly copy inputs over outputs, leaving the audio untouched. | ||||
We need to be careful in case the host re-uses the same buffer for both ins and outs. | |||||
We need to be careful in case the host re-uses the same buffer for both inputs and outputs. | |||||
*/ | */ | ||||
if (outputs[0] != inputs[0]) | if (outputs[0] != inputs[0]) | ||||
std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | ||||
@@ -279,7 +279,7 @@ The plugin will be treated as an effect, but it will not change the host audio." | |||||
/** | /** | ||||
This plugin does nothing, it just demonstrates state usage. | This plugin does nothing, it just demonstrates state usage. | ||||
So here we directly copy inputs over outputs, leaving the audio untouched. | So here we directly copy inputs over outputs, leaving the audio untouched. | ||||
We need to be careful in case the host re-uses the same buffer for both ins and outs. | |||||
We need to be careful in case the host re-uses the same buffer for both inputs and outputs. | |||||
*/ | */ | ||||
if (outputs[0] != inputs[0]) | if (outputs[0] != inputs[0]) | ||||
std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | std::memcpy(outputs[0], inputs[0], sizeof(float)*frames); | ||||