.\"Copyright 2010 (c) EPFL .TH XDF_DEFINE_ARRAYS 3 2010 "EPFL" "xdffileio library manual" .SH NAME xdf_define_arrays - Specify the number of input/output arrays .SH SYNOPSIS .LP .B #include .sp .BI "int xdf_define_arrays(struct xdf* " xdf "," .br .BI " unsigned int " narrays ", const size_t *" strides ");" .br .SH DESCRIPTION .LP \fBxdf_define_arrays\fP() specifies the number of arrays and its strides for upcoming calls to \fBxdf_write\fP(3) and \fBxdf_read\fP(3) using \fIxdf\fP. This function is used to configure the upcoming transfer. As such, it must be called before \fBxdf_prepare_transfer\fP(3) (calling it after will produce an error). However the function may be called several times but only the last call is meaningful for the transfer. .LP \fInarrays\fP specifies the number of arrays that will be provided in the argument list of \fBxdf_write\fP(3) or \fBxdf_read\fP(3). .LP \fIstrides\fP argument should point to an array of \fInarrays\fP unsigned int corresponding respectively to the stride of each arrays that will be supplied to the upcoming call to \fBxdf_write\fP(3) or \fBxdf_read\fP(3). The stride corresponds to the length in byte between two consecutive samples of the same channel in the array. .SH "RETURN VALUE" .LP \fBxdf_define_arrays\fP() returns 0 in case of success, otherwise \-1 and \fIerrno\fP is set appropriately. .SH ERRORS .TP 7 .B ENOMEM The system is unable to allocate resources. .SH "SEE ALSO" .BR xdf_prepare_transfer (3), .BR xdf_read (3), .BR xdf_write (3)