Wave Dictionary: Difference between revisions
Content added Content deleted
m (→RwaWaveFormat) |
|||
(14 intermediate revisions by 3 users not shown) | |||
Line 10: | Line 10: | ||
| 0x00 || uint32_t || <code>0x809</code> || Magic number. |
| 0x00 || uint32_t || <code>0x809</code> || Magic number. |
||
|- |
|- |
||
| 0x04 || uint32_t || || |
| 0x04 || uint32_t || || The single byte at 0x04 seems to be a Big Endian bool. |
||
|- |
|- |
||
| 0x08 || uintptr_t || || Pointer to audio data. |
| 0x08 || uintptr_t || || Pointer to audio data. |
||
Line 16: | Line 16: | ||
| 0x0C || [[Wave Dictionary#RwaWaveDict|RwaWaveDict]]* || || Pointer to wave dictionary. |
| 0x0C || [[Wave Dictionary#RwaWaveDict|RwaWaveDict]]* || || Pointer to wave dictionary. |
||
|- |
|- |
||
| 0x10 || uint32_t || || |
| 0x10 || uint32_t || || |
||
|- |
|- |
||
| 0x14 || uint32_t || || Audio data size. |
| 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> || Platform UUID. |
| 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. |
| 0x28 || uintptr_t || || Pointer to audio data. |
||
Line 27: | Line 27: | ||
== RwaUUID == |
== RwaUUID == |
||
{| class="wikitable" style=text-align:left |
|||
<syntaxhighlight lang="cpp"> |
|||
! Offset |
|||
struct RwaUUID |
|||
! Type |
|||
{ |
|||
! Name |
|||
uint32_t time_low; |
|||
|- |
|||
uint16_t time_mid; |
|||
| 0x00 || uint32_t || time_low |
|||
uint16_t time_hi_and_version; |
|||
|- |
|||
uint8_t node[8]; |
|||
| 0x04 || uint16_t || time_mid |
|||
}; |
|||
|- |
|||
</syntaxhighlight> |
|||
| 0x06 || uint16_t || time_hi_and_version |
|||
|- |
|||
| 0x08 || uint8_t[8] || node |
|||
|- |
|||
|} |
|||
== RwaUniqueID == |
== RwaUniqueID == |
||
{| class="wikitable" style=text-align:left |
|||
<syntaxhighlight lang="cpp"> |
|||
! Offset |
|||
struct RwaUniqueID |
|||
! Type |
|||
{ |
|||
! Name |
|||
RwaUUID* uuid; |
|||
|- |
|||
char* uniqueName; |
|||
| 0x00 || RwaUUID* || uuid |
|||
uint32_t flags; |
|||
|- |
|||
}; |
|||
| 0x04 || char* || name |
|||
</syntaxhighlight> |
|||
|- |
|||
| 0x08 || uint32_t || flags |
|||
|- |
|||
|} |
|||
== RwaWaveDict == |
== RwaWaveDict == |
||
{| class="wikitable" style=text-align:left |
|||
<syntaxhighlight lang="cpp"> |
|||
! Offset |
|||
class RwaWaveDict |
|||
! Type |
|||
{ |
|||
! Name |
|||
RwaUniqueID uniqueID; |
|||
|- |
|||
RwaLLNode waveListHead; |
|||
| 0x00 || RwaUniqueID || uniqueID |
|||
uint16_t pad; |
|||
|- |
|||
int8_t flagsAux; |
|||
| 0x0C || RwaLLNode || waveListHead |
|||
int8_t flags; |
|||
|- |
|||
RwLLLink link; |
|||
| 0x18 || int8_t || flagsAux |
|||
void* dumpAddr; |
|||
|- |
|||
void* waveRAMHandle; |
|||
| 0x19 || int8_t || flags |
|||
uint32_t waveRAMSize; |
|||
|- |
|||
}; |
|||
| 0x1C || RwLLLink || link |
|||
</syntaxhighlight> |
|||
|- |
|||
| 0x24 || void* || dumpAddr |
|||
|- |
|||
| 0x28 || void* || waveRAMHandle |
|||
|- |
|||
| 0x2C || void* || waveRAMSize |
|||
|- |
|||
|} |
|||
== RwaWaveFormat == |
== RwaWaveFormat == |
||
{| class="wikitable" style=text-align:left |
|||
<syntaxhighlight lang="cpp"> |
|||
! Offset |
|||
struct RwaWaveFormat |
|||
! Type |
|||
{ |
|||
! Name |
|||
uint32_t sampleRate; |
|||
! Description |
|||
RwaUUID* dataType; |
|||
|- |
|||
uint32_t length; |
|||
| 0x00 || uint32_t || sampleRate || |
|||
uint8_t bitDepth; |
|||
|- |
|||
uint8_t noChannels; |
|||
| 0x04 || uint32_t || dataType || 0: Sony PS ADPCM<br>1: Signed 16-bit PCM<br>3: Nintendo DSP ADPCM<br>4: Xbox IMA ADPCM |
|||
uint16_t pad; |
|||
|- |
|||
void* miscData; |
|||
| 0x08 || uint32_t || length || |
|||
|- |
|||
uint8_t flags; |
|||
| 0x0C || uint8_t || bitDepth || |
|||
|- |
|||
}; |
|||
| 0x0D || uint8_t || noChannels || |
|||
</syntaxhighlight> |
|||
|- |
|||
| 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 == |
== RwaWave == |
||
{| class="wikitable" style=text-align:left |
|||
<syntaxhighlight lang="cpp"> |
|||
! Offset |
|||
class RwaWave |
|||
! Type |
|||
{ |
|||
! Name |
|||
RwaUniqueID uniqueID; |
|||
|- |
|||
RwaWaveDef* waveDef; // Pointer to location in system memory. |
|||
| 0x00 || RwaUniqueID || uniqueID |
|||
RwaWaveFormat format; |
|||
|- |
|||
RwaWaveFormat targetFormat; // Usually identical to format. |
|||
| 0x0C || RwaWaveDef* || waveDef |
|||
uint32_t uncompressedLength; // 0 if using compressed audio. |
|||
|- |
|||
void* data; |
|||
| 0x10 || RwaWaveFormat || format |
|||
void* state; |
|||
|- |
|||
uint32_t flags; |
|||
| 0x2C || RwaWaveFormat || targetFormat |
|||
RwaObj* obj; |
|||
|- |
|||
}; |
|||
| 0x48 || uint32_t || uncompressedLength |
|||
</syntaxhighlight> |
|||
|- |
|||
| 0x4C || void* || data |
|||
|- |
|||
| 0x50 || void* || state |
|||
|- |
|||
| 0x54 || uint32_t || flags |
|||
|- |
|||
| 0x58 || RwaObj* || obj |
|||
|- |
|||
|} |
|||
[[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 |