DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit f23edf167d5e78db5797ffc9d5a5afaa528d6ece
parent ad4a38d81d1a4a262852377a1e18c3e5c21e520c
Author: falkTX <falktx@gmail.com>
Date:   Sat, 16 Aug 2014 22:59:47 +0100

Enable previous if0'd code during strict testing; Fix build

Diffstat:
Mdgl/src/Geometry.cpp | 9---------
Mdistrho/src/DistrhoPluginCarla.cpp | 10+++++-----
Mdistrho/src/DistrhoPluginInternal.hpp | 5+++--
Mdistrho/src/DistrhoPluginLADSPA+DSSI.cpp | 6+++---
Mdistrho/src/DistrhoPluginLV2export.cpp | 10+++++-----
Mdistrho/src/DistrhoPluginVST.cpp | 2+-
Mdistrho/src/DistrhoUI.cpp | 7+++++++
7 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/dgl/src/Geometry.cpp b/dgl/src/Geometry.cpp @@ -409,12 +409,10 @@ void Line<T>::draw() { glBegin(GL_LINES); -#if 0 { glVertex2i(fPosStart.fX, fPosStart.fY); glVertex2i(fPosEnd.fX, fPosEnd.fY); } -#endif glEnd(); } @@ -607,8 +605,6 @@ void Circle<T>::_draw(const bool isOutline) if (fNumSegments < 3 || fSize <= 0.0f) return; - (void)isOutline; -#if 0 float t, x = fSize, y = 0; glBegin(isOutline ? GL_LINE_LOOP : GL_POLYGON); @@ -623,7 +619,6 @@ void Circle<T>::_draw(const bool isOutline) } glEnd(); -#endif } // ----------------------------------------------------------------------- @@ -691,13 +686,11 @@ void Triangle<T>::_draw(const bool isOutline) { glBegin(isOutline ? GL_LINE_LOOP : GL_TRIANGLES); -#if 0 { glVertex2i(fPos1.fX, fPos1.fY); glVertex2i(fPos2.fX, fPos2.fY); glVertex2i(fPos3.fX, fPos3.fY); } -#endif glEnd(); } @@ -934,7 +927,6 @@ void Rectangle<T>::_draw(const bool isOutline) { glBegin(isOutline ? GL_LINE_LOOP : GL_QUADS); -#if 0 { glTexCoord2f(0.0f, 0.0f); glVertex2i(fPos.fX, fPos.fY); @@ -948,7 +940,6 @@ void Rectangle<T>::_draw(const bool isOutline) glTexCoord2f(0.0f, 1.0f); glVertex2i(fPos.fX, fPos.fY+fSize.fHeight); } -#endif glEnd(); } diff --git a/distrho/src/DistrhoPluginCarla.cpp b/distrho/src/DistrhoPluginCarla.cpp @@ -214,15 +214,15 @@ protected: int nativeParamHints = ::PARAMETER_IS_ENABLED; const uint32_t paramHints = fPlugin.getParameterHints(index); - if (paramHints & PARAMETER_IS_AUTOMABLE) + if (paramHints & kParameterIsAutomable) nativeParamHints |= ::PARAMETER_IS_AUTOMABLE; - if (paramHints & PARAMETER_IS_BOOLEAN) + if (paramHints & kParameterIsBoolean) nativeParamHints |= ::PARAMETER_IS_BOOLEAN; - if (paramHints & PARAMETER_IS_INTEGER) + if (paramHints & kParameterIsInteger) nativeParamHints |= ::PARAMETER_IS_INTEGER; - if (paramHints & PARAMETER_IS_LOGARITHMIC) + if (paramHints & kParameterIsLogarithmic) nativeParamHints |= ::PARAMETER_IS_LOGARITHMIC; - if (paramHints & PARAMETER_IS_OUTPUT) + if (paramHints & kParameterIsOutput) nativeParamHints |= ::PARAMETER_IS_OUTPUT; param.hints = static_cast<NativeParameterHints>(nativeParamHints); diff --git a/distrho/src/DistrhoPluginInternal.hpp b/distrho/src/DistrhoPluginInternal.hpp @@ -219,7 +219,7 @@ public: bool isParameterOutput(const uint32_t index) const noexcept { - return (getParameterHints(index) & PARAMETER_IS_OUTPUT); + return (getParameterHints(index) & kParameterIsOutput); } const d_string& getParameterName(const uint32_t index) const noexcept @@ -357,7 +357,8 @@ public: } #if DISTRHO_PLUGIN_IS_SYNTH - void run(const float** const inputs, float** const outputs, const uint32_t frames, const MidiEvent* const midiEvents, const uint32_t midiEventCount) + void run(const float** const inputs, float** const outputs, const uint32_t frames, + const MidiEvent* const midiEvents, const uint32_t midiEventCount) { DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr,); DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr,); diff --git a/distrho/src/DistrhoPluginLADSPA+DSSI.cpp b/distrho/src/DistrhoPluginLADSPA+DSSI.cpp @@ -611,11 +611,11 @@ public: { const uint32_t hints(plugin.getParameterHints(i)); - if (hints & PARAMETER_IS_BOOLEAN) + if (hints & kParameterIsBoolean) portRangeHints[port].HintDescriptor |= LADSPA_HINT_TOGGLED; - if (hints & PARAMETER_IS_INTEGER) + if (hints & kParameterIsInteger) portRangeHints[port].HintDescriptor |= LADSPA_HINT_INTEGER; - if (hints & PARAMETER_IS_LOGARITHMIC) + if (hints & kParameterIsLogarithmic) portRangeHints[port].HintDescriptor |= LADSPA_HINT_LOGARITHMIC; } } diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp @@ -313,7 +313,7 @@ void lv2_generate_ttl(const char* const basename) { const ParameterRanges& ranges(plugin.getParameterRanges(i)); - if (plugin.getParameterHints(i) & PARAMETER_IS_INTEGER) + if (plugin.getParameterHints(i) & kParameterIsInteger) { pluginString += " lv2:default " + d_string(int(plugin.getParameterValue(i))) + " ;\n"; pluginString += " lv2:minimum " + d_string(int(ranges.min)) + " ;\n"; @@ -369,13 +369,13 @@ void lv2_generate_ttl(const char* const basename) { const uint32_t hints(plugin.getParameterHints(i)); - if (hints & PARAMETER_IS_BOOLEAN) + if (hints & kParameterIsBoolean) pluginString += " lv2:portProperty lv2:toggled ;\n"; - if (hints & PARAMETER_IS_INTEGER) + if (hints & kParameterIsInteger) pluginString += " lv2:portProperty lv2:integer ;\n"; - if (hints & PARAMETER_IS_LOGARITHMIC) + if (hints & kParameterIsLogarithmic) pluginString += " lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;\n"; - if ((hints & PARAMETER_IS_AUTOMABLE) == 0 && ! plugin.isParameterOutput(i)) + if ((hints & kParameterIsAutomable) == 0 && ! plugin.isParameterOutput(i)) pluginString += " lv2:portProperty <http://lv2plug.in/ns/ext/port-props#expensive> ;\n"; } diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST.cpp @@ -589,7 +589,7 @@ public: const uint32_t hints(fPlugin.getParameterHints(index)); // must be automable, and not output - if ((hints & PARAMETER_IS_AUTOMABLE) != 0 && (hints & PARAMETER_IS_OUTPUT) == 0) + if ((hints & kParameterIsAutomable) != 0 && (hints & kParameterIsOutput) == 0) ret = 1; } break; diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp @@ -91,6 +91,13 @@ void* UI::d_getPluginInstancePointer() const noexcept #endif // ----------------------------------------------------------------------- +// DSP Callbacks (optional) + +void UI::d_sampleRateChanged(double) +{ +} + +// ----------------------------------------------------------------------- // UI Callbacks (optional) void UI::d_uiReshape(int width, int height)