Prosody WAV FILE: API: sm_replay_wav_start

Prototype Definition

int sm_replay_wav_start(char *filename, SM_FILE_REPLAY_PARMS *file_parms)

Parameters

filename
The name of the WAV file to be played.
file_parms
A pointer to a structure as for sm_replay_file_start().

Description

Opens and parses the header of WAV file, sets up fd, replay_parms.type, replay_parms.sampling_rate, and replay_parms.data_length, in structure pointed at by file_parms and then invokes sm_replay_file_start().

The other elements of the replay_parms structure must be set up as for sm_replay_file_start(). Note that the offset is assumed to be relative to the first octet of audio data following the WAV header. If offset, and replay_parms.data_length, are both set to zero then file_parms will be set up to replay all the speech data in the WAV file.

Note: It is the responsibility of the application to operate the replay as described in Prosody high level FILE play/record documentation and to close the file following replay completion or abort (using sm_replay_wav_close()).

Returns

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


This function is part of the Prosody WAV FILE API.