afGetFD(3dm)afGetFD(3dm)NAME
afGetFD - get the Unix file descriptor for the file associated with an
AFfilehandle structure
SYNOPSIS
#include <dmedia/audiofile.h>
int afGetFD(AFfilehandle file)
PARAMETER
file is an AFfilehandle structure for the audio file whose file
descriptor you wish to obtain. This structure is the returned
value of an afOpenFile(3dm) call.
RETURN VALUEafGetFD() returns a nonnegative Unix file descriptor if file is
associated with an open file, or -1 in event of an error.
DESCRIPTIONafGetFD() returns the Unix file descriptor associated with a file
previously opened via a call to afOpenFile(3dm).
CAVEATS
The file descriptor returned by afGetFD() was intended to be used as part
of a select(2) loop and was not intended to allow users to read, write,
and seek in the file without the knowledge (i.e., independently) of the
Audio File Library. Many of the routines in the Audio File Library will
not function correctly if the user changes the file position on the file
descriptor returned by this function. See the section CAVEATS FOR USING
THE HANDLE'S FILE DESCRIPTOR in afIntro(3dm) and afSaveFilePosition(3dm)
for important information about how to deal with this situation.
SEE ALSOafOpenFile(3dm), afCloseFile(3dm), afSaveFilePosition(3dm),
afRestoreFilePosition(3dm)
Page 1