Wave Dictionary: Difference between revisions
Updated basically everything.
m (→RwaWaveFormat) |
(Updated basically everything.) |
||
Line 1:
The '''RenderWare Audio Wave Dictionary''' container format
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 ===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|
|-
| 0x4 || 0x1 || bool || ? || Indicates the stream header should be byteswapped || Causes <code>_RwaWaveDictStreamHeaderByteSwap()</code> to be run
|-
|
|-
|
|-
| 0xC || 0x4 || [[#RwaWaveDict|RwaWaveDict]]* || ? || Wave dictionary ||
|-
| 0x10 || 0x4 || RwUInt32 || ? || || Unknown, but set at runtime if used
|-
| 0x14 || 0x4 || RwUInt32 || ? || Wave data size ||
|-
| 0x18 || 0x10 || [[#RwaUUID|RwaUUID]] || ? || Platform UUID || See [[#Platform|platform]]
|-
| 0x28 || 0x4 || void* || ? || Wave data ||
|}
===
{{todo|Research and list flags.}}
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0xC || [[#RwaUniqueID|RwaUniqueID]] || uniqueID || Dictionary ID || UUID set at runtime
|-
| 0xC || 0xC || [[#RwaLLNode|RwaLLNode]] || waveListHead || || Prev wraps to final node, next is first node, and data is nullptr<br>In wave dictionaries, data is an [[#RwaWave|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<br>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 ===
{{todo|Research and list flags.}}
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || [[#RwaUniqueID__uuid|RwaUniqueID__uuid]] || uuid || UUID ||
|-
| 0x4 || 0x4 || [[#RwaUniqueID__uuid|RwaUniqueID__name]] || name || Name ||
|-
| 0x8 || 0x4 || RwUInt32 || flags || Flags ||
|}
=== RwaLLNode ===
{| class="wikitable"
! 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 ||
|}
===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|
|-
| 0xC || 0x4 || RwaWaveDef* || waveDef || Wave definition<br>Primarily contains function pointers || Set at runtime<br>Structure not described here
|-
| 0x10 || 0x1C || [[#RwaWaveFormat|RwaWaveFormat]] || format || Source wave format ||
|-
| 0x2C || 0x1C || [[#RwaWaveFormat|RwaWaveFormat]] || targetFormat || Target wave format ||
|-
| 0x48 || 0x4 || RwUInt32 || uncompressedLength || || Null in samples. Set at runtime?
|-
|
|-
|
|-
| 0x54 || 0x4 || RwUInt32 || flags || Flags ||
|-
| 0x58 || 0x4 || RwaObj* || obj || Object data || Set at runtime<br>Structure not described here
|}
=== RwaWaveFormat ===
{{todo|Research and list flags.<br>Research misc data.}}
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|
|-
|
|-
|
|-
|
|-
|
|-
| 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 ||
|-
|
|-
| 0x19 || 0x1 || uint8_t || reserved || ||
|-
| 0x1A || 0x2 || || || Padding ||
|}
===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || RwUInt32 || time_low || rowspan=3|Timestamp if version 1, otherwise random || rowspan=3|Always a random value as UUID version is always 4<br>See [https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4 RFC 9562 Section 5.4]
|-
|
|-
| 0x6 || 0x2 || RwUInt16 || time_hi_and_version
|-
| 0x8 || 0x8 || RwUInt8[8] || node || ||
|}
= Unions =
=== RwaUniqueID__uuid ===
{| class="wikitable"
! Length !! Type !! Name !! Description !! Comments
|-
| 0x4 || [[#RwaUUID|RwaUUID]]* || uuid || ||
|-
|
|}
=== RwaUniqueID__name ===
{| class="wikitable"
! Length !! Type !! Name !! Description !! Comments
|-
|
|-
|
|}
= Enumerations =
=== Data type ===
{| class="wikitable"
! 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/2 Audio Layer I || 04c15ba7-f907-40ab-a49f-eefef8c4d296
|-
| 9 || rwaWAVEFORMAT_AC3 || Dolby AC-3 || a30db390-58a9-43c4-b9d2-55d84d3ae754
|-
| 10 || rwaWAVEFORMAT_IMAADPCM || Microsoft IMA ADPCM || ef386593-b611-432d-957f-a71ade44227a
|}
=== Platform ===
{| class="wikitable"
! 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
|}
[[Category:Formats_(Takedown-Dominator)]]
|