Splicer

From Burnout Wiki
Splicer
aka Splicer Data
No Example
Resource names Unknown
Type ID 0xA025
Category Sound
Memory
distribution
Main Memory only
Imports Unknown
Imported by Unknown
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

This is not a structure in itself. Instead, the data is read by SpliceManager::LoadSplice() and SpliceManager::LoadSpliceData(). The field names given here are these functions' parameter names.

Offset Length Type Name Description Comments
0x0 0x4 int versionOfData Version Must match KI_SPLICE_DATA_VERSION, which is 1
0x4 0x4 int sizedata Combined size of all SPLICE_Data and SPLICE_SampleRef entries
0x8 0x4 int numsplices Number of SPLICE_Data entries

sizedata and numsplices are used in conjunction with pdata (offset of versionOfData + 0xC) to calculate pointers to the following members of SpliceContainer:

  • mNumSamples, the total number of samples: pdata + sizedata
  • mpTableOfContents, an array of pointers to each sample: pdata + sizedata + 4
  • mpSampleData, the sample data: pdata + sizedata + 4 + (numsamples * 4)

These are used to read the sample data that follows the splice data and SampleRefs.

SPLICE_Data

Offset Length Type Name Description Comments
0x0 0x4 uint32_t NameHash Always null
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 nullptr in asset.
Changed to SpliceIndex 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.