1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<title>AXDecodeAdpcmData</title>
6<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
7<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
8<META name="GENERATOR" content="Microsoft FrontPage 5.0">
9<META http-equiv="Content-Style-Type" content="text/css">
10</head>
11
12<body>
13
14<h1 align="left">AXDecodeAdpcmData</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">#include &lt;revolution/ax.h&gt;
18
19s32 AXDecodeAdpcmData(u8*       input,
20                      DSPADPCM* info,
21                      s32       samples,
22                      s16*      output);
23</pre></dd></dl>
24
25<h2>Arguments</h2>
26
27<table class="arguments" border="1" >
28  <tr>
29    <th>input</th>
30    <td>Pointer to DSP-ADPCM data to be decoded into 16-bit PCM data.</td>
31  </tr>
32  <tr>
33    <th>info</th>
34    <td>Pointer to the DSP-ADPCM data information.</td>
35  </tr>
36  <tr>
37    <th>samples</th>
38    <td>Number of samples to be decoded.</td>
39  </tr>
40  <tr>
41    <th>output</th>
42    <td>Pointer to the location to output the 16-bit PCM data.</td>
43  </tr>
44</table>
45
46<h2>Return Values</h2>
47
48<p>Returns the number of samples that were actually decoded.</p>
49
50<h2>Description</h2>
51
52<p>Decodes DSP-ADPCM format data into monaural 16-bit PCM data (big-endian). The CPU does the decoding. This function is primarily used to decode DSP-ADPCM data that has been encoded by the <code>AXGetAdpcmData</code> function.</p>
53
54<p>The second argument, <SPAN class="argument">info</SPAN>, specifies the location in which to store information about the DSP-ADPCM data specified in the first argument.</p>
55
56<p>The third argument, <SPAN class="argument">samples</SPAN>, specifies the number of samples to decode. If the number of samples inside the DSP-ADPCM data is less than <code>samples</code>, this function terminates when it has finished decoding all the DSP-ADPCM data. However, if the DSP-ADPCM data includes a loop, this function continues the loop until the number of samples decoded reaches the value given by <code>samples</code>.</p>
57
58
59<p>The fourth argument, <SPAN class="argument">output</SPAN>, specifies the location to output the 16-bit PCM data. Memory of size <code>samples &times; sizeof(s16)</code>, where <SPAN class="argument">samples</SPAN> is the second argument, must be preallocated for the region to use for outputting converted data. If the region specified here as the output location is accessed directly by AX, its address must be 4-byte aligned.</p>
60
61<h2>See Also</h2>
62
63<p class="reference">
64<a href="AXGetAdpcmData.html"><CODE>AXGetAdpcmData</CODE></a>
65</p>
66
67<H2>Revision History</H2>
68
69<p>
702008/12/17 Initial version.
71</p>
72
73<hr><p>CONFIDENTIAL</p></body>
74</html>