int sm_record_file_start(struct sm_file_record_parms *file_parms)
typedef struct sm_file_record_parms { tSM_OPEN_FILE fd; /* in */ SM_RECORD_PARMS record_parms; /* in */ int status; /* out */ tSM_UT32 private_length; /* out */ int completing; /* out */ char buffer[kSMMaxHiRecordDataBufferSize]; /* out */ } SM_FILE_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().
When using the TiNG dll under Windows use of this function requires a FILE* to be passed across the dll boundry. This may cause problems when the application uses a different C runtime library from the TiNG dll. Since the C runtime library used by the TiNG dll may change in future versions, this function is deprecated when using the TiNG dll.
The status field is used to indicate the current status of the
record. On return from a successful invocation of
sm_record_file_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_file_complete() returns.
__SMWIN32HLIB__
defined, in which case it must be a
Windows HANDLE
. It is recommended that the
Prosody high level BFILE play/record is used where possible
instead of rebuilding this library, since it avoids the risk of
accidentally using the library built for the wrong type of file
access.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody high level FILE play/record API.