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>PMICSetEcResetAsync</title> 9</head> 10 11<body> 12 13<h1>PMICSetEcResetAsync</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction"> 17#include <revolution/pmic.h> 18 19// Echo canceler reset state 20#define PMIC_EC_RESET_ON 0x0001 21#define PMIC_EC_RESET_OFF 0x0000 22 23typedef void (*PMICCallback)(PMIC_ERR result, void* arg); 24 25PMIC_ERR PMICSetEcResetAsync(u16 state, PMICCallback cb, void* arg); 26</pre></dd></dl> 27 28<h2>Arguments</h2> 29<TABLE class="arguments" border="1" > 30 <tr> 31<th>state</th> 32<td>Sets the reset state (ON/OFF) for the Wii Speak's echo canceler.</td> 33 </tr> 34 <tr> 35<th>cb</th> 36<td>Sets the callback function that will send notification of the execution results of this function.</td> 37 </tr> 38 <tr> 39<th>arg</th> 40<td>Passed as the second argument of the callback function above.</td> 41 </tr> 42</TABLE> 43 44<h2>Return Values</h2> 45<p> 46Returns one of the following. 47</p> 48 49<TABLE class="arguments" border="1"> 50 <tr> 51<th>PMIC_ERR_OK</th> 52<td>The function has been called normally.</td> 53 </tr> 54 <tr> 55<th>PMIC_ERR_INVALID_ARGUMENTS</th> 56<td>The correct argument was not passed.</td> 57 </tr> 58 <tr> 59<th>PMIC_ERR_INVALID_STATE</th> 60<td>The Wii Speak is not open.</td> 61 </tr> 62 <tr> 63<th>PMIC_ERR_BUSY</th> 64<td>Cannot register the command. Call the function again.</td> 65 </tr> 66 <tr> 67<th>PMIC_ERR_FATAL</th> 68<td>A fatal error has occurred.</td> 69 </tr> 70</TABLE> 71 72<H2>Description</H2> 73<p>Asynchronously sets the reset state (ON/OFF) for the Wii Speak's echo canceler.</p> 74 75<p>The echo canceler is reset automatically if the <code>PMICStart</code> or <code>PMICStartAsync</code> function is called to start the Wii Speak, so you do not normally need to use this function.</p> 76 77<p>However, the echo canceler sometimes stops functioning properly if, for example, packets are lost and the other party's voice is interrupted during voice chat. At such times, use this function to reset the echo canceler. This allows you to return the echo canceler to a normal state without stopping the Wii Speak.</p> 78 79<p>Call this function twice in the following order to reset the echo canceler.</p> 80 81<dl><dd><pre class="construction"> 82(1) PMICSetEcResetAsync(PMIC_EC_RESET_ON, (callback function), (parameters passed to the callback function)); 83(2) PMICSetEcResetAsync(PMIC_EC_RESET_OFF, (callback function), (parameters passed to the callback function)); 84</pre></dd></dl> 85 86<p>After the echo canceler is reset, it takes several seconds to begin having an effect on the echoes.</p> 87 88<p>One of the following is passed to <SPAN class="argument">result</SPAN>, the callback function's first argument.</p> 89 90<TABLE class="arguments" border="1" > 91 <tr> 92<th><CODE>PMIC_ERR_OK</CODE></th> 93<td>The reset state was set successfully.</td> 94 </tr> 95 <tr> 96<th><CODE>PMIC_ERR_NO_DEVICE</CODE></th> 97<td>The Wii Speak has been unplugged.</td> 98 </tr> 99 <tr> 100<th><CODE>PMIC_ERR_INVALID_STATE</CODE></th> 101<td>The Wii Speak is not open. (Confirm that the Wii Speak cable is inserted in the USB port.)</td> 102 </tr> 103 <tr> 104<th><CODE>PMIC_ERR_USB_ERROR</CODE></th> 105<td>An error occurred in USB communications. Call the function again.</td> 106 </tr> 107 <tr> 108<th><CODE>PMIC_ERR_FATAL</CODE></th> 109<td>A fatal error has occurred.</td> 110 </tr> 111</TABLE> 112 113<H2>See Also</H2> 114<p> 115<a href="PMICStartAsync.html"><CODE>PMICStartAsync</CODE></a><BR> <a href="PMICStart.html"><CODE>PMICStart</CODE></a> 116</p> 117 118<H2>Revision History</H2> 119<p> 1202009/04/10 Revised the sample code explanation. <br>2008/10/24 Added <B>Description</B>.<br>2008/10/22 Initial version. 121</p> 122 123<hr><p>CONFIDENTIAL</p></body> 124 125</html> 126