aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Effect/ladspa/ladspahost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Effect/ladspa/ladspahost.cpp')
-rw-r--r--src/plugins/Effect/ladspa/ladspahost.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/Effect/ladspa/ladspahost.cpp b/src/plugins/Effect/ladspa/ladspahost.cpp
index b962f3d81..8688ab756 100644
--- a/src/plugins/Effect/ladspa/ladspahost.cpp
+++ b/src/plugins/Effect/ladspa/ladspahost.cpp
@@ -56,7 +56,7 @@ LADSPAHost::LADSPAHost(QObject *parent) : QObject(parent)
int id = settings.value("id").toInt();
LADSPAPlugin *plugin = nullptr;
- foreach(LADSPAPlugin *p, plugins())
+ for(LADSPAPlugin *p : plugins())
{
if(p->unique_id == id)
{
@@ -68,7 +68,7 @@ LADSPAHost::LADSPAHost(QObject *parent) : QObject(parent)
continue;
LADSPAEffect *effect = createEffect(plugin);
- foreach (LADSPAControl *c, effect->controls)
+ for(LADSPAControl *c : qAsConst(effect->controls))
c->value = settings.value(QString("port%1").arg(c->port), c->value).toFloat();
m_effects.append(effect);
@@ -92,7 +92,7 @@ LADSPAHost::~LADSPAHost()
settings.setValue("id", (quint64)m_effects[i]->plugin->desc->UniqueID);
- foreach (LADSPAControl *c, m_effects[i]->controls)
+ for(const LADSPAControl *c : qAsConst(m_effects[i]->controls))
settings.setValue(QString("port%1").arg(c->port), c->value);
settings.endGroup();
@@ -105,7 +105,7 @@ void LADSPAHost::configure(quint32 freq, int chan)
m_chan = chan;
m_freq = freq;
- foreach (LADSPAEffect *e, m_effects)
+ for(LADSPAEffect *e : qAsConst(m_effects))
{
//deactivate effect
deactivateEffect(e);
@@ -149,7 +149,7 @@ void LADSPAHost::loadModules()
}
else
directories = ladspa_path.split(':');
- foreach(QString dir, directories)
+ for(const QString &dir : qAsConst(directories))
findModules(dir);
}
@@ -160,7 +160,7 @@ void LADSPAHost::findModules(const QString &path)
dir.setSorting(QDir::Name);
QFileInfoList files = dir.entryInfoList((QStringList() << "*.so"));
- foreach(QFileInfo file, files)
+ for(const QFileInfo &file : qAsConst(files))
{
void *library = dlopen(qPrintable(file.absoluteFilePath ()), RTLD_LAZY);
if (!library)
@@ -359,15 +359,15 @@ void LADSPAHost::activateEffect(LADSPAEffect *e)
{
LADSPA_Handle handle = desc->instantiate(desc, m_freq);
- foreach (LADSPAControl *c, e->controls)
+ for(LADSPAControl *c : qAsConst(e->controls))
{
desc->connect_port(handle, c->port, &c->value);
}
- foreach (int port, e->in_ports)
+ for(int port : qAsConst(e->in_ports))
{
desc->connect_port(handle, port, m_buf[in_at++]);
}
- foreach (int port, e->out_ports)
+ for(int port : qAsConst(e->out_ports))
{
desc->connect_port(handle, port, m_buf[out_at++]);
}
@@ -381,7 +381,7 @@ void LADSPAHost::activateEffect(LADSPAEffect *e)
void LADSPAHost::deactivateEffect(LADSPAEffect *e)
{
const LADSPA_Descriptor *desc = e->plugin->desc;
- foreach (LADSPA_Handle handle, e->handles)
+ for(const LADSPA_Handle &handle : qAsConst(e->handles))
{
if(desc->deactivate)
desc->deactivate(handle);