wave, riff - Microsoft RIFF WAVE file format
The Audio File Library currently supports 13 of the commonly found audio
file formats, i.e., is able to recognize, read, and write sample data and
header information to and from files in these formats. It is important
not to confuse sample or audio data formats with file formats. The
former refers to the bit-wise organization of the sound samples in the
file, i.e., whether the format is 8-bit integer or 16-bit unsigned, etc.
Audio file format refers to the structure of the audio file header, the
chunk of on-disk data which preceeds the samples and which provides
information about the file to the audio program. A single audio file
format may support a large variety of sample formats.
The Microsoft RIFF WAVE File Format (wave) was created by Microsoft,
Inc., as an analog to the AIFF(4) file format. It consists of a
variable-length header followed by a contiguous block of binary data
representing the sound samples. Occasionally, additional chunks of nonaudio
information will be placed after the sound sample block.
DATA FORMAT SPECIFICATIONS [Toc] [Back]
Two's complement integer for 9-bit and greater sample widths,
unsigned for 8-bit and smaller sample widths.
From 1 to 32 bits, inclusive
Always littleendian (only applies to 9-bit and greater widths)
Any positive nonzero number, 1 and 2 most common
IMA ADPCM (AF_COMPRESSION_DVI_AUDIO)
Note that WAVE ADPCM compression is not currently supported by the Audio
FILE FORMAT SPECIFICATIONS [Toc] [Back]
WAVE file headers can contain large amounts of additional information.
Maximum of 1 allowed. Any number of loops per inst. Inst is stored
in a WAVE 'playlist' containing an arbitrary number of sound
segments to be played and repeated. As in an AIFF(4) file, each
loop contains a reference to a marker (one in the case of WAVE
rather than two as in AIFF). Markers are known as 'cue's. A loop
is stored as a reference to a starting cue, a length in samples,
plus a loop count (retrievable via afGetLoopCount(3dm)). Instparams
associated with this inst:
Any number of markers (known as 'cues' in WAVE file format) is
allowed. There must be at least one marker if there are loops
present in the file. There may be any number of "independent"
markers (not associated with loops) plus those needed to define the
starting positions of the loops present (see afSetLoopStart(3dm) and
related pages for further information).
In addition, it is possible to associate both a name string and a comment
string with each marker. The routines afInitMarkName(3dm) and
afInitMarkComment(3dm) will do this.
AF_MISC_COPY copyright string
AF_MISC_AUTH author string
AF_MISC_NAME name string
AF_MISC_COMMENT text comment string
AF_MISC_ICRD creation date string
AF_MISC_ISFT software name string
afInitFileFormat(3dm), afGetFileFormat(3dm), afIntro(3dm),
afInitCompression(3dm), afGetCompression(3dm), afSetLoopStart(3dm),
PPPPaaaaggggeeee 2222 [ Back ]