1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../../css/manpage.css" type="text/css" />
7<title>SetupBcwav</title>
8  </head>
9  <body>
10<h1><CODE>nn::snd::CTR::Voice::SetupBcwav</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14bool SetupBcwav(
15     uptr addrBcwav,
16     <a href="../../../../nn/snd/CTR/WaveBuffer/Overview.html">WaveBuffer</a> * pWaveBuffer0,
17     <a href="../../../../nn/snd/CTR/WaveBuffer/Overview.html">WaveBuffer</a> * pWaveBuffer1,
18     <a href="../../../../nn/snd/CTR/Bcwav/ChannelIndex.html">Bcwav::ChannelIndex</a> channelIndex = Bcwav::CHANNEL_INDEX_L
19);
20</pre>
21    </div>
22<h2>Arguments</h2>
23    <div class="section">
24      <table class="arguments">
25        <thead>
26          <tr>
27            <td width="15" />
28<th>Name</th>
29<td>Description</td>
30          </tr>
31        </thead>
32        <tr>
33<td>in</td>
34<th><CODE>addrBcwav</CODE></th>
35<td>Starting address of a <a href="../../../../nn/snd/CTR/Bcwav/Overview.html">BCWAV</a> file.</td>
36        </tr>
37        <tr>
38<td>in</td>
39<th><CODE>pWaveBuffer0</CODE></th>
40<td>Pointer to the <CODE>nn::snd::WaveBuffer</CODE> used for the initial playback.</td>
41        </tr>
42        <tr>
43<td>in</td>
44<th><CODE>pWaveBuffer1</CODE></th>
45<td>Pointer to the <CODE>nn::snd::WaveBuffer</CODE> used for looping playback.</td>
46        </tr>
47        <tr>
48<td>in</td>
49<th>channelIndex</th>
50<td>The channel to use.</td>
51        </tr> </table>
52    </div>
53<h2>Return Values</h2>
54<div class="section">Returns <CODE>true</CODE> if the operation succeeded, or <CODE>false</CODE> if it failed. </div>
55<h2>Description</h2>
56    <div class="section">
57<p>Parses a <a href="../../../../nn/snd/CTR/Bcwav/Overview.html">BCWAV</a> file and prepares for playback.</p><p>
58Configures the <CODE>Voice</CODE> and <CODE>WaveBuffer</CODE> settings based on the header information in the <CODE>Bcwav</CODE> file. The user must prepare the <CODE>WaveBuffer</CODE> objects and pass those addresses in arguments <SPAN class="argument">pWaveBuffer0</SPAN> and <SPAN class="argument">pWaveBuffer1</SPAN>.
59      </p><p>
60Only <SPAN class="argument">pWaveBuffer0</SPAN> is used when the loop flag in the <CODE>Bcwav</CODE> file is disabled. You may specify <CODE>NULL</CODE> for <SPAN class="argument">pWaveBuffer1</SPAN> in such cases.
61      </p><p>
62Both <SPAN class="argument">pWaveBuffer0</SPAN> and <SPAN class="argument">pWaveBuffer1</SPAN> are used when the loop flag in the <CODE>Bcwav</CODE> header is enabled, however. <SPAN class="argument">pWaveBuffer0</SPAN>  is for the initial playback, and <SPAN class="argument">pWaveBuffer1</SPAN> is for loop playback.
63      </p><p>
64If the <CODE>Bcwav</CODE> file audio is in stereo format, specify a value for the <SPAN class="argument">channelIndex</SPAN> argument to select either the left or right channel to assign to the <CODE>Voice</CODE> (you cannot use <CODE>Voice</CODE> with a stereo format). If the file is monaural, you must specify the left channel (<CODE>nn::snd::CTR::Bcwav::CHANNEL_INDEX_L</CODE>).
65      </p><!--       <p>         Bcwav ヘッダに含まれないパラメータのうち、本関数内部で自動的に初期化される         Voice パラメータは以下の通りです(下記の「ボリューム」とは全体のボリュームのことであり、         本関数では <ref def="nn::snd::CTR::MixParam" /> の設定はされません)。       </p>       <p>         <table>           <tr>             <th>ボリューム</th>             <td>1.0f</td>           </tr>           <tr>             <th>ピッチ</th>             <td>1.0f</td>           </tr>         </table>       </p> --></div>
66<h2>Revision History</h2>
67    <div class="section">
68      <dl class="history">
69        <dt>2010/10/22</dt>
70<dd>Revised to match change in specification to not configure parameters not included in Bcwav header.
71        </dd>
72        <dt>2010/07/22</dt>
73<dd>Initial version.<br />
74        </dd>
75      </dl>
76    </div>
77  <hr><p>CONFIDENTIAL</p></body>
78</html>