1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
2<head>
3<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
4<title>SND_CalcDecibelSquare</title>
5<link rel="stylesheet" href="../css/nitro.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
7</head>
8<body>
9<div class="refentry" lang="ja"><a name="IDAKKYT"></a><div class="titlepage">
10<div></div>
11<div></div>
12</div>
13<h1>SND_CalcDecibelSquare <IMG src="../image/NTR.gif" width="24" height="12" border="0" align=middle><IMG src="../image/TWL.gif" width="24" height="12" border="0" align=middle></h1>
14<h2>Syntax</h2>
15<dl>
16<dd><pre class="funcsynopsisinfo"><code>#include &lt;nitro/snd.h&gt;</code></pre></dd>
17<dd><pre class="funcprototype"><code class="funcprototype">s16 SND_CalcDecibelSquare( int <var>scale</var> );</code><br></pre></dd>
18</dl>
19<div class="refsection" lang="ja"><a name="IDA5LYT"></a>
20      <h2>Arguments</h2>
21
22      <div class="variablelist">
23<table border="0">
24<col align="left" valign="top">
25<tbody>
26<tr>
27<td><em><strong><code>scale</code></strong></em></td>
28<td>The square of the scale value. Takes a value between 0 and 127.</td>
29</tr>
30</tbody>
31</table>
32</div>
33
34    </div>
35<div class="refsection" lang="ja"><a name="IDAOMYT"></a>
36      <h2>Return Values</h2>
37
38      <p>Returns the decibel value the corresponds to the square of the scale value. Value is in units of 0.1dB</p>
39    </div>
40<div class="refsection" lang="ja"><a name="IDAVMYT"></a>
41      <h2>Description</h2>
42      <p>
43Calculates the decibel value that corresponds to the square of the scale value.
44</p>
45      <p>
46The calculation is performed using the following equation:
47</p>
48      <pre class="programlisting">20 x log10(( <em><strong><code>scale</code></strong></em> &divide; 127 ) ** 2) x 10</pre>
49
50      <p>
51Because the unit is 0.1dB, the number is multiplied by 10 as the final step.
52</p>
53      <p>
54When <em><strong><code>scale</code></strong></em> is 0, it returns -32768.
55</p>
56    </div>
57<h2>See Also</h2>
58<p>None.</p>
59<h2>Revision History</h2>
60<p>2005/09/22 Added explanation of when the scale value is 0.<br>2004/07/20 Initial version.</p>
61</div>
62<hr><p>CONFIDENTIAL</p></body>
63</html>
64