Splicer
Splicer | |
---|---|
aka Splicer Data | |
Type ID | 0xA025 |
Category | Sound |
Memory distribution |
Main Memory only |
Editor available? |
No |
Splicers contain multiple sound assets typically played when triggered by the player's in-game actions.
Overview
Splicers are essentially a container format for related sounds which includes controls for volume, pitch, and other values. They are stored in the SOUND/SPLICER
folder. Notable splicers include the collision splice bank and passby asset, as well as the Presentation Asset, which includes menu and popup sounds.
Splicers are also found in engine sounds, where they are present in each exhaust bundle. These assets, referred to as "sweeteners", are self-contained and only accessed by their internal Registry and AttribSys Vault resources. Which sound does what appears to determined by a hardcoded order, though what that order is and how it handles having more or less splices is yet to be determined.
Each splice in a splicer may utilize more than one sample, with options for delaying playback. Sample repetition is also possible, as is modification (to the degree it is supported).
Structures
Note: Splicers begin with a Binary File resource. Pointers do not take the Binary File header into account.
Header
Some names and types are taken from the SpliceContainer
struct, but it is not the same.
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | int | Version | Always 1 | |
0x4 | 0x4 | int* | mpTableOfContents | Pointer to the number of, followed by the list of, sample data offsets | Offset relative to header end. Data offsets relative to end of TOC |
0x8 | 0x4 | int | mNumSplices | Number of SPLICE_Data entries |
SPLICE_Data
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | NameHash | Always null. Populated at runtime? | |
0x4 | 0x2 | uint16_t | SpliceIndex | Index of the spliced sound | Determines the order in which SampleRefs are read |
0x6 | 0x1 | int8_t | eSpliceType | Always 0 | |
0x7 | 0x1 | uint8_t | Num_SampleRefs | Number of SampleRefs used by the splice | |
0x8 | 0x4 | float | Volume | Volume of the splice | Typically 1 |
0xC | 0x4 | float | RND_Pitch | ||
0x10 | 0x4 | float | RND_Vol | ||
0x14 | 0x4 | SPLICE_SampleRef* | pSampleRefList | Always null. Populated at runtime? |
SPLICE_SampleRef
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x2 | uint16_t | SampleIndex | Index of the sample data to read | |
0x2 | 0x1 | int8_t | eSpliceType | Always 0 | |
0x3 | 0x1 | Padding | |||
0x4 | 0x4 | float | Volume | Volume to play the sample at | Typically 1 |
0x8 | 0x4 | float | Pitch | Pitch to play the sample at | Typically 1 |
0xC | 0x4 | float | Offset | Delay, in seconds, of the sample playback | Typically 0 (no delay) |
0x10 | 0x4 | float | Az | Typically 0 or -127 | |
0x14 | 0x4 | float | Duration | Duration, in seconds, of the sample playback | Always >0 |
0x18 | 0x4 | float | FadeIn | Duration, in seconds, of the fade in applied to the sample | Typically 0 |
0x1C | 0x4 | float | FadeOut | Duration, in seconds, of the fade out applied to the sample | Typically 0 |
0x20 | 0x4 | float | RND_Vol | Typically 1 | |
0x24 | 0x4 | float | RND_Pitch | Typically 0 | |
0x28 | 0x1 | uint8_t | Priority | Always 0 | |
0x29 | 0x1 | uint8_t | eRollOffType | Always 0 | |
0x2A | 0x2 | Padding |
Enumerations
There are two known enums used by splicers, eSpliceType
and eRollOffType
. These are not present in the debug data and cannot be listed as a result. Regardless, they are set to 0 in all known instances.