int sm_play_tone_status(struct sm_play_tone_status_parms *statusp)
typedef struct sm_play_tone_status_parms {
tSMChannelId channel; /* inout */
enum kSMPlayToneStatus {
kSMPlayToneStatusComplete,
kSMPlayToneStatusOngoing,
} status; /* out */
} SM_PLAY_TONE_STATUS_PARMS;
This call, typically invoked in response to a write event being signalled, allows an application to determine the status of a specific on-going tone generation job.
In order to determine the status of a specific tone generation job on a particular output channel, the application should set channel to specify the job concerned.
In order to poll multiple tone generation jobs to see if any
have completed, the application should set
channel
to kSMNullChannelId. On successful completion, if
any tone generation job has completed, the
status
parameter will be set to
kSMPlayToneStatusComplete
and
channel
will indicate which channel has completed tone generation.
If no such channel exists, then
channel
will remain set to kSMNullChannelId and the call
will return ERR_SM_NO_SUCH_CHANNEL.
kSMNullChannelId, the only channels which can
be indicated as being ready are those which have been
registered for 'any channel' write operation using
sm_channel_set_event()
See Prosody TiNG: any channel operation
for how to do this.
When this function reports that the channel status is
kSMPlayToneStatusComplete,
this also marks the end of the use of the channel for playing a
tone, returning the channel output to an idle state ready to
start a new replay or other output operation. Note that this
means that if
sm_play_tone_status()
is used again on the channel before starting a new tone, then it
will report the error ERR_SM_WRONG_CHANNEL_STATE.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody speech processing API.