1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
6<title>WENCGetEncodeData</title>
7<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
8<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows">
9<META http-equiv="Content-Style-Type" content="text/css">
10</head>
11
12<body>
13
14<h1 align="left">WENCGetEncodeData</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;wenc.h&gt;
19
20#define WENC_FLAG_FIRST  0x00000000
21#define WENC_FLAG_CONT   0x00000001
22
23s32 WENCGetEncodeData(WENCInfo*  info,
24                      u32        flag,
25                      const s16* pbyPcmData,
26                      s32        nSampleNum,
27                      u8*        pbyEncData);
28</pre></dd></dl>
29
30<h2>Arguments</h2>
31<TABLE class="arguments" border="1" >
32  <tr>
33<th>info</th>
34<td>Represents a pointer to the encoding information data.</td>
35  </tr>
36  <tr>
37<th>flag</th>
38<td>Represents an encode flag.</td>
39  </tr>
40  <tr>
41<th>pbyPcmData</th>
42<td>Represents a pointer to the PCM data to be encoded.</td>
43  </tr>
44  <tr>
45<th>nSampleNum</th>
46<td>Represents the number of samples to be encoded.</td>
47  </tr>
48  <tr>
49<th>pbyEncData</th>
50<td>Pointer to the location where encoded data is to be output.</td>
51  </tr>
52</table>
53
54<h2>Return Values</h2>
55<p>Returns the number of encoded samples.</p>
56
57<H2>Description</H2>
58<p>The <code>WENCGetEncodeData</code> function gets the number of samples of PCM data given by <SPAN class="argument">nSampleNum</SPAN> from the buffer specified by <SPAN class="argument">pbyPcmData</SPAN> and encodes that data for output by the controller speaker. Encoded data is output to <SPAN class="argument">pbyEncData</SPAN>.</p>
59
60<p><SPAN class="argument">flag</SPAN> is a flag used to control encoding. Be sure to specify <code>WENC_FLAG_FIRST</code> for <SPAN class="argument">flag</SPAN> for the first encoding and <code>WENC_FLAG_CONT</code> for <SPAN class="argument">flag</SPAN> for any subsequent encodings.</p>
61
62<p><SPAN class="argument">info</SPAN> is a pointer to encoding information data allocated by the user. <code>WENCInfo</code> data is initialized and updated inside the library. The contents of the <code>WENCInfo</code> data should not be altered from the application while encoding is continuously taking place.</p>
63
64<H2>See Also</H2>
65<p>None.</p>
66
67<H2>Revision History</H2>
68<p>
692006/09/07 Deleted <CODE>WNC_FLAG_LAST</CODE>.<br>2006/07/31 Initial version.<BR>
70</p>
71
72<hr><p>CONFIDENTIAL</p></body>
73</html>
74