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>AppendWaveBuffer</title>
8  </head>
9  <body>
10<h1><CODE>nn::snd::CTR::Voice::AppendWaveBuffer</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14void AppendWaveBuffer(
15     <a href="../../../../nn/snd/CTR/WaveBuffer/Overview.html">WaveBuffer</a> * buffer
16);
17</pre>
18    </div>
19<h2>Arguments</h2>
20    <div class="section">
21      <table class="arguments">
22        <thead>
23          <tr>
24            <td width="15" />
25<th>Name</th>
26<td>Description</td>
27          </tr>
28        </thead>
29        <tr>
30<td>in</td>
31<th>buffer</th>
32<td>Pointer to a buffer information structure.</td>
33        </tr> </table>
34    </div>
35<h2>Return Values</h2>
36    <div class="section">
37None.
38               </div>
39<h2>Description</h2>
40    <div class="section">
41<p>Appends sample data information corresponding to a voice.</p><p>
42There is no upper limit to the number of sets of buffer information that this function can append. Even if a voice is in the playback state, it does not produce audio output if it has no registered sound source data. Likewise, even if sound source data has been registered in a voice, the voice does not produce audio output in the stopped state.
43          </p><p>
44All of the following conditions must be met by the buffer memory region.
45<ul><li>The region has been obtained by the <a href="../../../nn/os/GetDeviceMemoryAddress.html"><CODE>nn::os::GetDeviceMemoryAddress</CODE></a> function.</li><li>The region is contiguous (specify <a href="../../../nn/os/ALLOCATE_OPTION_LINEAR.html"><CODE>nn::os::ALLOCATE_OPTION_LINEAR</CODE></a> as an allocator option).</li><li>The starting address is 32-byte aligned.</li><li>The buffer size is a multiple of 32 bytes.</li></ul>
46However, there are no restrictions on sample length. For instance, when adding a sample from a PCM8 monaural sound source, the data is 1 byte, but due to the 32-byte multiple restriction, the buffer must be allocated as 32 bytes.
47          </p><p>
48The buffer region must always be written back from the cache to memory using the <CODE>nn::snd::CTR::FlushDataCache</CODE> function. To reduce the processing load, call <CODE>nn::snd::CTR::FlushDataCache</CODE> only when necessary.
49          </p></div>
50<h2>Revision History</h2>
51    <div class="section">
52      <dl class="history">
53        <dt>2010/07/22</dt>
54<dd>Added a description of buffer memory region requirements.
55        </dd>
56        <dt>2010/01/29</dt>
57<dd>Initial version.<br />
58        </dd>
59      </dl>
60    </div>
61  <hr><p>CONFIDENTIAL</p></body>
62</html>