summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/effectparameter.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-10 17:24:03 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-01-11 17:54:27 (GMT)
commitbc0e4aa8aec231b43a6033f3f4f12037b02ee64e (patch)
tree900ff9ee7512ae4267ccb9968e7ab11db700b30c /src/3rdparty/phonon/mmf/effectparameter.cpp
parentd993351832c34f51056af06eb83d18f71fa9fd9d (diff)
downloadQt-bc0e4aa8aec231b43a6033f3f4f12037b02ee64e.zip
Qt-bc0e4aa8aec231b43a6033f3f4f12037b02ee64e.tar.gz
Qt-bc0e4aa8aec231b43a6033f3f4f12037b02ee64e.tar.bz2
Implemented reverb effect in Phonon MMF backend
Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
Diffstat (limited to 'src/3rdparty/phonon/mmf/effectparameter.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/effectparameter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/3rdparty/phonon/mmf/effectparameter.cpp b/src/3rdparty/phonon/mmf/effectparameter.cpp
index f4287b8..17c1315 100644
--- a/src/3rdparty/phonon/mmf/effectparameter.cpp
+++ b/src/3rdparty/phonon/mmf/effectparameter.cpp
@@ -59,5 +59,13 @@ qint32 MMF::EffectParameter::toInternalValue(qreal external) const
return m_internalRange.first + ((1.0 + external) / 2) * range;
}
+qreal MMF::EffectParameter::toExternalValue
+ (qint32 value, qint32 min, qint32 max)
+{
+ Q_ASSERT_X(max >= min, Q_FUNC_INFO, "Invalid range");
+ const qint32 range = max - min;
+ return range == 0 ? 0.0 : ((2.0 * value - min) / range) - 1.0;
+}
+
QT_END_NAMESPACE