Prosody speech processing: API: sm_replay_status

Prototype Definition

int sm_replay_status(struct sm_replay_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_replay_status_parms {
	tSMChannelId channel;					/* inout */
	enum kSMReplayStatus {
		kSMReplayStatusComplete,
		kSMReplayStatusCompleteData,
		kSMReplayStatusUnderrun,
		kSMReplayStatusHasCapacity,
		kSMReplayStatusNoCapacity,
	} status;						/* out */
	tSM_UT32 offset;					/* out */
} SM_REPLAY_STATUS_PARMS;

Description

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.

This function can also be used for 'any channel' operation. This mode of operation is a legacy feature and is not recommended for new applications. See Prosody TiNG: any channel operation for more details.

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.

Fields

channel
The channel which is replaying.
status
The channel's status. One of these values:
kSMReplayStatusComplete
the replay job has completed, all module buffered data has been transmitted on the channel
kSMReplayStatusCompleteData
the replay job is still ongoing, all required data for replay has been supplied, the replay job will complete once all module buffered data has been transmitted
kSMReplayStatusUnderrun
data has not been supplied sufficiently frequently to replay job and the output has been padded out with silence
kSMReplayStatusHasCapacity
the replay job is still ongoing and the module has capacity to buffer further data for the job
kSMReplayStatusNoCapacity
the replay job is still ongoing and either all the replay data has now been received by the module or the module temporarily does not have capacity to buffer further data for the job
offset
The number of octets which had been played when the replay completed.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody speech processing API.