Prosody WAV BFILE: API: sm_replay_wav_bf_start

Prototype Definition

int sm_replay_wav_bf_start(char *filename, SM_BFILE_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_bfile_start().

Description

Opens and parses header of WAV file, sets up fd, replay_parms.type, and replay_parms.data_length, in structure pointed at by file_parms and then invokes sm_replay_bfile_start.

The other elements of the replay_parms structure must be set up as for sm_replay_bfile_start(). Note that the offset is assumed to be relative to the first octet of speech 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 BFILE play/record documentation and to close the file following replay completion or abort (using sm_replay_wav_bf_close()).

Returns

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


This function is part of the Prosody WAV BFILE API.