Prosody WAV FILE: API: sm_record_wav_start

Prototype Definition

int sm_record_wav_start(char *filename, SM_FILE_RECORD_PARMS *file_parms)

Parameters

filename
The name of the file in which to put the recorded data.
file_parms
A pointer to a structure as for sm_record_file_start().

Description

Creates a file with the given name, allocates space in the file by writing blank WAV file header, sets up fd in structure pointed at by file_parms and then invokes sm_record_file_start().

The other elements of the record_parms. structure must be set up as for sm_record_file_start(). The setting of the record_parms.type, parameter will determine type of WAV file created.

Note it is the responsibility of the application to close the file following record completion or abort using sm_record_wav_close().

Returns

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


This function is part of the Prosody WAV FILE API.