#include <revolution/pmic.h> PMIC_ERR PMICExecEs(s16* send, s16* recv, s32 samples, BOOL init, BOOL* vflag);
send |
Pointer to the data to send to the other party in voice chat. |
|---|---|
recv |
Pointer to the data received from the other party in voice chat. |
samples |
The number of samples in the data being sent and received. |
init |
Specifies whether this is the first time this function is executed (TRUE), or a second or subsequent time (FALSE). |
vflag |
The speech state of the other party. Stores TRUE if the other party has spoken, and FALSE otherwise. |
Returns one of the following.
PMIC_ERR_OK |
The function was called successfully. |
|---|---|
PMIC_ERR_INVALID_ARGUMENTS |
The correct argument was not passed. |
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.
Use this function to curtail the residual echo component when both parties talk at once.
The first argument, send, 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.
The second argument, recv, 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.
The third argument, samples, specifies the number of data samples submitted to the echo suppressor. This function compares the values of each send and recv sample and determines an echo suppressor coefficient. It is therefore essential that the send and recv data consist of the same number of samples.
The init argument specifies whether this is the first time this function has been called. If it is the first time (TRUE), the function initializes the echo suppressor state. If a previous voice chat session has ended and you want to start a new session , specify TRUE for init.
The fifth argument, vflag, stores the speech state of the other party. The echo suppressor sets the value to TRUE if it determines that the other party spoke, and FALSE 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 PMICSetEcReset or PMICSetEcResetAsync function when the value of vflag changes from FALSE to TRUE.
Note: The vflag argument does not work properly in this version. Pass NULL to the fifth argument.
PMICSetEcResetAsync
PMICSetEcReset
2009/06/11 Revised Description.
2008/12/22 Standardized terminology.
2008/10/27 Added an argument and changed the return value.
2008/04/25 Initial version.
CONFIDENTIAL