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>C Specification</h2> 17 18<BLOCKQUOTE> 19<pre><code>#include <wenc.h> 20 21#define WENC_FLAG_FIRST 0x00000000 22#define WENC_FLAG_CONT 0x00000001 23#define WENC_FLAG_LAST 0x00000002 24 25s32 WENCGetEncodeData(WENCInfo* info, 26u32 flag, 27const s16* pbyPcmData, 28s32 nSampleNum, 29u8* pbyEncData);</code></pre> 30</BLOCKQUOTE> 31 32<h2>Arguments</h2> 33 34<table border="1" cellpadding="3" cellspacing="0.1"> 35 <tr> 36<td width="120" bgcolor="#ffffe8"><em><strong><code>info</code></strong></em></td> 37<td width="520">Represents a pointer to the encoding information data.</td> 38 </tr> 39 <tr> 40<td width="120" bgcolor="#ffffe8"><em><strong><code>flag</code></strong></em></td> 41<td width="520">Represents an encode flag.</td> 42 </tr> 43 <tr> 44<td width="120" bgcolor="#ffffe8"><em><strong><code>pbyPcmData</code></strong></em></td> 45<td width="520">Represents a pointer to the PCM data to be encoded.</td> 46 </tr> 47 <tr> 48<td width="120" bgcolor="#ffffe8"><em><strong><code>nSampleNum</code></strong></em></td> 49<td width="520">Represents the number of samples to be encoded.</td> 50 </tr> 51 <tr> 52<td width="120" bgcolor="#ffffe8"><em><strong><code>pbyEncData</code></strong></em></td> 53<td width="520">Pointer to the location where encoded data is to be output.</td> 54 </tr> 55</table> 56 57<h2>Return Values</h2> 58 59<p>Returns the number of encoded samples.</p> 60 61<H2>Description</H2> 62 63<p>The <code>WENCGetEncodeData</code> function gets the number of samples of PCM data given by <code>nSampleNum</code> from the buffer specified by <code>pbyPcmData</code> and encodes that data for output by the controller speaker. Encoded data is output to <code>pbyEncData</code>.</p> 64 65<p><code>flag</code> is a flag used to control encoding. Be sure to specify <code>WENC_FLAG_FIRST</code> for <code>flag</code> for the first encoding and <code>WENC_FLAG_CONT</code> for <code>flag</code> for any subsequent encodings. Also, be sure to specify <code>WENC_FLAG_LAST</code> for the final encoding.</p> 66 67<p><code>info</code> is a pointer to encoding information data allocated by the user. I<code>WENCInfo</code> data is initialized and updated inside the library. During the continuous encoding period (period between <code>WENC_FLAG_FIRST</code> and <code>WENC_FLAG_LAST</code>) applications should not change the content of data in <code>WENCInfo</code>.</p> 68 69<H2>See Also</H2> 70 71<H2>Revision History</H2> 72 73<p>07/31/2006 Initial version.</p> 74 75<hr> 76<P>CONFIDENTIAL</p> 77</BODY> 78</HTML> 79