afCloseFile(3dm) afCloseFile(3dm)
afCloseFile - close an audio file, update file header if file was opened
for write access.
#include <dmedia/audiofile.h>
int afCloseFile(AFfilehandle file)
file is the AFfilehandle structure for the audio file you want to
close. This structure is the returned value of the
afOpenFile(3dm) call.
afCloseFile() returns 0 if file is closed without error. If an error
occurs while closing file or updating the file header fields, it returns
-1.
afCloseFile() releases file's resources back to the system. This routine
also takes care of updating the header information for files which were
opened for write access. Since file will be deallocated, file's value
should not be used in any subsequent Audiofile Library procedure calls.
Note that afCloseFile() will close the file descriptor associated with
file whether it was opened with afOpenFile(3dm) or afOpenFD(3dm). This
is unfortunately not consistent with the SGI Movie Library, but must be
maintained for backwards compatibility.
This routine will not function correctly if the user changes the file
position on the file descriptor for the AFfilehandle being manipulated.
See the section CAVEATS FOR USING THE HANDLE'S FILE DESCRIPTOR in
afIntro(3dm) for important information about how to deal with this
situation.
afSyncFile(3dm), afOpenFile(3dm), afNewFileSetup(3dm),
afFreeFileSetup(3dm)
afCloseFile(3dm) afCloseFile(3dm)
afCloseFile - close an audio file, update file header if file was opened
for write access.
#include <dmedia/audiofile.h>
int afCloseFile(AFfilehandle file)
file is the AFfilehandle structure for the audio file you want to
close. This structure is the returned value of the
afOpenFile(3dm) call.
afCloseFile() returns 0 if file is closed without error. If an error
occurs while closing file or updating the file header fields, it returns
-1.
afCloseFile() releases file's resources back to the system. This routine
also takes care of updating the header information for files which were
opened for write access. Since file will be deallocated, file's value
should not be used in any subsequent Audiofile Library procedure calls.
Note that afCloseFile() will close the file descriptor associated with
file whether it was opened with afOpenFile(3dm) or afOpenFD(3dm). This
is unfortunately not consistent with the SGI Movie Library, but must be
maintained for backwards compatibility.
This routine will not function correctly if the user changes the file
position on the file descriptor for the AFfilehandle being manipulated.
See the section CAVEATS FOR USING THE HANDLE'S FILE DESCRIPTOR in
afIntro(3dm) for important information about how to deal with this
situation.
afSyncFile(3dm), afOpenFile(3dm), afNewFileSetup(3dm),
afFreeFileSetup(3dm)
PPPPaaaaggggeeee 1111 [ Back ]
|