Prosody speech processing: API: sm_play_tone_list_status

Prototype Definition

int sm_play_tone_list_status(struct sm_play_tone_list_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_play_tone_list_status_parms {
	tSMChannelId channel;					/* inout */
	enum kSMPlayToneListStatus {
		kSMPlayToneListStatusOngoing,
		kSMPlayToneListStatusComplete,
		kSMPlayToneListStatusHasCapacity,
		kSMPlayToneListStatusUnderrun,
	} status;						/* out */
} SM_PLAY_TONE_LIST_STATUS_PARMS;

Description

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 list 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.

When this function reports that the channel status is kSMPlayToneListStatusComplete, this also marks the end of the use of the channel for playing tones, 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_list_status() is used again on the channel before starting a new tone, then it will report the error ERR_SM_WRONG_CHANNEL_STATE.

Fields

channel
The channel which is playing a tone.
status
The status of the tone generation. One of these values:
kSMPlayToneListStatusOngoing
The tone generation job is still ongoing.
kSMPlayToneListStatusComplete
The tone generation job has completed. This is signalled when the kSMToneOperationStop code is encountered in the tone list.
kSMPlayToneListStatusHasCapacity
The tone generation job is still ongoing and the module has capacity to buffer further data for the job.
kSMPlayToneListStatusUnderrun
Data has not been supplied sufficiently frequently to generation job and the output has been padded out with silence.

Returns

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


This function is part of the Prosody speech processing API.