Wave Dictionary: Difference between revisions

From Burnout Wiki
Content added Content deleted
No edit summary
 
(45 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The '''RenderWare Audio Wave Dictionary''' container format is used to store a collection of audio files. It uses the file extension <code>.awd</code>.
The '''RenderWare Audio Wave Dictionary''' container format is used to store a collection of audio files, or "waves." It uses the file extension <code>.awd</code>. Each wave is of type <code>RwaWave</code> and is stored in a <code>RwLLNode</code> in an <code>RwLinkList</code>.


= Layout =
= Layout =
{| class="wikitable" style=text-align:left
{| class="wikitable" style=text-align:left
! Offset
! Offset
! Name
! Type
! Type
! Value
! Value
! Description
! Description
|-
|-
| 0x00 || uint32_t || <code>0x809</code> || Magic number.
! colspan="5" | Header
|-
|-
| 0x04 || uint32_t || || The single byte at 0x04 seems to be a Big Endian bool.
|-
| 0x08 || uintptr_t || || Pointer to audio data.
|-
| 0x0C || [[Wave Dictionary#RwaWaveDict|RwaWaveDict]]* || || Pointer to wave dictionary.
|-
| 0x10 || uint32_t || ||
|-
| 0x14 || uint32_t || || Audio data size. ‎
|-
| 0x18 || [[Wave Dictionary#RwaUUID|RwaUUID]] || style="text-align:right" | Xbox: <code>73F2018B 75DFF081 4BC8E45F 453A2D04</code><br>‎‎‎‎PS2: <code>5393C7DB EA6481AE 4917FC38 AAEAC9AC</code><br>GCN: <code>48F6C70A 72142484 6A4279E1 D3329DFD</code> || Platform UUID.
|-
| 0x28 || uintptr_t || || Pointer to audio data.
|-
|}


== RwaUUID ==
{{ MemoryLocationTableRow | name= | offset=0x00 | type=RwUInt32 | value=0x809 | description=Magic Number. }}
{| class="wikitable" style=text-align:left
! Offset
! Type
! Name
|-
|-
| 0x00 || uint32_t || time_low
{{ MemoryLocationTableRow | name= | offset=0x04 | value= | type=uintptr_t | description=Pointer to location in system memory. Usually <code>nullptr</code>. }}
|-
|-
| 0x04 || uint16_t || time_mid
{{ MemoryLocationTableRow | name= | offset=0x08 | value= | type=UInt32 | description=Container size. }}
|-
|-
| 0x06 || uint16_t || time_hi_and_version
{{ MemoryLocationTableRow | name= | offset=0x0C | value= | type=UInt32 | description=Container header size. }}
|-
|-
| 0x08 || uint8_t[8] || node
{{ MemoryLocationTableRow | name= | offset=0x10 | value= | type=UInt32 | description=If value at <code>0x04</code> is non-zero then this will be, too. }}
|-
|-
|}
{{ MemoryLocationTableRow | name= | offset=0x14 | value= | type=UInt32 | description=Audio data size. }}‎

== RwaUniqueID ==
{| class="wikitable" style=text-align:left
! Offset
! Type
! Name
|-
|-
| 0x00 || RwaUUID* || uuid
{{ MemoryLocationTableRow | name= | offset=0x18 | type=byte[128] | value=<div style="text-align:center">0x73F2018B75DFF0814BC8E45F453A2D04 (Xbox)<br>0x‎‎‎‎5393C7DBEA6481AE4917FC38AAEAC9AC (PS2)</div> | description=Platform UUID. }}
|-
|-
| 0x04 || char* || name
{{ MemoryLocationTableRow | name= | offset=0x28 | value= | type=UInt32 | description=Audio data position. }}
|-
|-
| 0x08 || uint32_t || flags
! colspan="5" | Wave Dictionary
|-
|-
|}
{{ MemoryLocationTableRow | offset=0x2C | name=uniqueID | type=RwaUniqueID | value= | description= }}

== RwaWaveDict ==
{| class="wikitable" style=text-align:left
! Offset
! Type
! Name
|-
|-
| 0x00 || RwaUniqueID || uniqueID
{{ MemoryLocationTableRow | offset=0x38 | name=waveListHead | type=RwaLLNode | value= | description= }}
|-
|-
| 0x0C || RwaLLNode || waveListHead
{{ MemoryLocationTableRow | offset=0x44 | name=pad | type=byte[2] | value= | description= }}
|-
|-
| 0x18 || int8_t || flagsAux
{{ MemoryLocationTableRow | offset=0x46 | name=flagsAux | type=RwUInt8 | value= | description= }}
|-
|-
| 0x19 || int8_t || flags
{{ MemoryLocationTableRow | offset=0x47 | name=flags | type=RwUInt8 | value= | description= }}
|-
|-
| 0x1C || RwLLLink || link
{{ MemoryLocationTableRow | offset=0x48 | name=link | type=RwLLLink | value= | description= }}
|-
|-
| 0x24 || void* || dumpAddr
{{ MemoryLocationTableRow | offset=0x50 | name=dumpAddr | type=void* | value= | description= }}
|-
|-
| 0x28 || void* || waveRAMHandle
{{ MemoryLocationTableRow | offset=0x54 | name=waveRAMHandle | type=void* | value= | description= }}
|-
|-
| 0x2C || void* || waveRAMSize
{{ MemoryLocationTableRow | offset=0x58 | name=waveRAMSize | type=RwUInt32 | value= | description= }}
|-
|-
|}
! colspan="5" | <br> <!-- TODO: wtf is this called -->

== RwaWaveFormat ==
{| class="wikitable" style=text-align:left
! Offset
! Type
! Name
! Description
|-
| 0x00 || uint32_t || sampleRate ||
|-
| 0x04 || uint32_t || dataType || 0: Sony PS ADPCM<br>1: Signed 16-bit PCM<br>3: Nintendo DSP ADPCM<br>4: Xbox IMA ADPCM
|-
| 0x08 || uint32_t || length ||
|-
| 0x0C || uint8_t || bitDepth ||
|-
| 0x0D || uint8_t || noChannels ||
|-
| 0x10 || void* || miscData || Has a "00: GCN ADPCM Header" chunk which contains Nintendo DSP ADPCM coefficients and initial history data.
|-
| 0x14 || uint32_t || miscDataSize ||
|-
|-
| 0x18 || uint8_t || flags ||
{{ MemoryLocationTableRow | offset=0x5C | name= | value= | type=char[] | description=Name of the AWD.<br>Size between 1 and 12 characters.<br>Padded to the nearest 4-byte boundary. }}
|-
|-
| 0x19 || uint8_t || reserved ||
{{ MemoryLocationTableRow | offset= | name= | value= | type=RwLinkList<RwaLLNode> | description=Node data is of type <code>RwaWave</code> (see below.) }}
|-
|-
|}
|}


== RwaWave ==
== RwaWave ==
Each wave is of type <code>RwaWave</code>, stored in a <code>RwLLNode</code> in the <code>RwLinkList</code>. In the AWD are of type , and are serialized as below:
{| class="wikitable" style=text-align:left
{| class="wikitable" style=text-align:left
! Offset
! Offset
! Type
! Name
! Name
! Type
! Value
! Description
|-
|-
{{ MemoryLocationTableRow | offset=0x00 | name=uniqueID | type=RwaUniqueID | value= | description= }}
| 0x00 || RwaUniqueID || uniqueID
|-
|-
| 0x0C || RwaWaveDef* || waveDef
{{ MemoryLocationTableRow | offset=0x0C | name=waveDef | type=RwaWaveDef* | value= | description=Pointer to location in system memory. }}
|-
|-
{{ MemoryLocationTableRow | offset=0x10 | name=format | type=RwaWaveFormat | value= | description= }}
| 0x10 || RwaWaveFormat || format
|-
|-
| 0x2C || RwaWaveFormat || targetFormat
{{ MemoryLocationTableRow | offset=0x2C | name=targetFormat | type=RwaWaveFormat | value= | description= Usually identical to <code>format</code>. }}
|-
|-
| 0x48 || uint32_t || uncompressedLength
{{ MemoryLocationTableRow | offset=0x48 | name=uncompressedLength | type=RwUInt32 | value= | description= }}
|-
|-
{{ MemoryLocationTableRow | offset=0x4C | name=data| type=void* | value= | description= }}
| 0x4C || void* || data
|-
|-
{{ MemoryLocationTableRow | offset=0x50 | name=state | type=void* | value= | description= }}
| 0x50 || void* || state
|-
|-
| 0x54 || uint32_t || flags
{{ MemoryLocationTableRow | offset=0x54 | name=flags| type=RwUInt32 | value= | description= }}
|-
|-
{{ MemoryLocationTableRow | offset=0x58 | name=obj | type=RwaObj* | value= | description= }}
| 0x58 || RwaObj* || obj
|-
|-
|}
|}



This is followed by the <code>RwaLLNode</code>, the entry (of type <code>char[]</code>) and a 128-bit UUID.
[[Category:Formats_(Takedown-Dominator)]]

Latest revision as of 21:25, 17 June 2023

The RenderWare Audio Wave Dictionary container format is used to store a collection of audio files, or "waves." It uses the file extension .awd. Each wave is of type RwaWave and is stored in a RwLLNode in an RwLinkList.

Layout

Offset Type Value Description
0x00 uint32_t 0x809 Magic number.
0x04 uint32_t The single byte at 0x04 seems to be a Big Endian bool.
0x08 uintptr_t Pointer to audio data.
0x0C RwaWaveDict* Pointer to wave dictionary.
0x10 uint32_t
0x14 uint32_t Audio data size. ‎
0x18 RwaUUID Xbox: 73F2018B 75DFF081 4BC8E45F 453A2D04
‎‎‎‎PS2: 5393C7DB EA6481AE 4917FC38 AAEAC9AC
GCN: 48F6C70A 72142484 6A4279E1 D3329DFD
Platform UUID.
0x28 uintptr_t Pointer to audio data.

RwaUUID

Offset Type Name
0x00 uint32_t time_low
0x04 uint16_t time_mid
0x06 uint16_t time_hi_and_version
0x08 uint8_t[8] node

RwaUniqueID

Offset Type Name
0x00 RwaUUID* uuid
0x04 char* name
0x08 uint32_t flags

RwaWaveDict

Offset Type Name
0x00 RwaUniqueID uniqueID
0x0C RwaLLNode waveListHead
0x18 int8_t flagsAux
0x19 int8_t flags
0x1C RwLLLink link
0x24 void* dumpAddr
0x28 void* waveRAMHandle
0x2C void* waveRAMSize

RwaWaveFormat

Offset Type Name Description
0x00 uint32_t sampleRate
0x04 uint32_t dataType 0: Sony PS ADPCM
1: Signed 16-bit PCM
3: Nintendo DSP ADPCM
4: Xbox IMA ADPCM
0x08 uint32_t length
0x0C uint8_t bitDepth
0x0D uint8_t noChannels
0x10 void* miscData Has a "00: GCN ADPCM Header" chunk which contains Nintendo DSP ADPCM coefficients and initial history data.
0x14 uint32_t miscDataSize
0x18 uint8_t flags
0x19 uint8_t reserved

RwaWave

Offset Type Name
0x00 RwaUniqueID uniqueID
0x0C RwaWaveDef* waveDef
0x10 RwaWaveFormat format
0x2C RwaWaveFormat targetFormat
0x48 uint32_t uncompressedLength
0x4C void* data
0x50 void* state
0x54 uint32_t flags
0x58 RwaObj* obj