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>
58            Configures 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>
60            Only <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>
62            Both <SPAN class="argument">pWaveBuffer0</SPAN> and <SPAN class="argument">pWaveBuffer1</SPAN> are used when the loop flag in the <CODE>Bcwav</CODE> file 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>
64            If 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::Bcwav::CHANNEL_INDEX_L</CODE>).
65          </p><p>
66            This function automatically initializes <CODE>Voice</CODE> parameters that are not included in the BCWAV header as follows (<SPAN class="argument">Volume</SPAN> refers to the overall system volume; this function does not set <CODE>nn::snd::MixParam</CODE>).
67          </p><p><table><tr><th><SPAN class="argument">Volume</SPAN></th><td>1.0f</td></tr><tr><th>Pitch</th><td>1.0f</td></tr></table></p></div>
68    <h2>Revision History</h2>
69    <div class="section">
70      <dl class="history">
71        <dt>2010/07/22</dt>
72        <dd>Initial version.<br />
73        </dd>
74      </dl>
75    </div>
76  <hr><p>CONFIDENTIAL</p></body>
77</html>