afGetPCMMapping(3dm)                                      afGetPCMMapping(3dm)


NAME
     afGetPCMMapping, afGetVirtualPCMMapping - get the track / virtual PCM
     mapping values for a specified audio track from an AFfilehandle structure

SYNOPSIS
     #include <dmedia/audiofile.h>

     void afGetPCMMapping(AFfilehandle file, int track,
                                 double *slope, double *intercept,
                                 double *minclip, double *maxclip)

     void afGetVirtualPCMMapping(AFfilehandle file, int track,
                                 double *slope, double *intercept,
                                 double *minclip, double *maxclip)

PARAMETER
     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 for now.

     slope   is a pointer to a double precision floating point value which
             specifies the amplitude scaling factor for the audio waveform
             associated with track

     intercept
             is a pointer to a double precision floating point value which
             specifies the audio waveform vertical midpoint (zero-crossing)
             value associated with track

     minclip is a pointer to a double precision floating point value
             indicating the minimum or most negative audio data sample value
             that will be returned.  Any value less than this is set to
             minclip

     maxclip is a pointer to a double precision floating point value
             indicating the maximum or most positive audio data sample value
             to be returned.  Any value greater than this is set to maxclip

DESCRIPTION
     afGetPCMMapping() returns the four values associated with the PCM (Pulse
     Code Modulation) mapping in an audio track in the file represented by the
     AFfilehandle argument, using the double pointer arguments.

     afGetVirtualPCMMapping() does the same for the virtual format for the
     given track, as set by any combination of calls to
     afSetVirtualPCMMapping(3dm) and afSetTrackPCMMapping(3dm).


     See afIntro(3dm) for a detailed description of the PCM mapping technique.

CAVEATS
     PCM mapping is only useful for modifying frames as they are read into or
     written out from a buffer via afReadFrames(3dm) or afWriteFrames(3dm).
     None of the currently supported file formats have the capability to store
     this information, even though the actual mapping can and will be applied
     to the frames stored in those files.  Therefor, it is important to be
     careful what values you specify.  In general, all two's complement and
     floating point sample formats are expected to be symmetrical about zero,
     i.e., the intercept will be 0.0 and minclip and maxclip will be negative
     and positive N, where N is some non-zero positive value.

SEE ALSO
     afWriteFrames(3dm), afReadFrames(3dm), afInitPCMMapping(3dm),
     afSetVirtualPCMMapping(3dm)


                                                                        Page 2