Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xdf_seek(3) [debian man page]

XDF_SEEK(3)						     xdffileio library manual						       XDF_SEEK(3)

NAME
xdf_seek - move the sample pointer of a xDF file SYNOPSIS
#include <xdfio.h> off_t xdf_seek(struct xdf* xdf, off_t offset, int whence); DESCRIPTION
xdf_seek() repositions the current sample pointer according to the couple (offset,whence) where whence can be: SEEK_SET The offset is set to offset bytes. SEEK_CUR The offset is set to its current location plus offset bytes. SEEK_END The offset is set to the size of the file plus offset bytes. The file referenced by xdf should have been opened with mode XDF_READ and xdf_prepare_arrays(3) should have been successfully called on it. RETURN VALUE
Upon successful completion, xdf_seek() returns the resulting offset location as measured in number of samples from the beginning of the recording. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
EINVAL xdf is NULL or whence is none of the allowed values. EPERM No successfull call to xdf_prepare_transfer(3) have been done on xdf or it has been opened using the mode XDF_WRITE. ERANGE The requested offset is out of the range of the recording. EINTR The call was interrupted by a signal before any data was read; see signal(7). EIO A low-level I/O error occurred while reading from the inode. ESTALE Stale file handle. This error can occur for NFS and for other file systems SEE ALSO
xdf_define_arrays(3), xdf_prepare_transfer(3) EPFL
2010 XDF_SEEK(3)

Check Out this Related Man Page

XDF_DEFINE_ARRAYS(3)					     xdffileio library manual					      XDF_DEFINE_ARRAYS(3)

NAME
xdf_define_arrays - Specify the number of input/output arrays SYNOPSIS
#include <xdfio.h> int xdf_define_arrays(struct xdf* xdf, unsigned int narrays, const size_t *strides); DESCRIPTION
xdf_define_arrays() specifies the number of arrays and its strides for upcoming calls to xdf_write(3) and xdf_read(3) using xdf. This function is used to configure the upcoming transfer. As such, it must be called before xdf_prepare_transfer(3) (calling it after will pro- duce an error). However the function may be called several times but only the last call is meaningful for the transfer. narrays specifies the number of arrays that will be provided in the argument list of xdf_write(3) or xdf_read(3). strides argument should point to an array of narrays unsigned int corresponding respectively to the stride of each arrays that will be sup- plied to the upcoming call to xdf_write(3) or xdf_read(3). The stride corresponds to the length in byte between two consecutive samples of the same channel in the array. RETURN VALUE
xdf_define_arrays() returns 0 in case of success, otherwise -1 and errno is set appropriately. ERRORS
ENOMEM The system is unable to allocate resources. SEE ALSO
xdf_prepare_transfer(3), xdf_read(3), xdf_write(3) EPFL
2010 XDF_DEFINE_ARRAYS(3)
Man Page