This file is indexed.

/usr/share/qt5/doc/qtmultimedia/qsound.html is in qtmultimedia5-doc-html 5.9.5-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qsound.cpp -->
  <title>QSound Class | Qt Multimedia 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtmultimedia-index.html">Qt Multimedia</a></td><td ><a href="qtmultimedia-modules.html">C++ Classes</a></td><td >QSound</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.5 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QSound Class</h1>
<!-- $$$QSound-brief -->
<p>The <a href="qsound.html">QSound</a> class provides a method to play .wav sound files. <a href="#details">More...</a></p>
<!-- @@@QSound -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QSound&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += multimedia</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtcore/qobject.html">QObject</a></td></tr></table></div><ul>
<li><a href="qsound-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#Loop-enum">Loop</a></b> { Infinite }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#QSound">QSound</a></b>(const QString &amp;<i>filename</i>, QObject *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#dtor.QSound">~QSound</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#fileName">fileName</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#isFinished">isFinished</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#loops">loops</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#loopsRemaining">loopsRemaining</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#setLoops">setLoops</a></b>(int <i>number</i>)</td></tr>
</table></div>
<ul>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#play-1">play</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#stop">stop</a></b>()</td></tr>
</table></div>
<ul>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsound.html#play">play</a></b>(const QString &amp;<i>filename</i>)</td></tr>
</table></div>
<ul>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QSound-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qsound.html">QSound</a> class provides a method to play .wav sound files.</p>
<p>Qt provides the most commonly required audio operation in GUI applications: asynchronously playing a sound file. This is most easily accomplished using the static <a href="qsound.html#play-1">play</a>() function:</p>
<pre class="cpp">

  <span class="type"><a href="qsound.html#QSound">QSound</a></span><span class="operator">::</span>play(<span class="string">&quot;mysounds/bells.wav&quot;</span>);

</pre>
<p>Alternatively, create a <a href="qsound.html">QSound</a> object from the sound file first and then call the <a href="qsound.html#play-1">play</a>() slot:</p>
<pre class="cpp">

  <span class="type"><a href="qsound.html#QSound">QSound</a></span> bells(<span class="string">&quot;mysounds/bells.wav&quot;</span>);
  bells<span class="operator">.</span>play();

</pre>
<p>Once created a <a href="qsound.html">QSound</a> object can be queried for its <a href="qsound.html#fileName">fileName</a>() and total number of <a href="qsound.html#loops">loops</a>() (i.e&#x2e; the number of times the sound will play). The number of repetitions can be altered using the <a href="qsound.html#setLoops">setLoops</a>() function. While playing the sound, the <a href="qsound.html#loopsRemaining">loopsRemaining</a>() function returns the remaining number of repetitions. Use the <a href="qsound.html#isFinished">isFinished</a>() function to determine whether the sound has finished playing.</p>
<p>Sounds played using a <a href="qsound.html">QSound</a> object may use more memory than the static <a href="qsound.html#play-1">play</a>() function, but it may also play more immediately (depending on the underlying platform audio facilities).</p>
<p>If you require finer control over playing sounds, consider the <a href="qsoundeffect.html">QSoundEffect</a> or <a href="qaudiooutput.html">QAudioOutput</a> classes.</p>
</div>
<p><b>See also </b><a href="qsoundeffect.html">QSoundEffect</a>.</p>
<!-- @@@QSound -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Loop$$$Infinite -->
<h3 class="fn" id="Loop-enum"><a name="Loop-enum"></a>enum QSound::<span class="name">Loop</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QSound::Infinite</code></td><td class="topAlign tblval"><code>-1</code></td><td class="topAlign">Can be used as a parameter to <a href="qsound.html#setLoops">setLoops</a>() to loop infinitely.</td></tr>
</table></div>
<!-- @@@Loop -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QSound[overload1]$$$QSoundconstQString&QObject* -->
<h3 class="fn" id="QSound"><a name="QSound"></a>QSound::<span class="name">QSound</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>filename</i>, <span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a <a href="qsound.html">QSound</a> object from the file specified by the given <i>filename</i> and with the given <i>parent</i>.</p>
<p><b>See also </b><a href="qsound.html#play-1">play</a>().</p>
<!-- @@@QSound -->
<!-- $$$~QSound[overload1]$$$~QSound -->
<h3 class="fn" id="dtor.QSound"><a name="dtor.QSound"></a>QSound::<span class="name">~QSound</span>()</h3>
<p>Destroys this sound object. If the sound is not finished playing, the <a href="qsound.html#stop">stop</a>() function is called before the sound object is destroyed.</p>
<p><b>See also </b><a href="qsound.html#stop">stop</a>() and <a href="qsound.html#isFinished">isFinished</a>().</p>
<!-- @@@~QSound -->
<!-- $$$fileName[overload1]$$$fileName -->
<h3 class="fn" id="fileName"><a name="fileName"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QSound::<span class="name">fileName</span>() const</h3>
<p>Returns the filename associated with this <a href="qsound.html">QSound</a> object.</p>
<p><b>See also </b><a href="qsound.html#QSound">QSound</a>().</p>
<!-- @@@fileName -->
<!-- $$$isFinished[overload1]$$$isFinished -->
<h3 class="fn" id="isFinished"><a name="isFinished"></a><span class="type">bool</span> QSound::<span class="name">isFinished</span>() const</h3>
<p>Returns true if the sound has finished playing; otherwise returns false.</p>
<!-- @@@isFinished -->
<!-- $$$loops[overload1]$$$loops -->
<h3 class="fn" id="loops"><a name="loops"></a><span class="type">int</span> QSound::<span class="name">loops</span>() const</h3>
<p>Returns the number of times the sound will play. Return value of <code>QSound::Infinite</code> indicates infinite number of loops</p>
<p><b>See also </b><a href="qsound.html#loopsRemaining">loopsRemaining</a>() and <a href="qsound.html#setLoops">setLoops</a>().</p>
<!-- @@@loops -->
<!-- $$$loopsRemaining[overload1]$$$loopsRemaining -->
<h3 class="fn" id="loopsRemaining"><a name="loopsRemaining"></a><span class="type">int</span> QSound::<span class="name">loopsRemaining</span>() const</h3>
<p>Returns the remaining number of times the sound will loop (for all positive values this value decreases each time the sound is played). Return value of <code>QSound::Infinite</code> indicates infinite number of loops</p>
<p><b>See also </b><a href="qsound.html#loops">loops</a>() and <a href="qsound.html#isFinished">isFinished</a>().</p>
<!-- @@@loopsRemaining -->
<!-- $$$play[overload1]$$$playconstQString& -->
<h3 class="fn" id="play"><a name="play"></a><code>[static] </code><span class="type">void</span> QSound::<span class="name">play</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>filename</i>)</h3>
<p>Plays the sound stored in the file specified by the given <i>filename</i>.</p>
<p><b>See also </b><a href="qsound.html#stop">stop</a>(), <a href="qsound.html#loopsRemaining">loopsRemaining</a>(), and <a href="qsound.html#isFinished">isFinished</a>().</p>
<!-- @@@play -->
<!-- $$$play$$$play -->
<h3 class="fn" id="play-1"><a name="play-1"></a><code>[slot] </code><span class="type">void</span> QSound::<span class="name">play</span>()</h3>
<p>This is an overloaded function.</p>
<p>Starts playing the sound specified by this <a href="qsound.html">QSound</a> object.</p>
<p>The function returns immediately. Depending on the platform audio facilities, other sounds may stop or be mixed with the new sound. The sound can be played again at any time, possibly mixing or replacing previous plays of the sound.</p>
<p><b>See also </b><a href="qsound.html#fileName">fileName</a>().</p>
<!-- @@@play -->
<!-- $$$setLoops[overload1]$$$setLoopsint -->
<h3 class="fn" id="setLoops"><a name="setLoops"></a><span class="type">void</span> QSound::<span class="name">setLoops</span>(<span class="type">int</span> <i>number</i>)</h3>
<p>Sets the sound to repeat the given <i>number</i> of times when it is played.</p>
<p>Note that passing the value <code>QSound::Infinite</code> will cause the sound to loop indefinitely.</p>
<p><b>See also </b><a href="qsound.html#loops">loops</a>().</p>
<!-- @@@setLoops -->
<!-- $$$stop[overload1]$$$stop -->
<h3 class="fn" id="stop"><a name="stop"></a><code>[slot] </code><span class="type">void</span> QSound::<span class="name">stop</span>()</h3>
<p>Stops the sound playing.</p>
<p><b>See also </b><a href="qsound.html#play-1">play</a>().</p>
<!-- @@@stop -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>