summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/CairoUI/DemoWidgetClickable.cpp3
-rw-r--r--examples/CairoUI/DemoWidgetClickable.hpp2
-rw-r--r--examples/Gain/DistrhoPluginInfo.h3
-rw-r--r--examples/Gain/GainExamplePlugin.cpp24
-rw-r--r--examples/Gain/Makefile4
-rw-r--r--examples/Gain/README.md2
6 files changed, 11 insertions, 27 deletions
diff --git a/examples/CairoUI/DemoWidgetClickable.cpp b/examples/CairoUI/DemoWidgetClickable.cpp
index 98ad4d6c..7cb6e711 100644
--- a/examples/CairoUI/DemoWidgetClickable.cpp
+++ b/examples/CairoUI/DemoWidgetClickable.cpp
@@ -20,7 +20,8 @@
#include "Window.hpp"
DemoWidgetClickable::DemoWidgetClickable(Widget* group)
- : Widget(group)
+ : Widget(group),
+ fColorId(0)
{
}
diff --git a/examples/CairoUI/DemoWidgetClickable.hpp b/examples/CairoUI/DemoWidgetClickable.hpp
index 425e773b..d4f93da4 100644
--- a/examples/CairoUI/DemoWidgetClickable.hpp
+++ b/examples/CairoUI/DemoWidgetClickable.hpp
@@ -24,5 +24,5 @@ public:
bool onMouse(const MouseEvent& event) override;
private:
- unsigned fColorId = 0;
+ unsigned fColorId;
};
diff --git a/examples/Gain/DistrhoPluginInfo.h b/examples/Gain/DistrhoPluginInfo.h
index 76d45f85..39c42af8 100644
--- a/examples/Gain/DistrhoPluginInfo.h
+++ b/examples/Gain/DistrhoPluginInfo.h
@@ -1,6 +1,6 @@
/*
* DISTRHO Plugin Framework (DPF)
- * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com>
+ * Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
@@ -25,6 +25,5 @@
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 1
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1
-#define DISTRHO_PLUGIN_WANT_LATENCY 0
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
diff --git a/examples/Gain/GainExamplePlugin.cpp b/examples/Gain/GainExamplePlugin.cpp
index bfd06ed6..351bcbda 100644
--- a/examples/Gain/GainExamplePlugin.cpp
+++ b/examples/Gain/GainExamplePlugin.cpp
@@ -114,28 +114,9 @@ protected:
parameter.hints = kParameterIsAutomable;
parameter.name = "Gain";
parameter.symbol = "gain";
- parameter.unit = "dB";
parameter.ranges.def = 1.0f;
parameter.ranges.min = 0.0f;
- parameter.ranges.max = 1.0f;
- }
-
- void initProgramName(uint32_t index, String& programName) override
- {
- if (index != 0) {
- programName = "";
- return;
- }
-
- programName = "Default";
- }
-
- void loadProgram(uint32_t index) override
- {
- if (index != 0)
- return;
-
- fGain = 1.0;
+ parameter.ranges.max = 2.0f;
}
/* --------------------------------------------------------------------------------------------------------
@@ -178,9 +159,8 @@ protected:
{
const float* const in = inputs[0];
/* */ float* const out = outputs[0];
- uint32_t i;
- for (i = 0; i < frames; i++) {
+ for (uint32_t i = 0; i < frames; i++) {
out[i] = in[i] * fGain;
}
}
diff --git a/examples/Gain/Makefile b/examples/Gain/Makefile
index 4a93197a..a89c057b 100644
--- a/examples/Gain/Makefile
+++ b/examples/Gain/Makefile
@@ -31,6 +31,10 @@ endif
TARGETS += lv2_dsp
TARGETS += vst
+ifeq ($(MACOS),true)
+TARGETS += au
+endif
+
all: $(TARGETS)
# --------------------------------------------------------------
diff --git a/examples/Gain/README.md b/examples/Gain/README.md
index 3be0679b..7cb1968d 100644
--- a/examples/Gain/README.md
+++ b/examples/Gain/README.md
@@ -2,6 +2,6 @@
This example will show how to create a simple plugin in DPF with one parameter.<br/>
-The plugin will alter the gain by multiplying the input samples by a constant factor 0-1.<br/>
+The plugin will alter the gain by multiplying the input samples by a constant factor 0-2.<br/>
The plugin has no UI because there's no need for one in this case.<br/>