Prosody signal path processing: API: sm_path_status
Prototype Definition
int sm_path_status(struct sm_path_status_parms *statusp)
Parameters
- *statusp
-
a structure of the following type:
typedef struct sm_path_status_parms {
tSMPathId path; /* in */
enum kSMPathStatus {
kSMPathStatusRunning,
kSMPathStatusOngoingTone,
kSMPathStatusEndTone,
kSMPathStatusStopped,
} status; /* out */
union {
struct {
tSM_INT id; /* out */
unsigned duration; /* out */
} tone; /* out */
} u; /* out */
} SM_PATH_STATUS_PARMS;
Description
Returns the current status of the path or an error to indicate that
a problem occurred.
When the event, obtained from
sm_path_get_event(),
is signalled the user must call this function to determine the nature
of the status change. The change in status may indicate that an error
occurred whilst processing a user request or it may be notifiying the
user of a change to the previous state of the path.
Fields
- path
- The path to interrogate
- status
-
One of these values:
- kSMPathStatusRunning
- Indicates that there is nothing significant to report.
- kSMPathStatusOngoingTone
- Tone detector reports ongoing tone or silence.
- kSMPathStatusEndTone
- Tone detector reports previously ongoing tone or silence has completed.
- kSMPathStatusStopped
- Indicates that the path has stopped and can be destroyed.
- u
- Additional information relating to the current status of the path
- tone
- This field is only valid if the status is either
kSMPathStatusOngoingTone
or
kSMPathStatusEndTone.
- id
- The id for the recognised tone (or zero if silence).
- duration
- The ongoing or final duration of the tone or silence.
Returns
0
if call completed successfully, otherwise a standard error such as:
- ERR_SM_DEVERR - device error
- ERR_SM_NO_RESOURCES - if insufficient resources existed to create the path
This function is part of the Prosody signal path processing API.