PageRenderTime 38ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/PyQt-x11-gpl-4.9.4/doc/html/phonon-audiooutput.html

#
HTML | 69 lines | 60 code | 9 blank | 0 comment | 0 complexity | a9fe36bcc41f14f904c9a9440fa9528c MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
  3. <html><head><title>Phonon.AudioOutput Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
  4. a:link { color: #004faf; text-decoration: none }
  5. a:visited { color: #672967; text-decoration: none }
  6. td.postheader { font-family: sans-serif }
  7. tr.address { font-family: sans-serif }
  8. body { background: #ffffff; color: black; }
  9. </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
  10. devices. <a href="#details">More...</a></p>
  11. <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
  12. devices.</p>
  13. <p>The AudioOutput class plays sound over a sound device. The audio
  14. 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,
  15. you call <a href="phonon-mediaobject.html#play">play()</a> on the
  16. media object.</p>
  17. <pre class="cpp">
  18. 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>);
  19. mediaObject<span class="operator">-</span><span class="operator">&gt;</span>setCurrentSource(Phonon<span class="operator">.</span>MediaSource(<span class="string">"/mymusic/barbiegirl.wav"</span>));
  20. Phonon<span class="operator">.</span>AudioOutput <span class="operator">*</span>audioOutput <span class="operator">=</span>
  21. <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>);
  22. Phonon<span class="operator">.</span>Path path <span class="operator">=</span> Phonon<span class="operator">.</span>createPath(mediaObject<span class="operator">,</span> audioOutput);
  23. </pre>
  24. <p>The class supports changing the <a href="phonon-audiooutput.html#volume-prop">volume</a>(). It is also
  25. possible to mute the sound.</p>
  26. <p>To find out what <a href="phonon-objectdescription.html#AudioOutputDevice-typedef">AudioOutputDevice</a>s
  27. are available for AudioOutput, you can call <a href="phonon-backendcapabilities.html#availableAudioOutputDevices">BackendCapabilities.availableAudioOutputDevices</a>().
  28. A default device is selected by the backend, but it is possible to
  29. set the device to be used with <a href="phonon-audiooutput.html#outputDevice-prop">setOutputDevice</a>().
  30. The <a href="phonon-audiooutput.html#outputDeviceChanged">outputDeviceChanged</a>()
  31. signal will be emitted if the device changes.</p>
  32. <p>If an error occurs with the playback, for instance, if no valid
  33. output device is found, the media object will receive a
  34. stateChanged() signal with the <a href="phonon.html#State-enum">ErrorState</a>.</p>
  35. <p>Note that the default values of properties are dependent on the
  36. backend.</p>
  37. <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><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>
  38. that defines output to the system default device with the
  39. {Phonon.Category.}{<a href="phonon.html#Category-enum">NoCategory</a>} category</p>
  40. <p><b>See also</b> <a href="phonon.html#categoryToString">Phonon.categoryToString</a>() and
  41. <a href="phonon-audiooutput.html#outputDevice-prop">outputDevice</a>.</p>
  42. <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>
  43. <p><b>See also</b> <a href="phonon-audiooutput.html#AudioOutputx">Phonon.AudioOutput.AudioOutput</a>().</p>
  44. <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
  45. <i>muted</i> value passed by the signal indicates the state of the
  46. muted property. As this property can change by IPC (DBus) calls a
  47. UI element showing the muted property should listen to this
  48. signal.</p>
  49. <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
  50. has changed. <i>newAudioOutputDevice</i> is the new device.</p>
  51. <p>The change can happen either through setOutputDevice or if the
  52. global configuration for the used category has changed.</p>
  53. <p><b>See also</b> <a href="phonon-audiooutput.html#outputDevice-prop">outputDevice</a>.</p>
  54. <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
  55. volume can change without a call to setVolume (calls over dbus)
  56. this is important to keep a widget showing the current volume up to
  57. date.</p>
  58. <p><i>newVolume</i> is the new volume level.</p>
  59. <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>
  60. <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.4 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.2</td></tr></table></div></address></body></html>