{{Infobox file format
| name = Au
| icon =
| logo =
| screenshot =
| caption =
| extension = .au<br />.snd
| mime = audio/basic
| type code =
| uniform type =
| magic = .snd
| owner = [[Sun Microsystems]]
| type = [[Audio container]]
| container for = [[Audio]], most often [[µ-law]]
| contained by =
| extended from =
| extended to =
| standard =
}}
The '''Au file format''' is a simple [[audio file format]] introduced by [[Sun Microsystems]]. The format was common on [[NeXT]] systems and on early web pages. Originally it was headerless, being simply 8-bit [[mu-law|µ-law]]-encoded data at an 8000 Hz sample rate. Hardware from other vendors often used sample rates as high as 8192 Hz, often integer factors of video clock signals. Newer files have a header that consists of six [[32-bit]] words, an optional information chunk and then the data (in [[big endian]] format).
Although the format now supports many [[digital audio|audio encoding]] formats, it remains associated with the [[mu-law|µ-law]] logarithmic encoding. This encoding was native to the [[SPARCstation 1]] hardware, where [[SunOS]] exposed the encoding to apps through the /dev/audio interface. This encoding and interface became a [[de facto]] standard for [[Unix]] sound.
==New format==
{{-}}
{| class="wikitable" width="100%"
! 32 bit word
! field
! Description/Content [[Hexadecimal]] numbers in [[C (programming language)|C]] notation
|- valign = top
| 0
| [[Magic number (programming)|magic number]]
| the value <tt>0x2e736e64</tt> (four ASCII characters ".snd")
|- valign = top
| 1 || data offset
| the offset to the data in [[byte]]s. The minimum valid number is 24 (decimal), since this is the header length (six 32-bit words) with no space reserved for extra information.
|- valign = top
| 2 || data size
| data size in bytes. If unknown, the value <tt>0xffffffff</tt> should be used.
|- valign = top
| 3 || encoding || Data encoding format:
*1 = 8-bit [[G.711]] [[mu-law algorithm|µ-law]]
*2 = 8-bit linear [[Pulse code modulation|PCM]]
*3 = 16-bit linear [[Pulse code modulation|PCM]]
*4 = 24-bit linear [[Pulse code modulation|PCM]]
*5 = 32-bit linear [[Pulse code modulation|PCM]]
*6 = 32-bit [[IEEE floating-point standard|IEEE floating point]]
*7 = 64-bit [[IEEE floating-point standard|IEEE floating point]]
*8 = Fragmented sample data
*9 = DSP program
*10 = 8-bit [[Fixed-point arithmetic|fixed point]]
*11 = 16-bit [[Fixed-point arithmetic|fixed point]]
*12 = 24-bit [[Fixed-point arithmetic|fixed point]]
*13 = 32-bit [[Fixed-point arithmetic|fixed point]]
*18 = 16-bit linear with emphasis
*19 = 16-bit linear compressed
*20 = 16-bit linear with emphasis and compression
*21 = Music kit DSP commands
*23 = 4-bit ISDN [[mu-law algorithm|u-law]] compressed using the [[G.726|ITU-T G.721]] [[ADPCM]] voice data encoding scheme
*24 = [[G.722|ITU-T G.722]] [[ADPCM]]
*25 = [[G.723|ITU-T G.723]] 3-bit [[ADPCM]]
*26 = [[G.723|ITU-T G.723]] 5-bit [[ADPCM]]
*27 = 8-bit [[G.711]] [[A-law algorithm|A-law]]
|- valign = top
| 4 || sample rate
| the number of samples/second (e.g., 8000)
|- valign = top
| 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_algorithm|μ-law]] and [[A-law]], respectively, both lossy. Several of the others are [[digital signal processing|DSP]] commands or data, designed to be processed by the [[NeXT]] [[MusicKit]] software.
Note: PCM data appears to be encoded as signed, rather than unsigned.
==External links==
*[http://www.opengroup.org/public/pubs/external/auformat.html Sun .au sound file format]
{{Compression Formats}}
[[Category:Computer file formats]]
[[Category:Container formats]]
[[de:Au (Dateiformat)]]
[[tr:Au dosya biçimi]]