summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.cpp22
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.h2
-rw-r--r--src/3rdparty/phonon/mmf/audioequalizer.cpp6
-rw-r--r--src/3rdparty/phonon/mmf/audioequalizer.h2
-rw-r--r--src/3rdparty/phonon/mmf/bassboost.cpp3
-rw-r--r--src/3rdparty/phonon/mmf/bassboost.h4
-rw-r--r--src/3rdparty/phonon/mmf/environmentalreverb.cpp5
-rw-r--r--src/3rdparty/phonon/mmf/environmentalreverb.h4
-rw-r--r--src/3rdparty/phonon/mmf/loudness.cpp3
-rw-r--r--src/3rdparty/phonon/mmf/loudness.h4
-rw-r--r--src/3rdparty/phonon/mmf/stereowidening.cpp5
-rw-r--r--src/3rdparty/phonon/mmf/stereowidening.h4
12 files changed, 33 insertions, 31 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp b/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp
index 593e00f..e3672e6 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp
@@ -71,9 +71,10 @@ void AbstractAudioEffect::setParameterValue(const Phonon::EffectParameter &param
if (m_effect.data()) {
const EffectParameter& internalParam = internalParameter(param.id());
- parameterChanged(internalParam, newValue);
+ int err = parameterChanged(internalParam, newValue);
+ TRAP(err, m_effect->ApplyL());
// TODO: handle audio effect errors
- TRAP_IGNORE(m_effect->ApplyL());
+ Q_UNUSED(err);
}
}
@@ -116,12 +117,16 @@ void AbstractAudioEffect::disconnectMediaObject(MediaObject *mediaObject)
void AbstractAudioEffect::setEnabled(bool enabled)
{
+ TInt err = KErrNone;
+
if (enabled)
// TODO: handle audio effect errors
- TRAP_IGNORE(m_effect->EnableL())
+ TRAP(err, m_effect->EnableL())
else
// TODO: handle audio effect errors
- TRAP_IGNORE(m_effect->DisableL())
+ TRAP(err, m_effect->DisableL())
+
+ Q_UNUSED(err);
}
void AbstractAudioEffect::createEffect()
@@ -134,15 +139,12 @@ void AbstractAudioEffect::createEffect()
if (m_effect.data()) {
EffectParameter param;
+ int err = 0;
foreach (param, m_params) {
const QVariant value = parameterValue(param);
- parameterChanged(param, value);
+ err = parameterChanged(param, value);
}
-
- // TODO: handle audio effect errors
- TRAP_IGNORE(m_effect->EnableL());
-
- setEnabled(true);
+ Q_UNUSED(err)
}
}
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
index 57427e7..a3b35c2 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
@@ -86,7 +86,7 @@ protected:
virtual void createEffect(AudioPlayer::NativePlayer *player) = 0;
- virtual void parameterChanged(const EffectParameter &param,
+ virtual int parameterChanged(const EffectParameter &param,
const QVariant &value) = 0;
private:
diff --git a/src/3rdparty/phonon/mmf/audioequalizer.cpp b/src/3rdparty/phonon/mmf/audioequalizer.cpp
index 1584cf7..201a5fc 100644
--- a/src/3rdparty/phonon/mmf/audioequalizer.cpp
+++ b/src/3rdparty/phonon/mmf/audioequalizer.cpp
@@ -37,15 +37,15 @@ AudioEqualizer::AudioEqualizer(QObject *parent, const QList<EffectParameter>& pa
}
-void AudioEqualizer::parameterChanged(const EffectParameter &param,
+int AudioEqualizer::parameterChanged(const EffectParameter &param,
const QVariant &value)
{
const int band = param.id() + 1;
const qreal externalLevel = value.toReal();
const int internalLevel = param.toInternalValue(externalLevel);
- // TODO: handle audio effect errors
- TRAP_IGNORE(concreteEffect()->SetBandLevelL(band, internalLevel));
+ TRAPD(err, concreteEffect()->SetBandLevelL(band, internalLevel));
+ return err;
}
diff --git a/src/3rdparty/phonon/mmf/audioequalizer.h b/src/3rdparty/phonon/mmf/audioequalizer.h
index 3a9a5ca..acfe9b5 100644
--- a/src/3rdparty/phonon/mmf/audioequalizer.h
+++ b/src/3rdparty/phonon/mmf/audioequalizer.h
@@ -51,7 +51,7 @@ public:
protected:
// AbstractAudioEffect
virtual void createEffect(AudioPlayer::NativePlayer *player);
- virtual void parameterChanged(const EffectParameter &param,
+ virtual int parameterChanged(const EffectParameter &param,
const QVariant &value);
private:
diff --git a/src/3rdparty/phonon/mmf/bassboost.cpp b/src/3rdparty/phonon/mmf/bassboost.cpp
index a8631e0..6996ba9 100644
--- a/src/3rdparty/phonon/mmf/bassboost.cpp
+++ b/src/3rdparty/phonon/mmf/bassboost.cpp
@@ -37,11 +37,12 @@ BassBoost::BassBoost(QObject *parent, const QList<EffectParameter> &parameters)
}
-void BassBoost::parameterChanged(const EffectParameter &param,
+int BassBoost::parameterChanged(const EffectParameter &param,
const QVariant &value)
{
Q_ASSERT_X(param.id() == 0, Q_FUNC_INFO, "Invalid parameter ID");
setEnabled(value.toBool());
+ return 0;
}
//-----------------------------------------------------------------------------
diff --git a/src/3rdparty/phonon/mmf/bassboost.h b/src/3rdparty/phonon/mmf/bassboost.h
index 82a3bab..e8e8094 100644
--- a/src/3rdparty/phonon/mmf/bassboost.h
+++ b/src/3rdparty/phonon/mmf/bassboost.h
@@ -46,8 +46,8 @@ public:
protected:
// AbstractAudioEffect
virtual void createEffect(AudioPlayer::NativePlayer *player);
- virtual void parameterChanged(const EffectParameter &param,
- const QVariant &value);
+ virtual int parameterChanged(const EffectParameter &param,
+ const QVariant &value);
private:
CBassBoost *concreteEffect();
diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.cpp b/src/3rdparty/phonon/mmf/environmentalreverb.cpp
index 2e30ca1..f362afd 100644
--- a/src/3rdparty/phonon/mmf/environmentalreverb.cpp
+++ b/src/3rdparty/phonon/mmf/environmentalreverb.cpp
@@ -51,7 +51,7 @@ EnvironmentalReverb::EnvironmentalReverb(QObject *parent, const QList<EffectPara
}
-void EnvironmentalReverb::parameterChanged(const EffectParameter &param,
+int EnvironmentalReverb::parameterChanged(const EffectParameter &param,
const QVariant &value)
{
const qreal externalLevel = value.toReal();
@@ -94,8 +94,7 @@ void EnvironmentalReverb::parameterChanged(const EffectParameter &param,
Q_ASSERT_X(false, Q_FUNC_INFO, "Unknown parameter");
}
- // TODO: handle audio effect errors
- Q_UNUSED(err);
+ return err;
}
diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.h b/src/3rdparty/phonon/mmf/environmentalreverb.h
index 5760c0a..8a91517 100644
--- a/src/3rdparty/phonon/mmf/environmentalreverb.h
+++ b/src/3rdparty/phonon/mmf/environmentalreverb.h
@@ -46,8 +46,8 @@ public:
protected:
// AbstractAudioEffect
virtual void createEffect(AudioPlayer::NativePlayer *player);
- virtual void parameterChanged(const EffectParameter &param,
- const QVariant &value);
+ virtual int parameterChanged(const EffectParameter &param,
+ const QVariant &value);
private:
CEnvironmentalReverb *concreteEffect();
diff --git a/src/3rdparty/phonon/mmf/loudness.cpp b/src/3rdparty/phonon/mmf/loudness.cpp
index 7a033fa..2239ac1 100644
--- a/src/3rdparty/phonon/mmf/loudness.cpp
+++ b/src/3rdparty/phonon/mmf/loudness.cpp
@@ -37,11 +37,12 @@ Loudness::Loudness(QObject *parent, const QList<EffectParameter>& parameters)
}
-void Loudness::parameterChanged(const EffectParameter &param,
+int Loudness::parameterChanged(const EffectParameter &param,
const QVariant &value)
{
Q_ASSERT_X(param.id() == 0, Q_FUNC_INFO, "Invalid parameter ID");
setEnabled(value.toBool());
+ return 0;
}
//-----------------------------------------------------------------------------
diff --git a/src/3rdparty/phonon/mmf/loudness.h b/src/3rdparty/phonon/mmf/loudness.h
index f772d7f..bb3380e 100644
--- a/src/3rdparty/phonon/mmf/loudness.h
+++ b/src/3rdparty/phonon/mmf/loudness.h
@@ -46,8 +46,8 @@ public:
protected:
// AbstractAudioEffect
virtual void createEffect(AudioPlayer::NativePlayer *player);
- virtual void parameterChanged(const EffectParameter &param,
- const QVariant &value);
+ virtual int parameterChanged(const EffectParameter &param,
+ const QVariant &value);
private:
CLoudness *concreteEffect();
diff --git a/src/3rdparty/phonon/mmf/stereowidening.cpp b/src/3rdparty/phonon/mmf/stereowidening.cpp
index 4fee1aa..d14617d 100644
--- a/src/3rdparty/phonon/mmf/stereowidening.cpp
+++ b/src/3rdparty/phonon/mmf/stereowidening.cpp
@@ -37,7 +37,7 @@ StereoWidening::StereoWidening(QObject *parent, const QList<EffectParameter>& pa
}
-void StereoWidening::parameterChanged(const EffectParameter &param,
+int StereoWidening::parameterChanged(const EffectParameter &param,
const QVariant &value)
{
Q_ASSERT_X(param.id() == 0, Q_FUNC_INFO, "Invalid parameter ID");
@@ -47,8 +47,7 @@ void StereoWidening::parameterChanged(const EffectParameter &param,
TRAPD(err, concreteEffect()->SetStereoWideningLevelL(internalLevel));
- // TODO: handle audio effect errors
- Q_UNUSED(err);
+ return err;
}
//-----------------------------------------------------------------------------
diff --git a/src/3rdparty/phonon/mmf/stereowidening.h b/src/3rdparty/phonon/mmf/stereowidening.h
index 249c279..c967e37 100644
--- a/src/3rdparty/phonon/mmf/stereowidening.h
+++ b/src/3rdparty/phonon/mmf/stereowidening.h
@@ -46,8 +46,8 @@ public:
protected:
// AbstractAudioEffect
virtual void createEffect(AudioPlayer::NativePlayer *player);
- virtual void parameterChanged(const EffectParameter &param,
- const QVariant &value);
+ virtual int parameterChanged(const EffectParameter &param,
+ const QVariant &value);
private:
CStereoWidening *concreteEffect();