afSetTrackPCMMapping(3dm) afSetTrackPCMMapping(3dm) NAME afSetTrackPCMMapping - override the current PCM mapping values associated with a given track in an AFfilehandle SYNOPSIS #include <dmedia/audiofile.h> int afSetTrackPCMMapping(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) or its equivalent. track is an integer which identifies an audio track in handle. Since all currently supported file formats contain only one audio track, the value AF_DEFAULT_TRACK should always be used here for now. slope is a double precision floating point value which specifies an amplitude scaling factor for the waveform to be associated with track. intercept is a double precision floating point value indicating the audio waveform vertical midpoint ( zero-crossing) value for the audio data associated with track minclip is a double precision floating point value indicating the minimum or most negative audio data sample value to be read. Any value less than this will be set to minclip maxclip is a double precision floating point value indicating the maximum or most positive audio data sample value to be read. Any value greater than this will be set to maxclip DESCRIPTION afSetTrackPCMMapping() allows an application to override the default PCM mapping values associated with a track. This causes the Audio File Library to reinterpret the sample data loaded by afReadFrames(3dm) according the the new mapping. 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 afInitPCMMapping(3dm), afSetVirtualPCMMapping(3dm), afGetVirtualPCMMapping(3dm), afReadFrames(3dm) Page 2