1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<title>PMICExecEs</title> 9</head> 10 11<body> 12 13<h1>PMICExecEs</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction"> 17#include <revolution/pmic.h> 18 19PMIC_ERR PMICExecEs(s16* send, s16* recv, s32 samples, BOOL init, BOOL* vflag); 20</pre></dd></dl> 21 22<h2>Arguments</h2> 23<TABLE class="arguments" border="1" > 24 <tr> 25<th><CODE>send</CODE></th> 26<td>Pointer to the data to send to the other party in voice chat.</td> 27 </tr> 28 <tr> 29<th><CODE>recv</CODE></th> 30<td>Pointer to the data received from the other party in voice chat.</td> 31 </tr> 32 <tr> 33<th><CODE>samples</CODE></th> 34<td>The number of samples in the data being sent and received.</td> 35 </tr> 36 <tr> 37<th><CODE>init</CODE></th> 38<td>Specifies whether this is the first time this function is executed (<code>TRUE</code>), or a second or subsequent time (<code>FALSE</code>).</td> 39 </tr> 40 <tr> 41<th><CODE>vflag</CODE></th> 42<td>The speech state of the other party. Stores <code>TRUE</code> if the other party has spoken, and <code>FALSE</code> otherwise.</td> 43 </tr> 44</table> 45 46<h2>Return Values</h2> 47<p> 48Returns one of the following. 49</p> 50 51<TABLE class="arguments" border="1" > 52 <tr> 53<th><CODE>PMIC_ERR_OK</CODE></th> 54<td>The function was called successfully.</td> 55 </tr> 56 <tr> 57<th><CODE>PMIC_ERR_INVALID_ARGUMENTS</CODE></th> 58<td>The correct argument was not passed.</td> 59 </tr> 60</TABLE> 61 62<H2>Description</H2> 63<p>Even though the Wii Speak has an echo canceler implemented as a hardware feature, you cannot completely eliminate the echo component from audio. This residual echo component can hamper smooth conversation when both parties talk at the same time during voice chat.</p> 64 65<p>Use this function to curtail the residual echo component when both parties talk at once.</p> 66 67<p>The first argument, <SPAN class="argument">send</SPAN>, specifies a pointer to data that was received from the Wii Speak and will be sent to the other party through the Voice Chat library. The data specified here is overwritten and output after its volume has been changed by this function.</p> 68 69 70<p>The second argument, <SPAN class="argument">recv</SPAN>, specifies a pointer to data that was received from the other party through the Voice Chat library. If you apply a digital volume to audio data from the other party, specify the resulting data here. The data specified here will also be overwritten and output after this function has changed its volume.</p> 71 72<p>The third argument, <SPAN class="argument">samples</SPAN>, specifies the number of data samples submitted to the echo suppressor. This function compares the values of each <SPAN class="argument">send</SPAN> and <SPAN class="argument">recv</SPAN> sample and determines an echo suppressor coefficient. It is therefore essential that the <SPAN class="argument">send</SPAN> and <SPAN class="argument">recv</SPAN> data consist of the same number of samples.</p> 73 74<p>The <SPAN class="argument">init</SPAN> argument specifies whether this is the first time this function has been called. If it is the first time (<code>TRUE</code>), the function initializes the echo suppressor state. If a previous voice chat session has ended and you want to start a new session , specify <CODE>TRUE</CODE> for <SPAN class="argument">init</SPAN>.</p> 75 76<p>The fifth argument, <SPAN class="argument">vflag</SPAN>, stores the speech state of the other party. The echo suppressor sets the value to <code>TRUE</code> if it determines that the other party spoke, and <code>FALSE</code> if it determines that either the local party spoke or the other party did not speak. You may be able to suppress unpleasant echoes during voice chat by calling the <code>PMICSetEcReset</code> or <code>PMICSetEcResetAsync</code> function when the value of <SPAN class="argument">vflag</SPAN> changes from <code>FALSE</code> to <code>TRUE</code>. 77</p> 78 79<p><B>Note: The <SPAN class="argument">vflag</SPAN> argument does not work properly in this version. Pass <code>NULL</code> to the fifth argument.</B></p> 80 81<H2>See Also</H2> 82<p> 83<a href="PMICSetEcResetAsync.html"><CODE>PMICSetEcResetAsync</CODE></a><BR> <a href="PMICSetEcReset.html"><CODE>PMICSetEcReset</CODE></a> 84</p> 85 86<H2>Revision History</H2> 87<p> 882009/06/11 Revised <B>Description</B>.<br>2008/12/22 Standardized terminology.<br>2008/10/27 Added an argument and changed the return value.<br>2008/04/25 Initial version. 89</p> 90 91<hr><p>CONFIDENTIAL</p></body> 92 93</html> 94