afInitMarkIDs(3dm) afInitMarkIDs(3dm) NAME afInitMarkIDs - specify a list of marker ID's for a new audio file in an AFfilesetup structure SYNOPSIS #include <dmedia/audiofile.h> void afInitMarkIDs(AFfilesetup setup, int trackid, int markids[], int nmarks) PARAMETER setup is an AFfilesetup structure, previously created by a call to afNewFileSetup(3dm). trackid is an integer which specifies an audio track in the file configuration. Since all currently supported audio file formats contain exactly one audio track, the value AF_DEFAULT_TRACK should always be used here for now. markids is an array of unique positive integer values to be used as handles for the marker structures in a file which is opened with setup. You typically allocate four marker structures so that you can store the beginning and end points for a sustain loop and a release loop. nmarks is an integer which indicates the number of marker ID's in the markids array. This is the total number of marker structures which will be allocated for the audio track. The only currently supported audio file formats which support marks (AIFF-C and AIFF) may store 0 to 65535 markers per track. Future audio formats are likely to vary. DESCRIPTION afInitMarkIDs() initializes a list of unique marker ID's corresponding to the marker structures in a given audio track. A marker logically is a pointer to a location "between" two sample frames in the track. You can assign sample frame positions to markers by calling afSetMarkPosition(). Position 0 is before the first sample frame, position 1 is between the first and second, and so on. Markers also contain name strings. You set the name for a marker by calling afInitMarkName(3dm). The string is copied into the corresponding marker structure in the audio file header by afOpenFile(3dm). By default, the library allocates four markers in file header, which is sufficient to store the endpoints for the sustain loop and release loop in an AIFF-C (or AIFF) file. You can acquire the default list of marker ID's by calling afGetMarkIDs() after you open a new file. The default names for the markers are null strings. CAVEATS The Audio File Library will continue to expand the number of supported file formats. The ability of these file formats to store various kinds and numbers of marks will vary. See afGetMarkIDs(3dm) for some important notes about handling this situation. SEE ALSO afNewFileSetup(3dm), afOpenFile(3dm), afGetMarkIDs(3dm), afSetMarkPosition(3dm), afInitMarkName(3dm) Page 2