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

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

s(3dm)

Contents


afInitPCMMapping(3dm)					 afInitPCMMapping(3dm)


NAME    [Toc]    [Back]

     afInitPCMMapping -	configure the PCM mapping for an audio track in	an
     AFfilesetup structure

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     void afInitPCMMapping(AFfilesetup setup, int track,
			   double slope, double	intercept,
			   double minclip, double maxclip)

PARAMETER    [Toc]    [Back]

     setup   expects an	AFfilesetup structure, previously created by a call to
	     afNewFileSetup(3dm).

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

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

     slope   is	a positive double-precision floating point value which
	     specifies an amplitude scaling factor for the waveform to be
	     associated	with track.

     intercept
	     is	a positive, negative, or zero double-precision floating	point
	     value which specifies the sample value which represents the
	     vertical midpoint ("zero crossing") of the	waveform to be
	     associated	with track.

     minclip and maxclip
	     are double-precision floating point values	which specify the
	     maximum desired negative and positive amplitudes for the waveform
	     associated	with track.  Any values	encountered outside the	range
	     [minclip, maxclip]	will be	clipped, i.e., set to these values.

DESCRIPTION    [Toc]    [Back]

     afInitPCMMapping()	configures the PCM mapping for the specified audio
     track in an AFfilesetup structure.	 setup is passed to afOpenFile(3dm)
     when a new	audio file is created.	See afIntro(3dm) for a detailed
     description of the	PCM mapping technique.

EXAMPLE    [Toc]    [Back]

     To	configure setup	for a floating point waveform with a total expected
     amplitude of 100.0	(i.e., values between -100.0 and 100.0)	and a
     symmetrical clipping to match, and	a 0.0 zero crossing value, the track
     would be initialized with the following:

     afInitPCMMapping(setup, AF_DEFAULT_TRACK, 100.0, 0.0, -100.0, 100.0);






									Page 1






afInitPCMMapping(3dm)					 afInitPCMMapping(3dm)


CAVEATS    [Toc]    [Back]

     If	this routine is	used, it must be called	after any calls	to
     afInitSampleFormat().  Setting the	sample format automatically resets the
     PCM mapping to the	default	values for the requested format.  PCM mapping
     is	useful for modifying the values	of frames as they are read into	or
     written out from a	buffer via afReadFramesintercept will be 0.0 and minclip and maxclip will	be
     negative and positive N, where N is some non-zero positive	value.

SEE ALSO    [Toc]    [Back]

      
      
     afOpenFile(3dm), afNewFileSetup(3dm), afReadFrames(3dm),
     afWriteFrames(3dm), afSetTrackPCMMapping(3dm),
     afSetVirtualPCMMapping(3dm), afGetVirtualPCMMapping(3dm)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
AFinitcompression IRIX configure the audio compression type and parameters in an AFfilesetup structure for an audio track
afGetPCMMapping IRIX get the track / virtual PCM mapping values for a specified audio track from an AFfilehandle structure
AFinittrackids IRIX initialize the list of audio track identifiers in an AFfilesetup structure.
afInitFormatParams IRIX initialize the audio data format in an AFfilesetup for a specified audio track via dmParams
AFinitsampfmt IRIX initialize the audio data format in an AFfilesetup for a specified audio track
AFgetchannels IRIX get the number of interleaved track / virtual channels from an AFfilehandle structure for an audio track
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
AFinitfilefmt IRIX initialize the audio file format type in an AFfilesetup structure
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service