Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 458

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>Phonon.Effect Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">Phonon.Effect Class Reference<br /><sup><sup>[<a href="phonon.html">phonon</a> module]</sup></sup></h1><p>The Effect class is used to transform audio streams. <a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a> and <a href="phonon-medianode.html">MediaNode</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="phonon-effect.html#Effect">__init__</a></b> (<i>self</i>, EffectDescription&#160;<i>description</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />EffectDescription <b><a href="phonon-effect.html#description">description</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-Phonon.EffectParameter <b><a href="phonon-effect.html#parameters">parameters</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="phonon-effect.html#parameterValue">parameterValue</a></b> (<i>self</i>, EffectParameter)</li><li><div class="fn" /><b><a href="phonon-effect.html#setParameterValue">setParameterValue</a></b> (<i>self</i>, EffectParameter, QVariant&#160;<i>value</i>)</li></ul><a name="details" /><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 class="cpp">
 Path path <span class="operator">=</span> Phonon<span class="operator">.</span>createPath(<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>);
 Effect <span class="operator">*</span>effect <span class="operator">=</span> <span class="keyword">new</span> Effect(<span class="keyword">this</span>);
 path<span class="operator">.</span>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 class="cpp">
     <span class="type"><a href="qlist.html">QList</a></span><span class="operator">&lt;</span>Phonon<span class="operator">.</span>EffectDescription<span class="operator">&gt;</span> effectDescriptions <span class="operator">=</span>
             Phonon<span class="operator">.</span>BackendCapabilities<span class="operator">.</span>availableAudioEffects();
     Phonon<span class="operator">.</span>EffectDescription effectDescription <span class="operator">=</span> effectDescriptions<span class="operator">.</span>at(<span class="number">4</span>);

     Phonon<span class="operator">.</span>Path path <span class="operator">=</span> Phonon<span class="operator">.</span>createPath(mediaObject<span class="operator">,</span> audioOutput);

     Phonon<span class="operator">.</span>Effect <span class="operator">*</span>effect <span class="operator">=</span> <span class="keyword">new</span> Phonon<span class="operator">.</span>Effect(effectDescription);
     path<span class="operator">.</span>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>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="Effect" />Effect.__init__ (<i>self</i>, <a href="phonon-effectdescription.html">EffectDescription</a>&#160;<i>description</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><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><b>See also</b> <a href="phonon-backendcapabilities.html#availableAudioEffects">Phonon.BackendCapabilities.availableAudioEffects</a>().</p>


<h3 class="fn"><a name="description" /><a href="phonon-effectdescription.html">EffectDescription</a> Effect.description (<i>self</i>)</h3><p>Returns the description of this effect. This is the same
description that was passed to the constructor.</p>


<h3 class="fn"><a name="parameters" />list-of-Phonon.EffectParameter Effect.parameters (<i>self</i>)</h3><p>Returns a list of parameters that this effect provides to
control its behavior.</p>
<p><b>See also</b> <a href="phonon-effectparameter.html">EffectParameter</a> and <a href="phonon-effectwidget.html">EffectWidget</a>.</p>


<h3 class="fn"><a name="parameterValue" />QVariant Effect.parameterValue (<i>self</i>, <a href="phonon-effectparameter.html">EffectParameter</a>)</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><b>See also</b> <a href="phonon-effect.html#setParameterValue">setParameterValue</a>() and
<a href="phonon-effectparameter.html">EffectParameter</a>.</p>


<h3 class="fn"><a name="setParameterValue" />Effect.setParameterValue (<i>self</i>, <a href="phonon-effectparameter.html">EffectParameter</a>, QVariant&#160;<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><b>See also</b> <a href="phonon-effect.html#parameterValue">parameterValue</a>() and
<a href="phonon-effectparameter.html">EffectParameter</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>