int sm_beep_listen_for(struct sm_beep_listen_for_parms *listenp)
typedef struct sm_beep_listen_for_parms { tSMChannelId channel; /* in */ tSM_INT min_duration; /* in */ double upper_limit; /* in */ double lower_limit; /* in */ } SM_BEEP_LISTEN_FOR_PARMS;
A beep will be recognised if it lasts for at least min_duration milliseconds and the frequency is between lower_limit and upper_limit.
When a beep is recognised, the recognition event associated with the channel is set and the application can then retrieve the details for the recognised beep by calling sm_get_recognised().
Setting min_duration to zero disables the detection.
The modules td and beepdet are required.
0 if call completed successfully, otherwise a standard error.
This function is part of the Prosody speech processing API.