Sophie

Sophie

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

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.AudioOutput 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.AudioOutput Class Reference<br /><sup><sup>[<a href="phonon.html">phonon</a> module]</sup></sup></h1><p>The AudioOutput class is used to send data to audio output
devices. <a href="#details">More...</a></p>

<p>Inherits <a href="phonon-abstractaudiooutput.html">AbstractAudioOutput</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="phonon-audiooutput.html#AudioOutput">__init__</a></b> (<i>self</i>, Category&#160;<i>category</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#AudioOutput-2">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />Category <b><a href="phonon-audiooutput.html#category">category</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="phonon-audiooutput.html#isMuted">isMuted</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="phonon-audiooutput.html#name">name</a></b> (<i>self</i>)</li><li><div class="fn" />AudioOutputDevice <b><a href="phonon-audiooutput.html#outputDevice">outputDevice</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#setMuted">setMuted</a></b> (<i>self</i>, bool&#160;<i>mute</i>)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#setName">setName</a></b> (<i>self</i>, QString&#160;<i>newName</i>)</li><li><div class="fn" />bool <b><a href="phonon-audiooutput.html#setOutputDevice">setOutputDevice</a></b> (<i>self</i>, AudioOutputDevice&#160;<i>newAudioOutputDevice</i>)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#setVolume">setVolume</a></b> (<i>self</i>, float&#160;<i>newVolume</i>)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#setVolumeDecibel">setVolumeDecibel</a></b> (<i>self</i>, float&#160;<i>newVolumeDecibel</i>)</li><li><div class="fn" />float <b><a href="phonon-audiooutput.html#volume">volume</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="phonon-audiooutput.html#volumeDecibel">volumeDecibel</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="phonon-audiooutput.html#mutedChanged">mutedChanged</a></b> (bool)</li><li><div class="fn" />void <b><a href="phonon-audiooutput.html#outputDeviceChanged">outputDeviceChanged</a></b> (const Phonon::AudioOutputDevice&amp;)</li><li><div class="fn" />void <b><a href="phonon-audiooutput.html#volumeChanged">volumeChanged</a></b> (qreal)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The AudioOutput class is used to send data to audio output
devices.</p>
<p>The AudioOutput class plays sound over a sound device. The audio
output needs to be connected to a <a href="phonon-mediaobject.html">MediaObject</a> using <a href="phonon-path.html#createPath">createPath()</a>. To start playback,
you call <a href="phonon-mediaobject.html#play">play()</a> on the
media object.</p>
<pre class="cpp">
     Phonon<span class="operator">.</span>MediaObject <span class="operator">*</span>mediaObject <span class="operator">=</span> <span class="keyword">new</span> Phonon<span class="operator">.</span>MediaObject(<span class="keyword">this</span>);
     mediaObject<span class="operator">-</span><span class="operator">&gt;</span>setCurrentSource(Phonon<span class="operator">.</span>MediaSource(<span class="string">"/mymusic/barbiegirl.wav"</span>));
     Phonon<span class="operator">.</span>AudioOutput <span class="operator">*</span>audioOutput <span class="operator">=</span>
         <span class="keyword">new</span> Phonon<span class="operator">.</span>AudioOutput(Phonon<span class="operator">.</span>MusicCategory<span class="operator">,</span> <span class="keyword">this</span>);
     Phonon<span class="operator">.</span>Path path <span class="operator">=</span> Phonon<span class="operator">.</span>createPath(mediaObject<span class="operator">,</span> audioOutput);
</pre>
<p>The class supports changing the <a href="phonon-audiooutput.html#volume-prop">volume</a>(). It is also
possible to mute the sound.</p>
<p>To find out what <a href="phonon-objectdescription.html#AudioOutputDevice-typedef">AudioOutputDevice</a>s
are available for AudioOutput, you can call <a href="phonon-backendcapabilities.html#availableAudioOutputDevices">BackendCapabilities.availableAudioOutputDevices</a>().
A default device is selected by the backend, but it is possible to
set the device to be used with <a href="phonon-audiooutput.html#outputDevice-prop">setOutputDevice</a>().
The <a href="phonon-audiooutput.html#outputDeviceChanged">outputDeviceChanged</a>()
signal will be emitted if the device changes.</p>
<p>If an error occurs with the playback, for instance, if no valid
output device is found, the media object will receive a
stateChanged() signal with the <a href="phonon.html#State-enum">ErrorState</a>.</p>
<p>Note that the default values of properties are dependent on the
backend.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="AudioOutput" />AudioOutput.__init__ (<i>self</i>, <a href="phonon.html#Category-enum">Category</a>&#160;<i>category</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>Creates a new <a href="phonon-audiooutput.html">AudioOutput</a>
with the given <i>parent</i> that defines output to a physical
device.</p>
<p>The <i>category</i> can be used by mixer applications to group
volume controls of applications into categories. That makes it
easier for the user to identify the programs. The category is also
used for the default output device that is configured centrally. As
an example: often users want to have the audio signal of a VoIP
application go to their USB headset while all other sounds should
go to the internal soundcard.</p>
<p><b>See also</b> <a href="phonon.html#categoryToString">Phonon.categoryToString</a>() and
<a href="phonon-audiooutput.html#outputDevice-prop">outputDevice</a>.</p>


<h3 class="fn"><a name="AudioOutput-2" />AudioOutput.__init__ (<i>self</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>Creates a new <a href="phonon-audiooutput.html">AudioOutput</a>
that defines output to the system default device with the
{Phonon.Category.}{<a href="phonon.html#Category-enum">NoCategory</a>} category</p>
<p><b>See also</b> <a href="phonon.html#categoryToString">Phonon.categoryToString</a>() and
<a href="phonon-audiooutput.html#outputDevice-prop">outputDevice</a>.</p>


<h3 class="fn"><a name="category" /><a href="phonon.html#Category-enum">Category</a> AudioOutput.category (<i>self</i>)</h3><p>Returns the category of this output.</p>
<p><b>See also</b> <a href="phonon-audiooutput.html#AudioOutput">Phonon.AudioOutput.AudioOutput</a>().</p>


<h3 class="fn"><a name="isMuted" />bool AudioOutput.isMuted (<i>self</i>)</h3><h3 class="fn"><a name="name" />QString AudioOutput.name (<i>self</i>)</h3><h3 class="fn"><a name="outputDevice" /><a href="phonon-audiooutputdevice.html">AudioOutputDevice</a> AudioOutput.outputDevice (<i>self</i>)</h3><h3 class="fn"><a name="setMuted" />AudioOutput.setMuted (<i>self</i>, bool&#160;<i>mute</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setMuted(bool)</tt>.</p><h3 class="fn"><a name="setName" />AudioOutput.setName (<i>self</i>, QString&#160;<i>newName</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setName(const QString&amp;)</tt>.</p><h3 class="fn"><a name="setOutputDevice" />bool AudioOutput.setOutputDevice (<i>self</i>, <a href="phonon-audiooutputdevice.html">AudioOutputDevice</a>&#160;<i>newAudioOutputDevice</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>bool setOutputDevice(const Phonon::AudioOutputDevice&amp;)</tt>.</p><h3 class="fn"><a name="setVolume" />AudioOutput.setVolume (<i>self</i>, float&#160;<i>newVolume</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setVolume(qreal)</tt>.</p><h3 class="fn"><a name="setVolumeDecibel" />AudioOutput.setVolumeDecibel (<i>self</i>, float&#160;<i>newVolumeDecibel</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setVolumeDecibel(qreal)</tt>.</p><h3 class="fn"><a name="volume" />float AudioOutput.volume (<i>self</i>)</h3><h3 class="fn"><a name="volumeDecibel" />float AudioOutput.volumeDecibel (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="mutedChanged" />void mutedChanged (bool)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the muted property has changed. The
<i>muted</i> value passed by the signal indicates the state of the
muted property. As this property can change by IPC (DBus) calls a
UI element showing the muted property should listen to this
signal.</p>


<h3 class="fn"><a name="outputDeviceChanged" />void outputDeviceChanged (const Phonon::AudioOutputDevice&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the (hardware) device for the output
has changed. <i>newAudioOutputDevice</i> is the new device.</p>
<p>The change can happen either through setOutputDevice or if the
global configuration for the used category has changed.</p>
<p><b>See also</b> <a href="phonon-audiooutput.html#outputDevice-prop">outputDevice</a>.</p>


<h3 class="fn"><a name="volumeChanged" />void volumeChanged (qreal)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the volume has changed. As the
volume can change without a call to setVolume (calls over dbus)
this is important to keep a widget showing the current volume up to
date.</p>
<p><i>newVolume</i> is the new volume level.</p>
<p><b>See also</b> <a href="phonon-audiooutput.html#volume-prop">setVolume</a>() and <a href="phonon-audiooutput.html#volume-prop">volume</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>