aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Effect/ladspa/ladspahost.cpp5
-rw-r--r--src/plugins/Effect/ladspa/ladspahost.h5
-rw-r--r--src/plugins/Effect/ladspa/settingsdialog.cpp8
3 files changed, 15 insertions, 3 deletions
diff --git a/src/plugins/Effect/ladspa/ladspahost.cpp b/src/plugins/Effect/ladspa/ladspahost.cpp
index 4dcbd8440..29500e349 100644
--- a/src/plugins/Effect/ladspa/ladspahost.cpp
+++ b/src/plugins/Effect/ladspa/ladspahost.cpp
@@ -539,7 +539,10 @@ void LADSPAHost::initialize(LADSPAEffect *instance)
start = min * 0.5f + max * 0.5f;
instance->knobs[k] = start;
- c->type = LADSPAControl::SLIDER;
+ if(LADSPA_IS_PORT_OUTPUT(plugin->PortDescriptors[k]))
+ c->type = LADSPAControl::LABEL;
+ else
+ c->type = LADSPAControl::SLIDER;
c->min = min;
c->max = max;
c->step = step;
diff --git a/src/plugins/Effect/ladspa/ladspahost.h b/src/plugins/Effect/ladspa/ladspahost.h
index 9d65f0f49..1fb7af373 100644
--- a/src/plugins/Effect/ladspa/ladspahost.h
+++ b/src/plugins/Effect/ladspa/ladspahost.h
@@ -51,13 +51,14 @@ public:
enum Type
{
BUTTON = 0,
- SLIDER
+ SLIDER,
+ LABEL
};
double min;
double max;
double step;
LADSPA_Data *value;
- bool type;
+ int type;
QString name;
};
diff --git a/src/plugins/Effect/ladspa/settingsdialog.cpp b/src/plugins/Effect/ladspa/settingsdialog.cpp
index a78fa8c5a..95a989069 100644
--- a/src/plugins/Effect/ladspa/settingsdialog.cpp
+++ b/src/plugins/Effect/ladspa/settingsdialog.cpp
@@ -98,6 +98,7 @@ void SettingsDialog::on_configureButton_clicked()
QFormLayout *formLayout = new QFormLayout(dialog);
LADSPAButton *button = 0;
LADSPASlider *slider = 0;
+ QLabel *label = 0;
foreach(LADSPAControl *c, effect->controls)
{
@@ -111,6 +112,13 @@ void SettingsDialog::on_configureButton_clicked()
case LADSPAControl::SLIDER:
slider = new LADSPASlider(c->min, c->max, c->step, c->value, dialog);
formLayout->addRow(c->name, slider);
+ break;
+ case LADSPAControl::LABEL:
+ label = new QLabel(this);
+ label->setText(QString("%1").arg(*c->value));
+ label->setFrameStyle(QFrame::StyledPanel);
+ label->setFrameShadow(QFrame::Sunken);
+ formLayout->addRow(c->name, label);
}
}
if (effect->controls.isEmpty())