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

  man pages->IRIX man pages -> audiofile/AFgetframecnt (3d)              
Title
Content
Arch
Section
 

Contents


afGetFrameCount(3dm)					  afGetFrameCount(3dm)


NAME    [Toc]    [Back]

     afGetFrameCount, AFgetframecnt, afGetTrackBytes, afGetDataOffset -	get
     the total sample frame count / data bytes / data offset for a specified
     audio track from an AFfilehandle structure

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     AFframecount afGetFrameCount(AFfilehandle file, int track)

     AFfileoffset afGetTrackBytes(AFfilehandle file, int track)

     int afGetDataOffset(AFfilehandle file, int	track)

PARAMETER    [Toc]    [Back]

     file    is	an AFfilehandle	structure, previously created by a call	to
	     afOpenFile(3dm).

     track   is	an integer which identifies an audio track in file.

	     Since all currently supported file	formats	contain	exactly	one
	     audio track per file, the constant	AF_DEFAULT_TRACK should	always
	     be	used here.

RETURN VALUE    [Toc]    [Back]

     afGetFrameCount() returns the total number	of sample frames in track.
     afGetTrackBytes() returns the total number	of bytes of audio data in
     track.  afGetDataOffset() returns the offset in bytes to the beginning of
     the audio data in track.

     In	case of	error, -1 is returned by all of	these routines.

DESCRIPTION    [Toc]    [Back]

     afGetFrameCount(3dm) returns the current total number of sample frames in
     an	audio track in the file	represented by the AFfilehandle	argument.

     In	general, each sample frame in a	given track consists of	n samples,
     where n is	the value returned by afGetChannels(3dm) for track.  For
     monaural data, a sample frame consists of a single	audio sample.  For
     stereo data, a sample frame consists of a <left, right> stereo sample
     pair.

     afGetTrackBytes() returns the total number	of bytes of raw	audio data
     (i.e., prior to decompression) in track.  This is useful for determining
     raw file seek points, etc.

     The return	types AFframecount and AFfileoffset are	large enough to	hold
     the maximum possible frame	count value  and maximum possible byte size,
     respectively, for the current file	system.






									Page 1






afGetFrameCount(3dm)					  afGetFrameCount(3dm)


CAVEATS    [Toc]    [Back]

     This routine may 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 some important information about how to deal with	this
     situation.

SEE ALSO    [Toc]    [Back]

      
      
     afOpenFile(3dm), afWriteFrames(3dm), afReadFrames(3dm),
     afGetChannels(3dm).  afGetVirtualChannels(3dm), afSetVirtualChannels(3dm)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
afGetFrameSize IRIX get the track / virtual frame size in bytes for a specified audio track from an AFfilehandle structure
AFgetrate IRIX get the track/virtual sample rate for a specified audio track from an AFfilehandle structure
AFgetsampfmt IRIX get the track / virtual sample format or byte order for a specified audio track from an AFfilehandle structure
afSetVirtualFormatParams IRIX set/get the virtual audio data format in an AFfilehandle for a specified audio track via dmParams
afGetFormatParams IRIX get the audio data format in an AFfilehandle for a specified audio track via dmParams
AFseekframe IRIX move logical file read pointer for a specified audio track to a desired sample frame location / retrieve curre
AFgetchannels IRIX get the number of interleaved track / virtual channels from an AFfilehandle structure for an audio track
afGetPCMMapping IRIX get the track / virtual PCM mapping values for a specified audio track from an AFfilehandle structure
AFreadframes IRIX read sample frames from a specified audio track in an audio file
AFwriteframes IRIX write audio sample frames to a specified track in an audio file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service