Prosody high level FILE play/record: API: sm_replay_file_progress_istatus

Prototype Definition

int sm_replay_file_progress_istatus(SM_FILE_REPLAY_PARMS *file_parms, int initial_status)

Parameters

file_parms
A pointer to a structure passed into sm_replay_file_start() to start a replay that has not yet indicated that it has finished.
initial_status
A recent status returned from sm_replay_status().

Description

Transfers file data to speech processing module for previously initiated replay unless the channel has insufficient buffering space to accept more data, or all data has been transferred, or an error occurs.

If the current replay status for the channel is not known, then the sm_replay_file_progress() variant of the call must be used.

The parameter file_parms must point to the same sm_file_replay_parms structure as was previously used to initiate the file replay.

On return if the status field is still set to a value of ERR_SM_PENDING then further calls to this routine will be required to complete the file replay. If status has a zero value then replay has successfully completed. Otherwise replay has been terminated on error, and status will be set to a corresponding error code.

Note: this routine (or the equivalent sm_replay_file_progress()) must be periodically invoked following a call to sm_replay_file_start(). This may either be done explicitly by the application, or alternatively through a call to sm_replay_file_complete() which will handle the scheduling of calls to sm_replay_file_progress() on behalf of the application.

Returns

The same value as stored in the status field of the structure pointed to by file_parms which is 0 or ERR_SM_PENDING if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody high level FILE play/record API.