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    <style type="text/css"><!--
8      span.static_style
9      {
10        font-size			: 8pt;
11        color				: white;
12        font-weight			: bold;
13        background			: #44f;
14        border-left			: solid 1px #aaf;
15        border-top			: solid 1px #aaf;
16        border-right		: solid 1px #00c;
17        border-bottom		: solid 1px #00c;
18        padding-left		: 2px;
19        padding-right		: 2px;
20      }
21      span.virtual_style
22      {
23        font-size			 : 8pt;
24        color				 : white;
25        font-weight			: bold;
26        background			: #0a0;
27        border-left			: solid 1px #0f0;
28        border-top			: solid 1px #0f0;
29        border-right		: solid 1px #060;
30        border-bottom		: solid 1px #060;
31        padding-left		: 2px;
32        padding-right		: 2px;
33      }
34      span.protected_style
35      {
36        font-size			 : 8pt;
37        color				 : white;
38        font-weight			: bold;
39        background			: #444;
40        border-left			: solid 1px #ccc;
41        border-top			: solid 1px #ccc;
42        border-right		: solid 1px #222;
43        border-bottom		: solid 1px #222;
44        padding-left		: 2px;
45        padding-right		: 2px;
46      }
47        --></style>
48<title>nn::snd::CTR::WaveBuffer</title>
49  </head>
50  <body>
51<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/snd/Overview.html">snd</a>::<a href="../../../../nn/snd/CTR/Overview.html">CTR</a>::WaveBuffer</CODE> Structure</h1>
52<h2>Syntax</h2>
53    <div class="section">
54<pre class="definition">struct WaveBuffer
55{
56const void * bufferAddress;
57<a href="../../../../nn_types/s32.html">s32</a> sampleLength;
58const <a href="../../../../nn/snd/CTR/AdpcmContext/Overview.html">AdpcmContext</a> * pAdpcmContext;
59<a href="../../../../nn_types/uptr.html">uptr</a> userParam;
60bool loopFlag;
61<a href="../../../../nn/util/SizedEnum1/Overview.html">util::SizedEnum1</a>&lt; <a href="../../../../nn/snd/CTR/WaveBuffer/Status.html">Status</a> &gt; status;
62<a href="../../../../nn_types/u16.html">u16</a> bufferId;
63struct <a href="../../../../nn/snd/CTR/WaveBuffer/Overview.html">WaveBuffer</a> * next;
64};
65</pre>
66    </div>
67<h2>Description</h2>
68    <div class="section">
69<p>Structure that stores information about a buffer storing sample data.</p><p>
70Before using a <CODE>WaveBuffer</CODE> structure, always initialize it by calling the <CODE>nn::snd::CTR::InitializeWaveBuffer</CODE> function. After initialization, set the sample address and size, and if necessary set a pointer to the ADPCM context. Then call the <CODE>nn::snd::CTR::Voice::AppendWaveBuffer</CODE> function to register the buffer information to a voice.
71          </p><p>
72There are some restrictions on buffer addresses that are registered. See the <CODE>nn::snd::CTR::Voice::AppendWaveBuffer</CODE> function reference for details.
73          </p><p>
74The <SPAN class="argument">pAdpcmContext</SPAN> member is only used for adpcm playback. <SPAN class="argument">pAdpcmContext</SPAN> must be specified for the first <CODE>WaveBuffer</CODE> appended to the voice used for adpcm playback. When <SPAN class="argument">pAdpcmContext</SPAN> is <CODE>NULL</CODE> for any <CODE>WaveBuffer</CODE> appended later, the context is not updated when buffer jumps occur (stream playback).
75          </p><p>
76Use <SPAN class="argument">status</SPAN> to check the status of a buffer after it has been registered. See the <CODE>nn::snd::CTR::WaveBuffer::Status</CODE> enumerated type for how <SPAN class="argument">status</SPAN> values correspond to the buffer status.
77          </p></div>
78    <a name="enum" id="enum">
79<h2>Enumerated Types</h2>
80      <div class="section">
81        <table class="members">
82          <tr>
83            <td width="100"> </td>
84            <th>
85<a href="../../../../nn/snd/CTR/WaveBuffer/Status.html"><CODE>Status</CODE></a>
86            </th>
87<td>An enumerated type that indicates the buffer state.</td>
88          </tr> </table>
89      </div>
90    </a> <a name="variable" id="variable">
91<h2>Member Variables</h2>
92      <div class="section">
93        <table class="members">
94          <tr>
95            <td width="100"> </td>
96            <th>
97<span class="argument">bufferAddress</span>
98            </th>
99<td width="100">const void *</td>
100<td>Address of the storage location of the sample data. Required. Do not change this after registering to a voice.</td>
101          </tr>
102          <tr>
103            <td width="100"> </td>
104            <th>
105<span class="argument">sampleLength</span>
106            </th>
107<td width="100"><a href="../../../../nn_types/s32.html">s32</a></td>
108<td>Length of samples within the buffer. Required. Do not change this after registering to a voice.</td>
109          </tr>
110          <tr>
111            <td width="100"> </td>
112            <th>
113<span class="argument">pAdpcmContext</span>
114            </th>
115<td width="100">const <a href="../../../../nn/snd/CTR/AdpcmContext/Overview.html">AdpcmContext</a> *</td>
116<td>ADPCM context address. After registering to a voice, do not change this until after buffer playback has finished.</td>
117          </tr>
118          <tr>
119            <td width="100"> </td>
120            <th>
121<span class="argument">userParam</span>
122            </th>
123<td width="100"><a href="../../../../nn_types/uptr.html">uptr</a></td>
124<td>User parameter. Optional.</td>
125          </tr>
126          <tr>
127            <td width="100"> </td>
128            <th>
129<span class="argument">loopFlag</span>
130            </th>
131<td width="100">bool</td>
132<td>Loop flag. Optional.</td>
133          </tr>
134          <tr>
135            <td width="100"> </td>
136            <th>
137<span class="argument">status</span>
138            </th>
139<td width="100"><a href="../../../../nn/util/SizedEnum1/Overview.html">util::SizedEnum1</a>&lt; <a href="../../../../nn/snd/CTR/WaveBuffer/Status.html">Status</a> &gt;</td>
140<td>Buffer status. Used by the library. Do not change.</td>
141          </tr>
142          <tr>
143            <td width="100"> </td>
144            <th>
145<span class="argument">bufferId</span>
146            </th>
147<td width="100"><a href="../../../../nn_types/u16.html">u16</a></td>
148<td>ID used for managing the buffer. Used by the library. Do not change.</td>
149          </tr>
150          <tr>
151            <td width="100"> </td>
152            <th>
153<span class="argument">next</span>
154            </th>
155<td width="100">struct <a href="../../../../nn/snd/CTR/WaveBuffer/Overview.html">WaveBuffer</a> *</td>
156<td>Address of the next buffer structure. Used by the library. Do not change.</td>
157          </tr> </table>
158      </div>
159    </a>
160<h2>Revision History</h2>
161    <div class="section">
162      <dl class="history">
163        <dt>2010/07/22</dt>
164<dd>Added a description of adpcm stream playback.<br />
165        </dd>
166        <dt>2010/01/29</dt>
167<dd>Initial version.<br />
168        </dd>
169      </dl>
170    </div>
171  <hr><p>CONFIDENTIAL</p></body>
172</html>
173