summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/bassboost.h
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-01-08 18:09:27 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-01-08 18:09:27 (GMT)
commit4c95ec342c62183ecc3dffe50497b4858bc27c8d (patch)
tree3888d6454c4e7d346ddcf9ff5d3b63b6b15ecd20 /src/3rdparty/phonon/mmf/bassboost.h
parentd44c661d75ff6edcabf70b188b18bc991611628b (diff)
downloadQt-4c95ec342c62183ecc3dffe50497b4858bc27c8d.zip
Qt-4c95ec342c62183ecc3dffe50497b4858bc27c8d.tar.gz
Qt-4c95ec342c62183ecc3dffe50497b4858bc27c8d.tar.bz2
Implemented audio effects capability querying in Phonon MMF backend
This patch addresses the following deficiencies in the existing implementation of audio effects: 1. Native effect objects (e.g. CAudioEqualizer, CBassBoost etc) were created frequently, just in order to check whether a given effect is supported, or retrieve the list of parameters which it requires. Although this is in part due to a deficiency in the S60 audio effects API (it doesn't have a 'capability query' concept), it can be improved by using caching. This patch introduces a singleton EffectFactory object, which lazily initializes a data structure containing information about support and parameters. 2. In order to either query effect support, the native effect object ultimately needs to access a DevSound instance. Previously, the effect object was provided with a CMdaAudioPlayerUtility object. If this player utility has not loaded an MMF controller plugin *before* the effects object makes any calls to the player utility, incorrect results will be returned. This was observed in the previous code. For querying, we don't actually need to load an MMF controller; instead, we would like to directly provide a CMMFDevSound instance to the effect object. Unfortunately, this API is not available in public S60 SDKs, so we must use the next lowest interface available, namely CMdaAudioOutputStream. By making this change, this patch ensures that support and parameter queries made via the EffectFactory will return the correct result. At this point, however, effect settings made via the Phonon API are not actually applied to the audio output. Fixing this will require notifying the audio effects backend nodes of state changes in the MediaObject. Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
Diffstat (limited to 'src/3rdparty/phonon/mmf/bassboost.h')
-rw-r--r--src/3rdparty/phonon/mmf/bassboost.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/bassboost.h b/src/3rdparty/phonon/mmf/bassboost.h
index 4ad0a6c..c3c48d0 100644
--- a/src/3rdparty/phonon/mmf/bassboost.h
+++ b/src/3rdparty/phonon/mmf/bassboost.h
@@ -21,6 +21,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "abstractaudioeffect.h"
+class CBassBoost;
+
QT_BEGIN_NAMESPACE
namespace Phonon
@@ -37,7 +39,13 @@ class BassBoost : public AbstractAudioEffect
{
Q_OBJECT
public:
- BassBoost(QObject *parent);
+ BassBoost(QObject *parent, const QList<EffectParameter> &parameters);
+
+ // Static interface required by EffectFactory
+ static const char* description();
+ typedef CBassBoost NativeEffect;
+ static void getParameters(NativeEffect *effect,
+ QList<EffectParameter> &parameters);
protected:
// AbstractAudioEffect