Browse Source

Fix build

pull/121/head
falkTX 6 years ago
parent
commit
f34d282af0
7 changed files with 13 additions and 28 deletions
  1. +2
    -1
      Makefile.plugins.mk
  2. +2
    -1
      examples/CairoUI/DemoWidgetClickable.cpp
  3. +1
    -1
      examples/CairoUI/DemoWidgetClickable.hpp
  4. +1
    -2
      examples/Gain/DistrhoPluginInfo.h
  5. +2
    -22
      examples/Gain/GainExamplePlugin.cpp
  6. +4
    -0
      examples/Gain/Makefile
  7. +1
    -1
      examples/Gain/README.md

+ 2
- 1
Makefile.plugins.mk View File

@@ -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


+ 2
- 1
examples/CairoUI/DemoWidgetClickable.cpp View File

@@ -20,7 +20,8 @@
#include "Window.hpp"

DemoWidgetClickable::DemoWidgetClickable(Widget* group)
: Widget(group)
: Widget(group),
fColorId(0)
{
}



+ 1
- 1
examples/CairoUI/DemoWidgetClickable.hpp View File

@@ -24,5 +24,5 @@ public:
bool onMouse(const MouseEvent& event) override;

private:
unsigned fColorId = 0;
unsigned fColorId;
};

+ 1
- 2
examples/Gain/DistrhoPluginInfo.h View File

@@ -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

+ 2
- 22
examples/Gain/GainExamplePlugin.cpp View File

@@ -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;
}
}


+ 4
- 0
examples/Gain/Makefile View File

@@ -31,6 +31,10 @@ endif
TARGETS += lv2_dsp
TARGETS += vst

ifeq ($(MACOS),true)
TARGETS += au
endif

all: $(TARGETS)

# --------------------------------------------------------------

+ 1
- 1
examples/Gain/README.md View File

@@ -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/>

Loading…
Cancel
Save