Westwood AUD Format
| Format type | Sound |
|---|---|
| Hardware | PCM |
| Number of sounds | 1 |
| Sampling rate | 0 Hz - 65535 Hz |
| Channel count | 1 or 2 |
| Bits per sample | 8 or 16 |
| Compressed? | Optional |
| Tags? | None |
| Games |
AUD is the format used by Westwood Studios to store game music and sound effects. Files typically have a .AUD extension, which probably stands for "Audio".
The format was first used in 1994, in the third game of the Legend of Kyrandia series, and has been in use until 1999. In Dune 2000, which was outsourced, only the music uses the AUD format.
File format
Header
The format starts with the following header.[1]
| Data type | Name | Description |
|---|---|---|
| UINT16LE | Rate | Sample rate in Hertz. Typically 11025Hz or 22050Hz, though it can handle 44100Hz. |
| INT32LE | Size | Size of file, minus the 12 byte header. |
| INT32LE | UncompSize | Bytes required to hold the decompressed data. |
| UINT8 | Flags | Two possible flags. Having the first bit enabled indicates stereo sound. Having the second bit enabled switches from 8-bit to 16-bit. |
| UINT8 | AudioType | There are three types: 0 = uncompressed (PCM), 1 = WW compressed (sliding buffer), 99 = SOS frame compression (IMA ADPCM)[2] |
Following this header are the actual frames of data.
Frames data
Each frame has the following header:
| Data type | Name | Description |
|---|---|---|
| UINT16LE | CompressedSize | Size of compressed data in bytes that follows this header. |
| UINT16LE | DecompressedSize | Size of decompressed data. |
| UINT32LE | Magic | Magic number. Always has value 0x0000DEAF ("Deaf", get it?) |
If the compression is IMA ADPCM, indicated by compression value 99 (0x63) in the header, then the data contains 4 bit nibbles, which decompress using IMA ADPCM to 16 bit PCM samples.
If the compression is WW compressed, indicated by compression value 1 (0x01), then the data is compressed using a system described in the code as a "sliding window delta compression". The code showing how it works can be found in the released source code. If you can figure out exactly how it works, please update this page.
Links
- Game Audio Player specs - documentation and specification on various game audio formats including Westwood Aud (see "AUD3.txt" and "WS-AUD.txt").
- WWLIB Audio source code from Electronic Arts's Red Alert 1 GitHub repository.
References
- ↑ AUDHeaderType in the Red Alert 1 source code.
- ↑ SCompressType in the Red Alert 1 source code. The mentioned SCOMP_SONARC is unused in the actual code.