hydrogen 1.2.3
Effects.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef EFFECTS_H
24#define EFFECTS_H
25
26#include <core/config.h>
27#if defined(H2CORE_HAVE_LADSPA) || _DOXYGEN_
28
29#include <core/Globals.h>
30#include <core/Object.h>
31#include <core/FX/LadspaFX.h>
32
33#include <vector>
34#include <cassert>
35
36namespace H2Core
37{
39class Effects : public H2Core::Object<Effects>
40{
42public:
49 static void create_instance();
54 static Effects* get_instance() { assert(__instance); return __instance; }
55 ~Effects();
56
57 LadspaFX* getLadspaFX( int nFX ) const;
58 void setLadspaFX( LadspaFX* pFX, int nFX );
59
60 std::vector<LadspaFXInfo*> getPluginList();
62
63
64private:
71 std::vector<LadspaFXInfo*> m_pluginList;
74
75 void updateRecentGroup();
76
78
79 Effects();
80
81 void RDFDescend( const QString& sBase, LadspaFXGroup *pGroup, std::vector<LadspaFXInfo*> pluginList );
82 void getRDF( LadspaFXGroup *pGroup, std::vector<LadspaFXInfo*> pluginList );
83
84};
85
86};
87
88#endif
89
90
91#endif
#define H2_OBJECT(name)
Definition Object.h:224
std::vector< LadspaFXInfo * > m_pluginList
Definition Effects.h:71
LadspaFXGroup * m_pRecentGroup
Definition Effects.h:73
LadspaFXGroup * getLadspaFXGroup()
Definition Effects.cpp:227
static Effects * get_instance()
Returns a pointer to the current Effects singleton stored in __instance.
Definition Effects.h:54
std::vector< LadspaFXInfo * > getPluginList()
Loads only usable plugins.
Definition Effects.cpp:131
LadspaFXGroup * m_pRootGroup
Definition Effects.h:72
void updateRecentGroup()
Definition Effects.cpp:272
static void create_instance()
If __instance equals 0, a new Effects singleton will be created and stored in it.
Definition Effects.cpp:63
void setLadspaFX(LadspaFX *pFX, int nFX)
Definition Effects.cpp:99
LadspaFX * getLadspaFX(int nFX) const
Definition Effects.cpp:91
void RDFDescend(const QString &sBase, LadspaFXGroup *pGroup, std::vector< LadspaFXInfo * > pluginList)
static Effects * __instance
Object holding the current Effects singleton.
Definition Effects.h:70
void getRDF(LadspaFXGroup *pGroup, std::vector< LadspaFXInfo * > pluginList)
LadspaFX * m_FXList[MAX_FX]
Definition Effects.h:77
#define MAX_FX
Maximum number of effects.
Definition config.dox:83