afSetLoopStartFrame(3dm) afSetLoopStartFrame(3dm)
afSetLoopStartFrame, afSetLoopEndFrame, afSetLoopCount - set the
start/end frame and loop count from an AFfilehandle structure for a
specified loop.
#include <dmedia/audiofile.h>
int afSetLoopStartFrame(AFfilehandle file, int instid,
int loopid, AFframecount startframe)
int afSetLoopEndFrame(AFfilehandle file, int instid,
int loopid, AFframecount endframe)
int afSetLoopCount(AFfilehandle file, int instid,
int loopid, int count)
file is an AFfilehandle structure, previously created by a call to
afOpenFile(3dm).
instid is a positive integer value which identifies an instrument
configuration in file. instid should be an element from an
array of IDs created via a call to afInitInstIDs(3dm).
loopid is a positive integer value which identifies a loop structure in
an instrument parameter chunk. You create loopid's by calling
afInitLoopIDs(3dm).
All of these routines return 0 on success or -1 if there is an error.
Each takes a loopid argument which provides a handle to a set of loop
parameters.
You can create a list of loop ID's for an audio track by calling
afInitLoopIDs(3dm). Logically, an audio file contains chunks of
instrument parameters (specified by instid handles), and each chunk of
instrument parameters may contain several loops.
AIFF(4) (and AIFF-C) files contain at most one instrument configuration,
but other file formats may contain multiple configurations. afQuery(3dm)
should be used to determine in advance whether a particular format
supports multiple inst chunks.
These routines allow you to set information about loops in an audio file
without the added overhead of using associated markers (see
afSetLoopStart(3dm)). This is necessary because several file formats now
supported by the Audio File Library contain loop information (i.e., start
and end points) which is completely independent of marker information.
In other words, the markers (if any) stored in the file header may and
Page 1
afSetLoopStartFrame(3dm) afSetLoopStartFrame(3dm)
usually will refer to locations in the file other than the loop start and
end points.
afOpenFile(3dm), afInitInstIDs(3dm), afSetInstParamLong(3dm),
afInitLoopIDs(3dm), afSetLoopStart(3dm), aiff(4), avr(4), wave(4), sd2(4)
PPPPaaaaggggeeee 2222 [ Back ]
|