int sm_put_replay_data(struct sm_ts_data_parms *datap)
typedef struct sm_ts_data_parms {
tSMChannelId channel; /* in */
char *data; /* in */
tSM_INT length; /* in */
} SM_TS_DATA_PARMS;
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.
data_length
set to a non-zero definite replay length) the sum of the length
parameters in the successive invocations of
sm_put_replay_data()
must equal the
data_length
parameter in the preceding call to
sm_replay_start().
Normally
length
must be set to kSMMaxReplayDataBufferSize octets,
however the final call in the sequence must set
length
to the remaining number of octets of replay data
(data_length % kSMMaxReplayDataBufferSize). The
call
sm_put_last_replay_data()
may not be used to supply data for a definite length replay job.
For an indefinite length replay job (invoked with
sm_replay_start()
passed zero data_length), data should be supplied
using successive invocations of
sm_put_replay_data()
with
length
set to kSMMaxReplayDataBufferSize octets, and then
the final call in the sequence must be to
sm_put_last_replay_data()
with
length
set to the remaining number of octets of replay data.
The application may be stimulated by a driver sent event when capacity on a channel becomes available (see sm_channel_set_event).
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody speech processing API.