*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> audiofile/afSaveFilePosition (3d)              


afSaveFilePosition(3dm)				       afSaveFilePosition(3dm)

NAME    [Toc]    [Back]

     afSaveFilePosition, afRestoreFilePosition - save and retrieve logical
     audio sample read pointer

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     void afSaveFilePosition(AFfilehandle file)

     void afRestoreFilePosition(AFfilehandle file)

PARAMETER    [Toc]    [Back]

     file   is an AFfilehandle structure, previously returned by
	    afOpenFile(3dm) or afOpenFD(3dm).

DESCRIPTION    [Toc]    [Back]

     afSaveFilePosition() stores the logical audio sample read pointer to
     allow an application to perform UNIX operations such as read(2) or
     lseek(2).	The pointer MUST then be restored via afRestoreFilePosition
     before ANY	additional calls to AF routines	such as	afReadFrames(3dm) or
     afWriteFrames(3dm).  See the CAVEATS in afOpenFD(3dm) and afIntro(3dm).

EXAMPLE    [Toc]    [Back]

	  AFfilehandle file;
	  int fd, value;
	  file = afOpenFile("mysound", "r", NULL); /* open file	*/
	  afSaveFilePosition(file);		   /* save file	pointer	*/
	  fd = afGetFD(handle);			   /* get file descriptor */
						   /* now do UNIX operations */
	  lseek(fd, 50,	SEEK_SET);
	  read(fd, &value, sizeof(value));

	  afRestoreFilePosition(file);		   /* restore pointer */
	  afReadFrames(...);			   /* and go on	*/

SEE ALSO    [Toc]    [Back]

     afIntro(3dm), afGetFD(3dm), afReadFrames(3dm), afWriteFrames(3dm)

									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
AFseekframe IRIX move logical file read pointer for a specified audio track to a desired sample frame location / retrieve curre
AFreadmisc IRIX read from / write to / move logical read/write pointer for data in a miscellaneous chunk in an audio file
AFreadframes IRIX read sample frames from a specified audio track in an audio file
alReadFrames IRIX read interleaved sample frames from an audio port
AFwriteframes IRIX write audio sample frames to a specified track in an audio file
smp IRIX Sample Vision Audio File Format
alGetSampFmt IRIX get/set the sample format setting in an audio ALconfig structure
alWriteFrames IRIX write interleaved sample frames to an audio port
alZeroFrames IRIX write zero-valued sample frames to an audio port
dmPMGetPlugin IRIX retrieve a pointer to a special effects plugin
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service