afSetTrackPCMMapping(3dm) afSetTrackPCMMapping(3dm)
afSetTrackPCMMapping - override the current PCM mapping values associated
with a given track in an AFfilehandle
#include <dmedia/audiofile.h>
int afSetTrackPCMMapping(AFfilehandle file, int track,
double slope, double intercept,
double minclip, double maxclip)
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
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.
PCM mapping is only useful for modifying 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
Page 1
afSetTrackPCMMapping(3dm) afSetTrackPCMMapping(3dm)
and positive N, where N is some non-zero positive value.
afInitPCMMapping(3dm), afSetVirtualPCMMapping(3dm),
afGetVirtualPCMMapping(3dm), afReadFrames(3dm)
PPPPaaaaggggeeee 2222 [ Back ]
|