summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/effectfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/phonon/mmf/effectfactory.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/effectfactory.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/3rdparty/phonon/mmf/effectfactory.cpp b/src/3rdparty/phonon/mmf/effectfactory.cpp
index 081f6a3..c5e33d5 100644
--- a/src/3rdparty/phonon/mmf/effectfactory.cpp
+++ b/src/3rdparty/phonon/mmf/effectfactory.cpp
@@ -176,6 +176,13 @@ EffectFactory::EffectData EffectFactory::getData()
OutputStreamFactory streamFactory;
QScopedPointer<CMdaAudioOutputStream> stream(streamFactory.create());
+ EffectParameter param(
+ /* parameterId */ AbstractAudioEffect::ParameterEnable,
+ /* name */ tr("Enabled"),
+ /* hints */ EffectParameter::ToggledHint,
+ /* defaultValue */ QVariant(bool(true)));
+ data.m_parameters.append(param);
+
if (data.m_supported = BackendNode::getParameters
(stream.data(), data.m_parameters)) {
const QString description = QCoreApplication::translate
@@ -185,6 +192,14 @@ EffectFactory::EffectData EffectFactory::getData()
data.m_descriptions.insert("available", true);
}
+ // Sanity check to ensure that all parameter IDs are unique
+ QSet<int> ids;
+ foreach (param, data.m_parameters) {
+ Q_ASSERT_X(ids.find(param.id()) == ids.end(), Q_FUNC_INFO,
+ "Parameter list contains duplicates");
+ ids.insert(param.id());
+ }
+
return data;
}