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.h50
1 files changed, 37 insertions, 13 deletions
diff --git a/src/3rdparty/phonon/mmf/effectfactory.h b/src/3rdparty/phonon/mmf/effectfactory.h
index e83ad15..45bd0f0 100644
--- a/src/3rdparty/phonon/mmf/effectfactory.h
+++ b/src/3rdparty/phonon/mmf/effectfactory.h
@@ -31,14 +31,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 +62,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 +70,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)
};
+
}
}