LMMS
Loading...
Searching...
No Matches
LadspaEffect.h
Go to the documentation of this file.
1/*
2 * LadspaEffect.h - class for handling LADSPA effect plugins
3 *
4 * Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
5 * Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 *
7 * This file is part of LMMS - https://lmms.io
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
23 *
24 */
25
26#ifndef _LADSPA_EFFECT_H
27#define _LADSPA_EFFECT_H
28
29#include <QMutex>
30
31#include "Effect.h"
32#include "ladspa.h"
33#include "LadspaControls.h"
34#include "LadspaManager.h"
35
36namespace lmms
37{
38
39struct port_desc_t;
40using multi_proc_t = QVector<port_desc_t*>;
41
42class LadspaEffect : public Effect
43{
44 Q_OBJECT
45public:
46 LadspaEffect( Model * _parent,
47 const Descriptor::SubPluginFeatures::Key * _key );
48 ~LadspaEffect() override;
49
50 ProcessStatus processImpl(SampleFrame* buf, const f_cnt_t frames) override;
51
52 void setControl( int _control, LADSPA_Data _data );
53
55 {
56 return m_controls;
57 }
58
60 {
61 return m_portControls;
62 }
63
65 {
66 return m_processors;
67 }
68
69private slots:
70 void changeSampleRate();
71
72
73private:
75 void pluginDestruction();
76
77 static sample_rate_t maxSamplerate( const QString & _name );
78
81
85
87 QVector<LADSPA_Handle> m_handles;
88
89 QVector<multi_proc_t> m_ports;
91
93};
94
95
96} // namespace lmms
97
98#endif
Definition EffectControls.h:44
Effect(const Plugin::Descriptor *_desc, Model *_parent, const Descriptor::SubPluginFeatures::Key *_key)
Definition Effect.cpp:41
ProcessStatus
Definition Effect.h:147
Definition LadspaControls.h:44
const LADSPA_Descriptor * m_descriptor
Definition LadspaEffect.h:86
ProcessStatus processImpl(SampleFrame *buf, const f_cnt_t frames) override
Definition LadspaEffect.cpp:128
QMutex m_pluginMutex
Definition LadspaEffect.h:79
LadspaEffect(Model *_parent, const Descriptor::SubPluginFeatures::Key *_key)
Definition LadspaEffect.cpp:69
void setControl(int _control, LADSPA_Data _data)
Definition LadspaEffect.cpp:241
~LadspaEffect() override
Definition LadspaEffect.cpp:94
EffectControls * controls() override
Definition LadspaEffect.h:54
void pluginDestruction()
Definition LadspaEffect.cpp:503
bool m_inPlaceBroken
Definition LadspaEffect.h:84
QVector< multi_proc_t > m_ports
Definition LadspaEffect.h:89
ch_cnt_t processorCount() const
Definition LadspaEffect.h:64
ch_cnt_t m_processors
Definition LadspaEffect.h:92
int m_portCount
Definition LadspaEffect.h:83
LadspaControls * m_controls
Definition LadspaEffect.h:80
void pluginInstantiation()
Definition LadspaEffect.cpp:253
const multi_proc_t & getPortControls()
Definition LadspaEffect.h:59
QVector< LADSPA_Handle > m_handles
Definition LadspaEffect.h:87
ladspa_key_t m_key
Definition LadspaEffect.h:82
void changeSampleRate()
Definition LadspaEffect.cpp:102
static sample_rate_t maxSamplerate(const QString &_name)
multi_proc_t m_portControls
Definition LadspaEffect.h:90
Definition Model.h:37
Definition SampleFrame.h:41
float LADSPA_Data
Definition ladspa.h:84
struct _LADSPA_Descriptor LADSPA_Descriptor
Definition AudioAlsa.cpp:35
QPair< QString, QString > ladspa_key_t
Definition LadspaManager.h:47
std::uint16_t ch_cnt_t
Definition LmmsTypes.h:44
std::uint32_t sample_rate_t
Definition LmmsTypes.h:42
QVector< port_desc_t * > multi_proc_t
Definition LadspaEffect.h:40
std::uint64_t f_cnt_t
Definition LmmsTypes.h:43
Definition LadspaBase.h:54