Wave Dictionary: Difference between revisions

From Burnout Wiki
Content added Content deleted
No edit summary
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 =
Line 27: Line 27:
|-
|-
|}
|}

== RwaWaveDict ==
<syntaxhighlight lang="cpp">
class RwaWaveDict
{
RwaUniqueID uniqueID;
RwaLLNode waveListHead;
// uint16_t pad;
int8_t flagsAux;
int8_t flags;
RwLLLink link;
void* dumpAddr;
void* waveRAMHandle;
uint32_t waveRAMSize;
};
</syntaxhighlight>

== RwaWave ==
Each wave is of type <code>RwaWave</code> and is stored in a <code>RwLLNode</code> in an <code>RwLinkList</code>.

<syntaxhighlight lang="cpp">
class RwaWave
{
RwaUniqueID uniqueID;
RwaWaveDef* waveDef; // Pointer to location in system memory.
RwaWaveFormat format;
RwaWaveFormat targetFormat; // Usually identical to format.
uint32_t uncompressedLength;
void* data;
void* state;
RwUInt32 flags;
RwaObj* obj;
};
</syntaxhighlight>


== RwaUniqueID ==
== RwaUniqueID ==
Line 79: Line 45:
};
};
</syntaxhighlight>
</syntaxhighlight>

== RwaWaveDict ==
<syntaxhighlight lang="cpp">
class RwaWaveDict
{
RwaUniqueID uniqueID;
RwaLLNode waveListHead;
// uint16_t pad;
int8_t flagsAux;
int8_t flags;
RwLLLink link;
void* dumpAddr;
void* waveRAMHandle;
uint32_t waveRAMSize;
};
</syntaxhighlight>



== RwaWaveFormat ==
== RwaWaveFormat ==
Line 94: Line 77:
uint8_t flags;
uint8_t flags;
uint8_t reserved;
uint8_t reserved;
};
</syntaxhighlight>

== RwaWave ==


<syntaxhighlight lang="cpp">
class RwaWave
{
RwaUniqueID uniqueID;
RwaWaveDef* waveDef; // Pointer to location in system memory.
RwaWaveFormat format;
RwaWaveFormat targetFormat; // Usually identical to format.
uint32_t uncompressedLength;
void* data;
void* state;
uint32_t flags;
RwaObj* obj;
};
};
</syntaxhighlight>
</syntaxhighlight>

Revision as of 17:13, 22 May 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 uintptr_t Pointer to location in system memory. Usually nullptr.
0x08 uint32_t Container size.
0x0C uint32_t Container header size.
0x10 uint32_t If value at 0x04 is non-zero then this will be, too.
0x14 uint32_t Audio data size. ‎
0x18 RwaUUID 73F2018B 75DFF081 4BC8E45F 453A2D04 (Xbox)
‎‎‎‎5393C7DB EA6481AE 4917FC38 AAEAC9AC (PS2)
Platform UUID.
0x28 uint32_t Audio data position.
0x2C RwaWaveDict Wave Dictionary

RwaUniqueID

struct RwaUniqueID 
{
    union 
    {
        RwaUUID* uuid;
        RwaUUID* copyUUID;
    }

    struct name 
    {
        char* uniqueName;
        char* copyName;
    }
};

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;
    // uint8_t pad[2];
    void* miscData;
    uint8_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;
    void* data;
    void* state;
    uint32_t flags;
    RwaObj* obj;
};