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

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

Contents


afGetFrameSize(3dm)					   afGetFrameSize(3dm)


NAME    [Toc]    [Back]

     afGetFrameSize, afGetVirtualFrameSize - get the track / virtual frame
     size in bytes for a specified audio track from an AFfilehandle structure

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     int afGetFrameSize(AFfilehandle file, int track, int extend3to4)

     int afGetVirtualFrameSize(AFfilehandle file, int track, int extend3to4)

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.

     extend3to4	  is a integer boolean value (i.e., 0 or 1) indicating whether
		  the routine should extend the	value of the frame size	for
		  24-bit uncompressed data out to 32 bits.

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

RETURN VALUE    [Toc]    [Back]

     afGetFrameSize() returns the size in bytes	of a sample frame in the file
     referenced	by track.  afGetVirtualFrameSize() returns size	in bytes of a
     sample frame in the audio buffer as specified by the current virtual
     format.  See afIntro(3dm) for an explanation of virtual format.

     In	case of	error, -1 is returned.

DESCRIPTION    [Toc]    [Back]

     afGetFrameSize() returns the size of a sample frame in an audio track in
     the file represented by the AFfilehandle argument.

     afGetVirtualFrameSize() does the same for the virtual format for the
     given track, as set by any	combination of calls to
     afSetVirtualSampleFormat(3dm) and afSetVirtualChannels(3dm).

     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.

     The extend3to4 allows the application to choose, in the case where	24-bit
     uncompressed data is present in the file associated with track, whether
     to	return the actual size in bytes	of a frame of data in that track (3 *
     number_of_channels) or the	size of	the frames which will be presented to
     the user (since this will always be 4-byte	sign-extended integer).	 The
     former is useful for informational	purposes, but the latter is necessary
     for determining the size of the audio buffer to be	handed to



									Page 1






afGetFrameSize(3dm)					   afGetFrameSize(3dm)



     afReadFrames(3dm).	 Note that extend3to4 only applies to 24-bit sample
     width.  It	is ignored in all other	cases.

SEE ALSO    [Toc]    [Back]

      
      
     afWriteFrames(3dm), afReadFrames(3dm), afGetChannels(3dm),
     afGetVirtualChannels(3dm),	afSetVirtualSampleFormat(3dm)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
AFgetchannels IRIX get the number of interleaved track / virtual channels from an AFfilehandle structure for an audio track
AFgetrate IRIX get the track/virtual sample rate for a specified audio track from an AFfilehandle structure
afGetPCMMapping IRIX get the track / virtual PCM mapping values 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
AFgetframecnt IRIX get the total sample frame count / data bytes / data offset for a specified audio track from an AFfilehandle s
afSetVirtualFormatParams IRIX set/get the virtual audio data format in an AFfilehandle for a specified audio track via dmParams
AFgetaeschanneldata IRIX get/set AES channel status information in an AFfilehandle structure for an audio track
AFgetcompression IRIX get the compression type and parameters for an audio track from an AFfilehandle structure
afGetFormatParams IRIX get the audio data format in an AFfilehandle for a specified audio track via dmParams
AFsetloopstart IRIX set the start/end markers, play mode, and track in an AFfilehandle structure for a specified loop.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service