Browse Source

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

gh-pages
falkTX 9 years ago
parent
commit
f23edf167d
7 changed files with 24 additions and 25 deletions
  1. +0
    -9
      dgl/src/Geometry.cpp
  2. +5
    -5
      distrho/src/DistrhoPluginCarla.cpp
  3. +3
    -2
      distrho/src/DistrhoPluginInternal.hpp
  4. +3
    -3
      distrho/src/DistrhoPluginLADSPA+DSSI.cpp
  5. +5
    -5
      distrho/src/DistrhoPluginLV2export.cpp
  6. +1
    -1
      distrho/src/DistrhoPluginVST.cpp
  7. +7
    -0
      distrho/src/DistrhoUI.cpp

+ 0
- 9
dgl/src/Geometry.cpp View File

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


+ 5
- 5
distrho/src/DistrhoPluginCarla.cpp View File

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


+ 3
- 2
distrho/src/DistrhoPluginInternal.hpp View File

@@ -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,);


+ 3
- 3
distrho/src/DistrhoPluginLADSPA+DSSI.cpp View File

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


+ 5
- 5
distrho/src/DistrhoPluginLV2export.cpp View File

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



+ 1
- 1
distrho/src/DistrhoPluginVST.cpp View File

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


+ 7
- 0
distrho/src/DistrhoUI.cpp View File

@@ -90,6 +90,13 @@ void* UI::d_getPluginInstancePointer() const noexcept
}
#endif

// -----------------------------------------------------------------------
// DSP Callbacks (optional)

void UI::d_sampleRateChanged(double)
{
}

// -----------------------------------------------------------------------
// UI Callbacks (optional)



Loading…
Cancel
Save