1XDF_SEEK(3)                xdffileio library manual                XDF_SEEK(3)
2
3
4

NAME

6       xdf_seek - move the sample pointer of a xDF file
7

SYNOPSIS

9       #include <xdfio.h>
10
11       off_t xdf_seek(struct xdf* xdf, off_t offset, int whence);
12

DESCRIPTION

14       xdf_seek() repositions the current sample pointer according to the cou‐
15       ple (offset,whence) where whence can be:
16
17       SEEK_SET
18              The offset is set to offset bytes.
19
20       SEEK_CUR
21              The offset is set to its current location plus offset bytes.
22
23       SEEK_END
24              The offset is set to the size of the file plus offset bytes.
25
26       The file referenced by xdf should have been opened with  mode  XDF_READ
27       and xdf_prepare_arrays(3) should have been successfully called on it.
28

RETURN VALUE

30       Upon  successful  completion,  xdf_seek()  returns the resulting offset
31       location as measured in number of samples from  the  beginning  of  the
32       recording.  Otherwise,  a  value  of -1 is returned and errno is set to
33       indicate the error.
34

ERRORS

36       EINVAL xdf is NULL or whence is none of the allowed values.
37
38       EPERM  No successfull call to xdf_prepare_transfer(3) have been done on
39              xdf or it has been opened using the mode XDF_WRITE.
40
41       ERANGE The requested offset is out of the range of the recording.
42
43       EINTR  The  call  was interrupted by a signal before any data was read;
44              see signal(7).
45
46       EIO    A low-level I/O error occurred while reading from the inode.
47
48       ESTALE Stale file handle. This error can occur for NFS  and  for  other
49              file systems
50

SEE ALSO

52       xdf_define_arrays(3), xdf_prepare_transfer(3)
53
54
55
56
57
58
59
60EPFL                                 2010                          XDF_SEEK(3)
Impressum