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