int sm_replay_status(struct sm_replay_status_parms *statusp)
typedef struct sm_replay_status_parms {
tSMChannelId channel; /* inout */
enum kSMReplayStatus {
kSMReplayStatusComplete,
kSMReplayStatusCompleteData,
kSMReplayStatusUnderrun,
kSMReplayStatusHasCapacity,
kSMReplayStatusNoCapacity,
} status; /* out */
/* Only in Prosody version 2 (TiNG) */
tSM_UT32 offset; /* out */
/* End of part only in Prosody version 2 (TiNG) */
} SM_REPLAY_STATUS_PARMS;
This call, typically invoked in response to a write event being signalled, allows an application to determine the status of replay jobs.
In order to determine the status of a specific replay job on a particular output channel, the application should set channel to specify the job concerned. On successful completion, the status field indicates the current status of the channel.
In order to determine the replay job that has completed or would
most benefit
from more data, on calling sm_replay_status the application
should set
channel
to kSMNullChannelId. On return, if any replay job
exists that would benefit from more data,
channel
will be set to the identifier for the output channel
corresponding to that job and
status
will be set to one of the values
kSMReplayStatusComplete,
kSMReplayStatusHasCapacity
or
kSMReplayStatusUnderrun.
If no such replay job 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.
A channel ceases to be replaying when this function returns a
status of
kSMReplayStatusComplete.
Until this happens, the channel output is reserved for the
replay and cannot be used for anything else. After this
happens, the channel output returns to being idle and
consequently if this function is used again it will return
the error ERR_SM_NO_REPLAY_IN_PROGRESS.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody speech processing API.