1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<?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">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <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, QObject <i>parent</i> = None)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#AudioOutput-2">__init__</a></b> (<i>self</i>, QObject <i>parent</i> = 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)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#setName">setName</a></b> (<i>self</i>, QString)</li><li><div class="fn" />bool <b><a href="phonon-audiooutput.html#setOutputDevice">setOutputDevice</a></b> (<i>self</i>, AudioOutputDevice)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#setVolume">setVolume</a></b> (<i>self</i>, float)</li><li><div class="fn" /><b><a href="phonon-audiooutput.html#setVolumeDecibel">setVolumeDecibel</a></b> (<i>self</i>, float)</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&)</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> Phonon.MediaObject *mediaObject = new Phonon.MediaObject(this);
mediaObject->setCurrentSource(Phonon.MediaSource("/mymusic/barbiegirl.wav"));
Phonon.AudioOutput *audioOutput =
new Phonon.AudioOutput(Phonon.MusicCategory, this);
Phonon.Path path = Phonon.createPath(mediaObject, 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>
<p>See also <a href="phonon-volumeslider.html">Phonon.VolumeSlider</a>, <a href="phonon-qmusicplayer.html">Music Player Example</a>, <a href="phonon-backendcapabilities.html">BackendCapabilities</a>, and <a href="phonon-module.html">Phonon Module</a>.</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>, <a href="qobject.html">QObject</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><h3 class="fn"><a name="AudioOutput-2" />AudioOutput.__init__ (<i>self</i>, <a href="qobject.html">QObject</a> <i>parent</i> = 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>See also <a href="phonon.html#categoryToString">Phonon.categoryToString</a>() and <a href="phonon-audiooutput.html#outputDevice-prop">outputDevice</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::AudioOutput/category" />
<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>See also <a href="phonon-audiooutput.html#AudioOutputx">Phonon.AudioOutput.AudioOutput</a>().</p>
<a name="//apple_ref/cpp/instm/Phonon::AudioOutput/mutedChanged" />
<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)</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)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setName(const QString&)</tt>.</p><h3 class="fn"><a name="setOutputDevice" />bool AudioOutput.setOutputDevice (<i>self</i>, <a href="phonon-audiooutputdevice.html">AudioOutputDevice</a>)</h3><p>This method is also a Qt slot with the C++ signature <tt>bool setOutputDevice(const Phonon::AudioOutputDevice&)</tt>.</p><h3 class="fn"><a name="setVolume" />AudioOutput.setVolume (<i>self</i>, float)</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)</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>
<a name="//apple_ref/cpp/instm/Phonon::AudioOutput/outputDeviceChanged" />
<h3 class="fn"><a name="outputDeviceChanged" />void outputDeviceChanged (const Phonon::AudioOutputDevice&)</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>See also <a href="phonon-audiooutput.html#outputDevice-prop">outputDevice</a>.</p>
<a name="//apple_ref/cpp/instm/Phonon::AudioOutput/volumeChanged" />
<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>See also <a href="phonon-audiooutput.html#volume-prop">setVolume</a>() and <a href="phonon-audiooutput.html#volume-prop">volume</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.2</td></tr></table></div></address></body></html>
|