<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- phonon-api.qdoc --> <head> <title>Qt 4.6: Effect Class Reference</title> <link href="classic.css" rel="stylesheet" type="text/css" /> </head> <body> <a name="//apple_ref/cpp/cl/Phonon/Effect"></a> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td> <td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">Effect Class Reference<br /><span class="small-subtitle">(Phonon::Effect)<br />[<a href="phonon.html">Phonon</a> module]</span> </h1> <p>The Effect class is used to transform audio streams. <a href="#details">More...</a></p> <pre> #include <Phonon/Effect></pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p> <p>Inherits <a href="qobject.html">QObject</a> and <a href="phonon-medianode.html">MediaNode</a>.</p> <p>This class was introduced in Qt 4.4.</p> <ul> <li><a href="phonon-effect-members.html">List of all members, including inherited members</a></li> </ul> <hr /> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="phonon-effect.html#Effect">Effect</a></b> ( const EffectDescription & <i>description</i>, QObject * <i>parent</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">EffectDescription </td><td class="memItemRight" valign="bottom"><b><a href="phonon-effect.html#description">description</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">QVariant </td><td class="memItemRight" valign="bottom"><b><a href="phonon-effect.html#parameterValue">parameterValue</a></b> ( const EffectParameter & <i>parameter</i> ) const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">QList<EffectParameter> </td><td class="memItemRight" valign="bottom"><b><a href="phonon-effect.html#parameters">parameters</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-effect.html#setParameterValue">setParameterValue</a></b> ( const EffectParameter & <i>parameter</i>, const QVariant & <i>value</i> )</td></tr> </table> <ul> <li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li> <li><div bar="2" class="fn"></div>3 public functions inherited from <a href="phonon-medianode.html#public-functions">Phonon::MediaNode</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li> <li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li> <li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li> <li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li> <li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li> </ul> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The Effect class is used to transform audio streams.</p> <p>An effect is a media node which is inserted into a path between a <a href="phonon-mediaobject.html">MediaObject</a> and an audio output node, for instance, an <a href="phonon-audiooutput.html">AudioOutput</a>. The Effect transforms the media stream on that path.</p> <p>Examples may include simple modifiers, such as fading or pitch shifting, and more complex mathematical transformations. You can query the backend for available effects with <a href="phonon-backendcapabilities.html#availableAudioEffects">BackendCapabilities::availableAudioEffects</a>(). Note that the effects available is dependent on the underlying system (DirectDraw, GStreamer, or QuickTime).</p> <p>In order to use an effect, insert it into the path as follows:</p> <pre> Path path = Phonon::createPath(...); Effect *effect = new Effect(this); path.insertEffect(effect);</pre> <p>The effect will immediately begin applying it's transformations on the path. To stop it, remove the Effect from the path.</p> <p>To create an effect, you use the <a href="phonon-objectdescription.html#EffectDescription-typedef">EffectDescription</a> class, which you get from <a href="phonon-backendcapabilities.html#availableAudioEffects">availableAudioEffects()</a>. We give a code example below.</p> <pre> 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);</pre> <p>An effect can have one or more parameters, which let you alter how the effect works, for instance, by specifying the depth of a reverb effect. See the <a href="phonon-effectparameter.html">EffectParameter</a> class description for details.</p> <p>Phonon also provides <a href="phonon-effectwidget.html">EffectWidget</a>, which lets the user modify the parameters of an effect an the fly; e.g., with combo boxes.</p> <p>See also <a href="phonon-module.html">Phonon Module</a> and <a href="phonon-effectwidget.html">EffectWidget</a>.</p> <hr /> <h2>Member Function Documentation</h2> <a name="//apple_ref/cpp/instm/Phonon::Effect/Effect"></a> <h3 class="fn"><a name="Effect"></a>Effect::Effect ( const <a href="phonon-objectdescription.html#EffectDescription-typedef">EffectDescription</a> & <i>description</i>, <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3> <p>Constructs a new effect object with the given <i>description</i> and <i>parent</i> object.</p> <p>The <a href="phonon-objectdescription.html#EffectDescription-typedef">EffectDescription</a> object determines the type of the effect.</p> <p>See also <a href="phonon-backendcapabilities.html#availableAudioEffects">Phonon::BackendCapabilities::availableAudioEffects</a>().</p> <a name="//apple_ref/cpp/instm/Phonon::Effect/description"></a> <h3 class="fn"><a name="description"></a><a href="phonon-objectdescription.html#EffectDescription-typedef">EffectDescription</a> Effect::description () const</h3> <p>Returns the description of this effect. This is the same description that was passed to the constructor.</p> <a name="//apple_ref/cpp/instm/Phonon::Effect/parameterValue"></a> <h3 class="fn"><a name="parameterValue"></a><a href="qvariant.html">QVariant</a> Effect::parameterValue ( const <a href="phonon-effectparameter.html">EffectParameter</a> & <i>parameter</i> ) const</h3> <p>Returns the value of the given effect <i>parameter</i>. You can fetch the available parameters for an effect with <a href="phonon-effect.html#parameters">parameters</a>().</p> <p>See also <a href="phonon-effect.html#setParameterValue">setParameterValue</a>() and <a href="phonon-effectparameter.html">EffectParameter</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::Effect/parameters"></a> <h3 class="fn"><a name="parameters"></a><a href="qlist.html">QList</a><<a href="phonon-effectparameter.html">EffectParameter</a>> Effect::parameters () const</h3> <p>Returns a list of parameters that this effect provides to control its behavior.</p> <p>See also <a href="phonon-effectparameter.html">EffectParameter</a> and <a href="phonon-effectwidget.html">EffectWidget</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::Effect/setParameterValue"></a> <h3 class="fn"><a name="setParameterValue"></a>void Effect::setParameterValue ( const <a href="phonon-effectparameter.html">EffectParameter</a> & <i>parameter</i>, const <a href="qvariant.html">QVariant</a> & <i>value</i> )</h3> <p>Sets the given effect <i>parameter</i> to the specified <i>value</i>.</p> <p>Parameters for an effect are returned by <a href="phonon-effect.html#parameters">parameters</a>(). You can check which <a href="qvariant.html#Type-enum">QVariant::Type</a> an <a href="phonon-effectparameter.html">EffectParameter</a> takes with the <a href="phonon-effectparameter.html#type">EffectParameter::type</a>() function.</p> <p>See also <a href="phonon-effect.html#parameterValue">parameterValue</a>() and <a href="phonon-effectparameter.html">EffectParameter</a>.</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td width="40%" align="left">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)</td> <td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td> <td width="40%" align="right"><div align="right">Qt 4.6.3</div></td> </tr></table></div></address></body> </html>