Wave Dictionary: Difference between revisions

From Burnout Wiki
Content added Content deleted
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 ==

Revision as of 16:55, 24 June 2021

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 Usually 0.
0x08 uintptr_t Pointer to audio data.
0x0C RwaWaveDict* Pointer to wave dictionary.
0x10 uint32_t If value at 0x04 is non-zero then this will be, too.
0x14 uint32_t Audio data size. ‎
0x18 RwaUUID Xbox: 73F2018B 75DFF081 4BC8E45F 453A2D04
‎‎‎‎PS2: 5393C7DB EA6481AE 4917FC38 AAEAC9AC
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

struct RwaUniqueID 
{
    RwaUUID* uuid;
    char* uniqueName;
    uint32_t flags;
};

RwaWaveDict

class RwaWaveDict
{
    RwaUniqueID uniqueID;
    RwaLLNode waveListHead;
    uint16_t pad;
    int8_t flagsAux;
    int8_t flags;
    RwLLLink link;
    void* dumpAddr;
    void* waveRAMHandle;
    uint32_t waveRAMSize;
};

RwaWaveFormat

struct RwaWaveFormat 
{
    uint32_t sampleRate;
    RwaUUID* dataType;
    uint32_t length;
    uint8_t bitDepth;
    uint8_t noChannels;
    uint16_t pad;
    void* miscData;
    uint32_t miscDataSize;
    uint8_t flags;
    uint8_t reserved;
};

RwaWave

class RwaWave 
{
    RwaUniqueID uniqueID;
    RwaWaveDef* waveDef; // Pointer to location in system memory.
    RwaWaveFormat format;
    RwaWaveFormat targetFormat; // Usually identical to format. 
    uint32_t uncompressedLength; // 0 if using compressed audio.
    void* data;
    void* state;
    uint32_t flags;
    RwaObj* obj;
};