summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/effectfactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/phonon/mmf/effectfactory.h')
-rw-r--r--src/3rdparty/phonon/mmf/effectfactory.h51
1 files changed, 38 insertions, 13 deletions
diff --git a/src/3rdparty/phonon/mmf/effectfactory.h b/src/3rdparty/phonon/mmf/effectfactory.h
index e83ad15..dd4b58d 100644
--- a/src/3rdparty/phonon/mmf/effectfactory.h
+++ b/src/3rdparty/phonon/mmf/effectfactory.h
@@ -20,6 +20,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#define PHONON_MMF_EFFECTFACTORY_H
#include "abstractaudioeffect.h"
+#include "effectparameter.h"
QT_BEGIN_NAMESPACE
@@ -31,14 +32,30 @@ namespace MMF
/**
* @short Contains utility functions related to effects.
*/
-class EffectFactory
+class EffectFactory : public QObject
{
+ Q_OBJECT
+
public:
+ EffectFactory(QObject *parent);
+ ~EffectFactory();
+
+ enum Type
+ {
+ TypeAudioEqualizer = 0
+ , TypeBassBoost
+ , TypeDistanceAttenuation
+ , TypeEnvironmentalReverb
+ , TypeListenerOrientation
+ , TypeLoudness
+ , TypeSourceOrientation
+ , TypeStereoWidening
+ };
+
/**
* @short Creates an audio effect of type @p type.
*/
- static AbstractAudioEffect *createAudioEffect(AbstractAudioEffect::Type type,
- QObject *parent);
+ AbstractAudioEffect *createAudioEffect(Type type, QObject *parent);
/**
* @short Return the properties for effect @p type.
@@ -46,7 +63,7 @@ public:
* This handles the effects for
* BackendInterface::objectDescriptionProperties().
*/
- static QHash<QByteArray, QVariant> audioEffectDescriptions(AbstractAudioEffect::Type type);
+ QHash<QByteArray, QVariant> audioEffectDescriptions(Type type);
/**
* @short Returns the indexes for the supported effects.
@@ -54,19 +71,27 @@ public:
* This handles the effects for
* BackendInterface::objectDescriptionIndexes().
*/
- static QList<int> effectIndexes();
+ QList<int> effectIndexes();
private:
- static inline QHash<QByteArray, QVariant> constructEffectDescription(const QString &name,
- const QString &description);
+ void initialize();
+
+ struct EffectData
+ {
+ bool m_supported;
+ QHash<QByteArray, QVariant> m_descriptions;
+ QList<EffectParameter> m_parameters;
+ };
+
+ template<typename BackendNode> EffectData getData();
+ const EffectData& data(Type type) const;
+
+private:
+ bool m_initialized;
+ QHash<Type, EffectData> m_effectData;
- /**
- * This class is not supposed to be instantiated, so disable
- * the default constructor.
- */
- inline EffectFactory();
- Q_DISABLE_COPY(EffectFactory)
};
+
}
}