irStartEcho, irStopEcho, irCheckEcho - add/drop/check echo cancellation
#include <irapi.h>
int irStartEcho (channel_id cid, int tag);
int irStopEcho (channel_id cid, int tag);
int irCheckEcho (channel_id cid);
The irStartEcho and irStopEcho functions start and stop, respectively, echo cancellation on the specified channel cid.
Echo cancellation is used to improve speech recognition accuracy during speech playback.
tag is used to correlate the function call with a subsequent event.
If successful, irStartEcho sets the cid to the IRS_ECHO_STARTING state. The cid is returned to the IRS_IDLE state when the IRE_ECHO_START event is generated.
If successful, irStopEcho sets the cid to the IRS_ECHO_STOPPING state. The cid is returned to the IRS_IDLE state when the IRE_ECHO_STOP event is generated.
irCheckEcho returns the status of the echo cancellation function for cid.
Echo cancellation disposition cannot be assessed until the event IRE_ECHO_START is received. The event_mod1 modifier of IRE_ECHO_START indicates whether the function was successful or an error occurred in starting the echo canceler or allocating resources. [See IrEVENTS(4IRAPI).]
IRE_ECHO_STOP is generated after echo cancellation is successfully turned off via irEchoStop or if there is a spontaneous echo cancellation failure. After IRE_ECHO_STOP is received, the application should discontinue attempts to use speech recognition during prompting. If echo cancellation was spontaneously stopped, applications may attempt to restart the echo canceler via irStartEcho.
All functions return IRR_FAIL if an error occurs.
For irStartEcho and irStopEcho:
IRR_OK is returned if the request is successful.
For irCheckEcho:
IRR_ON if the echo cancellation function is on
IRR_OFF if the echo cancellation function if off
irError is set as follows if an error occurs:
IRER_INVALID if the cid is not valid
IRER_REDUNDANT if echo cancellation is already on in the case of irStartEcho or already off in the case of irStopEcho
IRER_SYSERROR if a system call failure occurs (see irSysError for additional information)
IRER_BADSTATE if the library channel state is not IRS_IDLE
irEchoRes(3IRAPI), irRecog(3IRAPI), IrDEFINES(4IRAPI)
There is no longer the concept of obtaining and/or waiting for resources to become available. If echo cancellation could not be started, it will be indicated via the event_mod1 modifier of the IRE_ECHO_START event.
This is version 12/11/02 of this man page.