This function is useful for writers of audio-enabling macros who use compound files in their implementation.
The mmioCFCompact function does not use a compression algorithm to compact the compound file. It merely deletes elements in the CGRP whose ulMedType field of MMCTOCENTRY are marked as FOURCC_DEL and updates the ulMedType field to FOURCC_FREE. At the completion of the function, CTOC entries are sorted according to offset. Entries might not remain sorted if subsequent appends are made.
The mmioCFCompact function compacts the file in place; that is, the function rewrites the file within the same buffer as the source to save memory. No original can be salvaged if an error occurs during compaction. If this behavior is unacceptable use mmioCFCopy.
The mmioCFCopy function also compacts a file, but it rewrites the file to a specified target name. The target name cannot be the same as the source file name. Therefore, with this function you must delete the source file.