This file is indexed.

/usr/share/qt5/doc/qtmultimedia/qaudio.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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qaudio.cpp -->
  <title>QAudio Namespace | 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 >QAudio Namespace</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="#types">Types</a></li>
<li class="level1"><a href="#functions">Functions</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">QAudio Namespace</h1>
<!-- $$$QAudio-brief -->
<p>The <a href="qaudio.html">QAudio</a> namespace contains enums used by the audio classes. <a href="#details">More...</a></p>
<!-- @@@QAudio -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QAudio&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += multimedia</td></tr></table></div><ul>
</ul>
<a name="types"></a>
<h2 id="types">Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaudio.html#Error-enum">Error</a></b> { NoError, OpenError, IOError, UnderrunError, FatalError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaudio.html#Mode-enum">Mode</a></b> { AudioOutput, AudioInput }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaudio.html#Role-enum">Role</a></b> { UnknownRole, MusicRole, VideoRole, VoiceCommunicationRole, ..., GameRole }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaudio.html#State-enum">State</a></b> { ActiveState, SuspendedState, StoppedState, IdleState }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaudio.html#VolumeScale-enum">VolumeScale</a></b> { LinearVolumeScale, CubicVolumeScale, LogarithmicVolumeScale, DecibelVolumeScale }</td></tr>
</table></div>
<a name="functions"></a>
<h2 id="functions">Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qaudio.html#convertVolume">convertVolume</a></b>(qreal <i>volume</i>, VolumeScale <i>from</i>, VolumeScale <i>to</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QAudio-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qaudio.html">QAudio</a> namespace contains enums used by the audio classes.</p>
</div>
<!-- @@@QAudio -->
<div class="types">
<h2>Type Documentation</h2>
<!-- $$$Error$$$NoError$$$OpenError$$$IOError$$$UnderrunError$$$FatalError -->
<h3 class="fn" id="Error-enum"><a name="Error-enum"></a>enum QAudio::<span class="name">Error</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>QAudio::NoError</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">No errors have occurred</td></tr>
<tr><td class="topAlign"><code>QAudio::OpenError</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">An error occurred opening the audio device</td></tr>
<tr><td class="topAlign"><code>QAudio::IOError</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">An error occurred during read/write of audio device</td></tr>
<tr><td class="topAlign"><code>QAudio::UnderrunError</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Audio data is not being fed to the audio device at a fast enough rate</td></tr>
<tr><td class="topAlign"><code>QAudio::FatalError</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">A non-recoverable error has occurred, the audio device is not usable at this time.</td></tr>
</table></div>
<!-- @@@Error -->
<!-- $$$Mode$$$AudioInput$$$AudioOutput -->
<h3 class="fn" id="Mode-enum"><a name="Mode-enum"></a>enum QAudio::<span class="name">Mode</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>QAudio::AudioOutput</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">audio output device</td></tr>
<tr><td class="topAlign"><code>QAudio::AudioInput</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">audio input device</td></tr>
</table></div>
<!-- @@@Mode -->
<!-- $$$Role$$$UnknownRole$$$MusicRole$$$VideoRole$$$VoiceCommunicationRole$$$AlarmRole$$$NotificationRole$$$RingtoneRole$$$AccessibilityRole$$$SonificationRole$$$GameRole -->
<h3 class="fn" id="Role-enum"><a name="Role-enum"></a>enum QAudio::<span class="name">Role</span></h3>
<p>This enum describes the role of an audio stream.</p>
<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>QAudio::UnknownRole</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The role is unknown or undefined</td></tr>
<tr><td class="topAlign"><code>QAudio::MusicRole</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Music</td></tr>
<tr><td class="topAlign"><code>QAudio::VideoRole</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Soundtrack from a movie or a video</td></tr>
<tr><td class="topAlign"><code>QAudio::VoiceCommunicationRole</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Voice communications, such as telephony</td></tr>
<tr><td class="topAlign"><code>QAudio::AlarmRole</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Alarm</td></tr>
<tr><td class="topAlign"><code>QAudio::NotificationRole</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Notification, such as an incoming e-mail or a chat request</td></tr>
<tr><td class="topAlign"><code>QAudio::RingtoneRole</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Ringtone</td></tr>
<tr><td class="topAlign"><code>QAudio::AccessibilityRole</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">For accessibility, such as with a screen reader</td></tr>
<tr><td class="topAlign"><code>QAudio::SonificationRole</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Sonification, such as with user interface sounds</td></tr>
<tr><td class="topAlign"><code>QAudio::GameRole</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">Game audio</td></tr>
</table></div>
<p>This enum was introduced or modified in  Qt 5.6.</p>
<p><b>See also </b><a href="qmediaplayer.html#audioRole-prop">QMediaPlayer::setAudioRole</a>().</p>
<!-- @@@Role -->
<!-- $$$State$$$ActiveState$$$SuspendedState$$$StoppedState$$$IdleState -->
<h3 class="fn" id="State-enum"><a name="State-enum"></a>enum QAudio::<span class="name">State</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>QAudio::ActiveState</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Audio data is being processed, this state is set after start() is called and while audio data is available to be processed.</td></tr>
<tr><td class="topAlign"><code>QAudio::SuspendedState</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The audio device is in a suspended state, this state will only be entered after suspend() is called.</td></tr>
<tr><td class="topAlign"><code>QAudio::StoppedState</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The audio device is closed, and is not processing any audio data</td></tr>
<tr><td class="topAlign"><code>QAudio::IdleState</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The <a href="../qtcore/qiodevice.html">QIODevice</a> passed in has no data and audio system's buffer is empty, this state is set after start() is called and while no audio data is available to be processed.</td></tr>
</table></div>
<!-- @@@State -->
<!-- $$$VolumeScale$$$LinearVolumeScale$$$CubicVolumeScale$$$LogarithmicVolumeScale$$$DecibelVolumeScale -->
<h3 class="fn" id="VolumeScale-enum"><a name="VolumeScale-enum"></a>enum QAudio::<span class="name">VolumeScale</span></h3>
<p>This enum defines the different audio volume scales.</p>
<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>QAudio::LinearVolumeScale</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Linear scale. <code>0.0</code> (0%) is silence and <code>1.0</code> (100%) is full volume. All Qt Multimedia classes that have an audio volume use a linear scale.</td></tr>
<tr><td class="topAlign"><code>QAudio::CubicVolumeScale</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Cubic scale. <code>0.0</code> (0%) is silence and <code>1.0</code> (100%) is full volume.</td></tr>
<tr><td class="topAlign"><code>QAudio::LogarithmicVolumeScale</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Logarithmic Scale. <code>0.0</code> (0%) is silence and <code>1.0</code> (100%) is full volume. UI volume controls should usually use a logarithmic scale.</td></tr>
<tr><td class="topAlign"><code>QAudio::DecibelVolumeScale</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Decibel (dB, amplitude) logarithmic scale. <code>-200</code> is silence and <code>0</code> is full volume.</td></tr>
</table></div>
<p>This enum was introduced or modified in  Qt 5.8.</p>
<p><b>See also </b><a href="qaudio.html#convertVolume">QAudio::convertVolume</a>().</p>
<!-- @@@VolumeScale -->
</div>
<div class="func">
<h2>Function Documentation</h2>
<!-- $$$convertVolume[overload1]$$$convertVolumeqrealVolumeScaleVolumeScale -->
<h3 class="fn" id="convertVolume"><a name="convertVolume"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QAudio::<span class="name">convertVolume</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>volume</i>, <span class="type"><a href="qaudio.html#VolumeScale-enum">VolumeScale</a></span> <i>from</i>, <span class="type"><a href="qaudio.html#VolumeScale-enum">VolumeScale</a></span> <i>to</i>)</h3>
<p>Converts an audio <i>volume</i> <i>from</i> a volume scale <i>to</i> another, and returns the result.</p>
<p>Depending on the context, different scales are used to represent audio volume. All Qt Multimedia classes that have an audio volume use a linear scale, the reason is that the loudness of a speaker is controlled by modulating its voltage on a linear scale. The human ear on the other hand, perceives loudness in a logarithmic way. Using a logarithmic scale for volume controls is therefore appropriate in most applications. The decibel scale is logarithmic by nature and is commonly used to define sound levels, it is usually used for UI volume controls in professional audio applications. The cubic scale is a computationally cheap approximation of a logarithmic scale, it provides more control over lower volume levels.</p>
<p>The following example shows how to convert the volume value from a slider control before passing it to a <a href="qmediaplayer.html">QMediaPlayer</a>. As a result, the perceived increase in volume is the same when increasing the volume slider from 20 to 30 as it is from 50 to 60:</p>
<pre class="cpp">

  <span class="type">void</span> applyVolume(<span class="type">int</span> volumeSliderValue)
  {
      <span class="comment">// volumeSliderValue is in the range [0..100]</span>

      <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> linearVolume <span class="operator">=</span> <span class="type"><a href="qaudio.html">QAudio</a></span><span class="operator">::</span>convertVolume(volumeSliderValue <span class="operator">/</span> <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span>(<span class="number">100.0</span>)<span class="operator">,</span>
                                                 <span class="type"><a href="qaudio.html">QAudio</a></span><span class="operator">::</span>LogarithmicVolumeScale<span class="operator">,</span>
                                                 <span class="type"><a href="qaudio.html">QAudio</a></span><span class="operator">::</span>LinearVolumeScale);

      player<span class="operator">.</span>setVolume(<a href="../qtcore/qfloat16.html#qRound">qRound</a>(linearVolume <span class="operator">*</span> <span class="number">100</span>));
  }

</pre>
<p>This function was introduced in  Qt 5.8.</p>
<p><b>See also </b><a href="qaudio.html#VolumeScale-enum">VolumeScale</a>, <a href="qmediaplayer.html#volume-prop">QMediaPlayer::setVolume</a>(), <a href="qaudiooutput.html#setVolume">QAudioOutput::setVolume</a>(), <a href="qaudioinput.html#setVolume">QAudioInput::setVolume</a>(), <a href="qsoundeffect.html#setVolume">QSoundEffect::setVolume</a>(), and <a href="qmediarecorder.html#volume-prop">QMediaRecorder::setVolume</a>().</p>
<!-- @@@convertVolume -->
</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>