#defines



NumBytesToNumAudioFileMarkers


Converts a size in bytes to the number of AudioFileMarkers that can be contained in that number of bytes.

#define NumBytesToNumAudioFileMarkers(
    inNumBytes)  
Parameter Descriptions
inNumBytes
a number of bytes.
result
the number of AudioFileMarkers that can be contained in that number of bytes.
Discussion

This can be used for the kAudioFilePropertyMarkerList property when calculating the number of markers that will be returned.


NumAudioFileMarkersToNumBytes


Converts a number of AudioFileMarkers to a size in bytes.

#define NumAudioFileMarkersToNumBytes(
    inNumMarkers)  
Parameter Descriptions
inNumMarkers
a number of AudioFileMarkers.
result
the size in bytes required to contain that number of AudioFileMarkers.
Discussion

This can be used for the kAudioFilePropertyMarkerList property when calculating the size required to contain a number of AudioFileMarkers.


NextAudioFileRegion


convenience macro for traversing the region list.

#define NextAudioFileRegion(
    inAFRegionPtr) \ ((
    AudioFileRegion*)((
    char*)(
    inAFRegionPtr) + offsetof(
    AudioFileRegion, mMarkers) + ((
    inAFRegionPtr)->mNumberMarkers)*sizeof(
    CAFMarker))) 
Parameter Descriptions
inAFRegionPtr
a pointer to the current region.
result
a pointer to the region after the current region. This does not protect you from walking off the end of the list, so obey mNumberRegions.
Discussion

because AudioFileRegions are variable length, you cannot access them as an array. Use NextAudioFileRegion to walk the list.

(Last Updated July 18, 2005)