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_SetChannelVolume</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="IDAFLWT"></a><div class="titlepage">
10<div></div>
11<div></div>
12</div>
13<h1>SND_SetChannelVolume <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">void SND_SetChannelVolume(
18        u32 <var>chBitMask</var>,
19        int <var>volume</var>,
20        SNDChannelDataShift <var>shift</var> );</code><br></pre></dd>
21</dl>
22<div class="refsection" lang="ja"><a name="IDACNWT"></a>
23      <h2>Arguments</h2>
24
25      <div class="variablelist">
26<table border="0">
27<col align="left" valign="top">
28<tbody>
29<tr>
30<td><em><strong><code>chBitMask</code></strong></em></td>
31<td>The channel bit mask. It specifies which channels to control.</td>
32</tr>
33<tr>
34<td><em><strong><code>volume</code></strong></em></td>
35<td>The volume. Takes a value between 0 and 127.</td>
36</tr>
37<tr>
38<td><em><strong><code>shift</code></strong></em></td>
39<td>The data shift setting.</td>
40</tr>
41</tbody>
42</table>
43</div>
44
45    </div>
46<div class="refsection" lang="ja"><a name="IDA5NWT"></a>
47      <h2>Return Values</h2>
48
49      <p>None.</p>
50    </div>
51<div class="refsection" lang="ja"><a name="IDAGOWT"></a>
52      <h2>Description</h2>
53      <p>
54Changes the channel volume.
55</p>
56      <p>
57The channel bit mask <code>chBitMask</code> specifies which channels to control. The channels are represented in order, with the lowest bit representing channel 0. Only channels whose representative bits are standing are controlled.
58</p>
59      <p>
60Choose from among these values for the data shift setting <code>shift</code>:
61</p>
62      <div class="table"><a name="IDAWOWT"></a><p class="title"><b><b>Table. SNDChannelDataShift</b></b></p>
63<table summary="SNDChannelDataShift" border="1">
64<colgroup><col><col></colgroup>
65<thead>
66<tr>
67<th>Label</th>
68<th>Description</th>
69</tr>
70</thead>
71<tbody>
72<tr>
73<td>SND_CHANNEL_DATASHIFT_NONE</td>
74<td>Do not perform a data shift.</td>
75</tr>
76<tr>
77<td>SND_CHANNEL_DATASHIFT_1BIT</td>
78<td>Shift data 1 bit right.</td>
79</tr>
80<tr>
81<td>SND_CHANNEL_DATASHIFT_2BIT</td>
82<td>Shift data 2 bits right.</td>
83</tr>
84<tr>
85<td>SND_CHANNEL_DATASHIFT_4BIT</td>
86<td>Shift data 4 bits right.</td>
87</tr>
88</tbody>
89</table>
90</div>
91      <div class="note">
92<h3 class="title">Note</h3>
93<p>
94This function is an ARM7 reserved function. After this function is called, its processing will occur only after the command is issued with the <tt class="function"><a href="SND_FlushCommand.html">SND_FlushCommand</a></tt> function.
95</p>
96<p>
97If program execution must be synchronized with process completion, first use the <tt class="function"><a href="SND_GetCurrentCommandTag.html">SND_GetCurrentCommandTag</a></tt> function to obtain the command tag immediately after calling this function. Then, after the command is issued, use the command tag and call either the <tt class="function"><a href="SND_IsFinishedCommandTag.html">SND_IsFinishedCommandTag</a></tt> or <tt class="function"><a href="SND_WaitForCommandProc.html">SND_WaitForCommandProc</a></tt> function to confirm that processing has finished or to wait for it to complete.
98</p>
99</div>
100    </div>
101<h2>See Also</h2>
102<p><code><a href="SND_FlushCommand.html">SND_FlushCommand</a>, <a href="SND_GetCurrentCommandTag.html">SND_GetCurrentCommandTag</a>, <a href="SND_IsFinishedCommandTag.html">SND_IsFinishedCommandTag</a>, <a href="SND_WaitForCommandProc.html">SND_WaitForCommandProc</a></code></p>
103<h2>Revision History</h2>
104<p>
1052005/02/17 Added a note about ARM7 command processing. <br>2004/07/20 Initial version.
106</p>
107</div>
108<hr><p>CONFIDENTIAL</p></body>
109</html>
110