Working with RIFF Files

The preferred format for multimedia files is the Resource Interchange File Format (RIFF). The RIFF format is a tagged-file structure, and is described in detail in the file formats chapter in the Programmer's Reference.

The Multimedia file I/O services provide the following functions to support file I/O to RIFF files:

mmioAscend

Ascends out of a RIFF file chunk to the next chunk in the file.

mmioCreateChunk

Creates a new chunk in a RIFF file.

mmioDescend

Descends into a RIFF file chunk beginning at the current file position, or searches for a specified chunk.

mmioFOURCC

Converts four individual characters into a four-character code.

mmioStringToFOURCC

Converts a null-terminated string into a four-character code.

These functions work with the basic buffered and unbuffered file I/O services— you can open, read, and write RIFF files the same as other file types.