Wave Dictionary
The RenderWare Audio Wave Dictionary container format stores audio assets in a linked list. It is normally given the file extensions .awd
, .hwd
, and .lwd
.
Wave dictionaries are used in Burnout 3, Revenge, and Dominator, as well as Black and Call of Duty: Finest Hour. Note that although Burnout Legends uses .*wd extensions, its files are not the same format as described here.
Structures
Stream header
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | RwUInt32 | ? | Magic number | 0x809 |
0x4 | 0x1 | bool | ? | Indicates the stream header should be byteswapped | Causes _RwaWaveDictStreamHeaderByteSwap() to be run
|
0x5 | 0x3 | Padding | |||
0x8 | 0x4 | RwUInt32 | ? | Size of the header data to read for wave loading | |
0xC | 0x4 | RwaWaveDict* | ? | Wave dictionary | |
0x10 | 0x4 | RwUInt32 | ? | Unknown, but set at runtime if used | |
0x14 | 0x4 | RwUInt32 | ? | Wave data size | |
0x18 | 0x10 | RwaUUID | ? | Platform UUID | See platform |
0x28 | 0x4 | void* | ? | Wave data |
RwaWaveDict
To do: Research and list flags. |
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0xC | RwaUniqueID | uniqueID | Dictionary ID | UUID set at runtime |
0xC | 0xC | RwaLLNode | waveListHead | Prev wraps to final node, next is first node, and data is nullptr In wave dictionaries, data is an RwaWave | |
0x18 | 0x2 | RwUInt8[2] | pad | Padding | |
0x1A | 0x1 | RwUInt8 | flagsAux | Auxiliary flags | |
0x1B | 0x1 | RwUInt8 | flags | Flags | |
0x1C | 0x4 | RwLLLink | link | Set at runtime Structure not documented here | |
0x24 | 0x4 | void* | dumpAddr | Wave dump address | Set at runtime |
0x28 | 0x4 | void* | waveRAMHandle | Wave handle | Set at runtime |
0x2C | 0x4 | RwUInt32 | waveRAMSize | Wave size in memory | Set at runtime |
RwaUniqueID
To do: Research and list flags. |
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | RwaUniqueID__uuid | uuid | UUID | |
0x4 | 0x4 | RwaUniqueID__name | name | Name | |
0x8 | 0x4 | RwUInt32 | flags | Flags |
RwaLLNode
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | RwaLLNode* | prev | Previous node | |
0x4 | 0x4 | RwaLLNode* | next | Next node | |
0x8 | 0x4 | void* | data | Current node's data |
RwaWave
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0xC | RwaUniqueID | uniqueID | Wave ID | Data set at runtime |
0xC | 0x4 | RwaWaveDef* | waveDef | Wave definition Primarily contains function pointers |
Set at runtime Structure not described here |
0x10 | 0x1C | RwaWaveFormat | format | Source wave format | |
0x2C | 0x1C | RwaWaveFormat | targetFormat | Target wave format | |
0x48 | 0x4 | RwUInt32 | uncompressedLength | Null in samples. Set at runtime? | |
0x4C | 0x4 | void* | data | Wave data | Set at runtime |
0x50 | 0x4 | void* | state | Wave state | Set at runtime |
0x54 | 0x4 | RwUInt32 | flags | Flags | |
0x58 | 0x4 | RwaObj* | obj | Object data | Set at runtime Structure not described here |
RwaWaveFormat
To do: Research and list flags. Research misc data. |
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | RwUInt32 | sampleRate | Sample rate | |
0x4 | 0x4 | RwaUUID* | dataType | Sample format | Index in asset, set to pointer at runtime. See data type |
0x8 | 0x4 | RwUInt32 | length | Duration (milliseconds) | |
0xC | 0x1 | uint8_t | bitDepth | Bit depth | |
0xD | 0x1 | uint8_t | noChannels | Number of channels | |
0xE | 0x2 | RwUInt8[2] | pad | Padding | |
0x10 | 0x4 | void* | miscData | Additional platform-specific data | Only used on GameCube in practice, where an additional header with coefficients and initial history data is present. |
0x14 | 0x4 | RwUInt32 | miscDataSize | Additional data size | |
0x18 | 0x1 | uint8_t | flags | Flags | |
0x19 | 0x1 | uint8_t | reserved | ||
0x1A | 0x2 | Padding |
RwaUUID
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | RwUInt32 | time_low | Timestamp if version 1, otherwise random | Always a random value as UUID version is always 4 See RFC 9562 Section 5.4 |
0x4 | 0x2 | RwUInt16 | time_mid | ||
0x6 | 0x2 | RwUInt16 | time_hi_and_version | ||
0x8 | 0x8 | RwUInt8[8] | node |
Unions
RwaUniqueID__uuid
Length | Type | Name | Description | Comments |
---|---|---|---|---|
0x4 | RwaUUID* | uuid | ||
0x4 | RwaUUID* | copyUUID |
RwaUniqueID__name
Length | Type | Name | Description | Comments |
---|---|---|---|---|
0x4 | RwChar* | uniqueName | ||
0x4 | RwChar* | copyName |
Enumerations
Data type
Index | Name | Format | UUID |
---|---|---|---|
0 | rwaWAVEFORMAT_VAG | PlayStation VAG ADPCM | d9ea9798-bbbc-447b-96b2-654759102e16
|
1 | rwaWAVEFORMAT_PCM | Signed 16-bit PCM | d01bd217-3587-4eed-b9d9-b8e86ea9b995
|
2 | rwaWAVEFORMAT_FLOAT | da1e4382-2c99-4c61-ad99-7f364b211537
| |
3 | rwaWAVEFORMAT_GCNADPCM | Nintendo DSP-ADPCM | f86215b0-31d5-4c29-bd37-cdbf9bd10c53
|
4 | rwaWAVEFORMAT_XADPCM | Xbox IMA ADPCM | 632fa22b-11dd-458f-aa27-a5c346e9790e
|
5 | rwaWAVEFORMAT_WMA | Windows Media Audio | 3f1d8147-b7c4-41e6-a69b-3cc0025b33c7
|
6 | rwaWAVEFORMAT_MP3 | MPEG-1/2 Audio Layer III | bacfb36e-529d-4692-bf53-324256b0734f
|
7 | rwaWAVEFORMAT_MP2 | MPEG-1/2 Audio Layer II | 34d09a54-57d3-409e-a6ad-2bc845aec339
|
8 | rwaWAVEFORMAT_MPG | MPEG-1 Audio Layer I | 04c15ba7-f907-40ab-a49f-eefef8c4d296
|
9 | rwaWAVEFORMAT_AC3 | Dolby AC-3 | a30db390-58a9-43c4-b9d2-55d84d3ae754
|
10 | rwaWAVEFORMAT_IMAADPCM | IMA ADPCM | ef386593-b611-432d-957f-a71ade44227a
|
IMA ADPCM is uncertain - Standard IMA? Microsoft IMA? Xbox IMA? VGMStream claims the codec under that UUID is identical to Xbox IMA ADPCM for RenderWare Stream .rws
.
Platform
Name | UUID |
---|---|
rwaHOST_PS2 | aaeac9ac-fc38-4917-ae81-64eadbc79353
|
rwaHOST_WIN32 | 44e50a10-08ba-4250-b971-69e921b9cf4f
|
rwaHOST_XBOX | 453a2d04-e45f-4bc8-81f0-df758b01f273
|
rwaHOST_GCN | fd9d32d3-e179-426a-8424-14720ac7f648
|