int sm_record_bfile_start(struct sm_bfile_record_parms *file_parms)
typedef struct sm_bfile_record_parms { BFILE *fd; /* in */ SM_RECORD_PARMS record_parms; /* in */ int status; /* out */ tSM_UT32 private_length; /* out */ int completing; /* out */ char buffer[kSMMaxHBRecordDataBufferSize]; /* out */ } SM_BFILE_RECORD_PARMS;
Prepares channel for recording of data to a file from an input channel previously allocated by a call to sm_channel_alloc_placed().
The status field is used to indicate the current status of the
record. On return from a successful invocation of
sm_record_bfile_start()
it will be set to a value of ERR_SM_PENDING
and
will continue to have this value until recording has been
completed, aborted or terminated on occurrence of an error.
The fields private_length and buffer are used internally by the high level library and should not be accessed by the application.
The recording is finished when a call to sm_record_bfile_complete() returns.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody high level BFILE play/record API.