|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# Effect Class Reference
(Phonon::Effect)
[Phonon module]

The Effect class is used to transform audio streams. More...

     #include <Phonon>

Inherits QObject.

This class was introduced in Qt 4.4.

- List of all members, including inherited members

### Public Functions

- Effect ( const EffectDescription & description, QObject * parent = 0 )
- EffectDescription description () const
- QVariant parameterValue ( const EffectParameter & parameter ) const
- QList<EffectParameter> parameters () const
- void setParameterValue ( const EffectParameter & parameter, const QVariant & value )

- 29 public functions inherited from QObject

### Additional Inherited Members

- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 signal inherited from QObject
- 5 static public members inherited from QObject
- 7 protected functions inherited from QObject

## Detailed Description

The Effect class is used to transform audio streams.

An effect is a media node which is inserted into a path between a MediaObject and an audio output node, for instance, an AudioOutput, and transforms the media stream on that path.

Examples may include simple modifiers such as fading or pitch shifting, or more complex mathematical transformations. You can query the backend for available effects with BackendCapabilities::availableAudioEffects().

In order to use an effect, insert it into the path as follows:

         Path path = Phonon::createPath(...);
         Effect *effect = new Effect(this);
         path.insertEffect(effect);

The effect will immediately begin applying it's transformations on the path. To stop it, remove the Effect from the path.

For creating an effect, you use the EffectDescription, which you get from availableAudioEffects(). We give a code example below.

         QList<Phonon::EffectDescription> effectDescriptions =
                 Phonon::BackendCapabilities::availableAudioEffects();
         Phonon::EffectDescription effectDescription = effectDescriptions.at(4);

         Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);

         Phonon::Effect *effect = new Phonon::Effect(effectDescription);
         path.insertEffect(effect);

Author: Matthias Kretz <kretz@kde.org>

## Member Function Documentation

### Effect::Effect ( const EffectDescription & description, QObject * parent = 0 )

Constructs a new effect object with the given description and parent object.

The EffectDescription object determines the type of the effect. See BackendCapabilities::availableAudioEffects().

### EffectDescription Effect::description () const

Returns the description of this effect. This is the same type as was passed to the constructor.

### QVariant Effect::parameterValue ( const EffectParameter & parameter ) const

Returns the value of the given effect parameter.

See also setParameterValue().

### QList<EffectParameter> Effect::parameters () const

Returns a list of parameters that this effect provides to control its behavior.

See also EffectParameter and EffectWidget.

### void Effect::setParameterValue ( const EffectParameter & parameter, const QVariant & value )

Sets the given effect parameter to the specified value.

See also parameterValue().