Au file format

From Wikipedia, the free encyclopedia

The Au file format is a simple audio file format that consists of a header of 5 32-bit words, an optional information chunk and then the data (in big endian format). The format was introduced by Sun Microsystems and was also used on NeXT systems.

Although the format supports many audio encoding formats, it's often associated with the µ-law logarithmic encoding, which dates back at least to the Sparcstation I as the native method used by the SunOS /dev/audio interface which was widely used as a defacto "standard" for UNIX sound.

32 bit word field Description/Content Hexadecimal numbers in C notation
0 magic number the value 0x2e736e64 (four ASCII characters ".snd")
1 data offset the offset to the data in bytes. The minimum valid number is 24 (decimal), since this is the header length (5 32-bit words) plus a minimum of 4 bytes for the information chunk.
2 data size data size in bytes. If unknown, the value 0xffffffff should be used.
3 encoding Data encoding format:
4 sample rate the number of samples/second (e.g., 8000)
5 channels the number of interleaved channels (e.g., 1 for mono, 2 for stereo, more channels possible but may not be supported by all readers)

The type of encoding depends on the value of the 'encoding' field (word 3 of the header). Formats 2–7 are uncompressed PCM, therefore lossless. Formats 23–26 are ADPCM, which is a lossy, roughly 4:1 compression. Formats 1 and 27 are μ-law and A-law, respectively, both lossy. Several of the others are DSP commands or data, designed to be processed by the NeXT MusicKit software.

[edit] External links

In other languages