next, au, sun - NeXT / Sun .au Audio File Formats
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 NeXT File Format (next) was created by NeXT, Inc. It consists of a
fixed-length header of 24 bytes followed by a variable-length text or
data block (minimum length 4 bytes), followed by a contiguous block of
binary data representing the sound samples. Sun Microsystems, Inc., used
this format as the model for their .au file format (but see CAVEATS
DATA FORMAT SPECIFICATIONS [Toc] [Back]
Two's complement integer, 32-bit single-precision floating point, or
64-bit double-precision floating point
For integer: 8, 16, 24, and 32 bit; floating points are always 32
and 64 bit, respectively
Only bigendian supported; littleendian files are generated on Intel
Any nonzero number, but 1, 2, and 4 are only ones found.
CCITT G.711 A-Law
CCITT G.711 ulaw
CCITT G.722 (SND_FORMAT_ADPCM_G722)
FILE FORMAT SPECIFICATIONS [Toc] [Back]
NeXT files can contain additional chunks of data. Most of these are
parsed by the AF and made available:
AF_MISC_NeXT NeXT 'info' chunk
The AF_MISC_NeXT miscellaneous chunk is typically used to store a
variable (and infinitely extendible) text string containing comments,
copyright information, etc. There are, however, a significant number of
NeXT format soundfiles which use this space to store application-specific
binary (i.e., non-ascii) data. There is no guarenteed way to determine
which is true, so applications should excercise care in printing the
contents of this chunk.
Most audio file format documents claim that NeXT and Sun .au files have
identical header formats. This is not the case. The difference lies in
the text block which follows the header: NeXT files require that this
chunk be at least 4 bytes (chars) long, whereas this chunk may be zerolength
in a Sun .au file.
The Audio File Library will always save 8kHz sampling rate values as the
"SND_RATE_CODEC" value (8012.8210513). The data in the file will not be
rate-converted; the mapping only occurs in the header writing procedure.
afInitFileFormat(3dm), afGetFileFormat(3dm), afIntro(3dm),
PPPPaaaaggggeeee 2222 [ Back ]