From f34d282af0fcb203ff34bc24ac2a7816708c2912 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 28 Jan 2019 20:52:02 +0000 Subject: Fix build --- Makefile.plugins.mk | 3 ++- examples/CairoUI/DemoWidgetClickable.cpp | 3 ++- examples/CairoUI/DemoWidgetClickable.hpp | 2 +- examples/Gain/DistrhoPluginInfo.h | 3 +-- examples/Gain/GainExamplePlugin.cpp | 24 ++---------------------- examples/Gain/Makefile | 4 ++++ examples/Gain/README.md | 2 +- 7 files changed, 13 insertions(+), 28 deletions(-) diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk index 5518e3d0..5c462f8a 100644 --- a/Makefile.plugins.mk +++ b/Makefile.plugins.mk @@ -80,6 +80,8 @@ AU_LINK_FLAGS = \ -bundle \ -framework AudioToolbox \ -framework AudioUnit \ + -framework CoreFoundation \ + -framework CoreServices \ -exported_symbols_list $(DPF_PATH)/distrho/src/DistrhoPluginAU.exp # not needed yet @@ -88,7 +90,6 @@ AU_LINK_FLAGS = \ # -I$(DPF_PATH)/distrho/src/CoreAudio106/AudioUnits/AUPublic/AUViewBase # -I$(DPF_PATH)/distrho/src/CoreAudio106/AudioUnits/AUPublic/OtherBases # -framework CoreAudio \ -# -framework CoreServices \ # --------------------------------------------------------------------------------------------------------------------- # Handle UI stuff, disable UI support automatically 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 + * Copyright (C) 2012-2019 Filipe Coelho * * 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.
-The plugin will alter the gain by multiplying the input samples by a constant factor 0-1.
+The plugin will alter the gain by multiplying the input samples by a constant factor 0-2.
The plugin has no UI because there's no need for one in this case.
-- cgit v1.2.3