Prosody speech processing: API: sm_put_replay_data

Prototype Definition

int sm_put_replay_data(struct sm_ts_data_parms *datap)

Parameters

*datap
a structure of the following type:
typedef struct sm_ts_data_parms {
	tSMChannelId channel;					/* in */
	char *data;						/* in */
	tSM_INT length;						/* in */
} SM_TS_DATA_PARMS;

Description

Following a call to sm_replay_start(), as sm_replay_status() indicates that the channel is ready for successive amounts of data, the actual data to be replayed is supplied to the module via successive invocations of this function. The data parameter is a pointer to a buffer of data to replay in the appropriate format, and the length parameter gives the number of octets of valid data in the buffer.

The data should be presented in lengths which are multiples of four bytes because this is more efficiently handled than other lengths.

If the module has insufficient capacity to buffer all the given data, then some data may be transferred and the call may return the status ERR_SM_NO_CAPACITY or it may block until space is available.

The application may be stimulated by a driver sent event when capacity on a channel becomes available (see sm_channel_set_event).

Fields

channel
The channel which is replaying.
data
The data being provided.
length
The length of the data being provided.

Returns

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


This function is part of the Prosody speech processing API.