Sounds (Burnout Paradise): Difference between revisions

Replace Discord CDN link.
(Added section on changing song details.)
(Replace Discord CDN link.)
 
(6 intermediate revisions by 2 users not shown)
Line 1:
Sounds in ''Burnout Paradise'' are a multifaceted topic ranging from as high a level as the directory layout and in-game purposes of sounds to as low a level as the structure of the different formats and headers in the files. This page attempts to document the interactions between sound resources in order to provide an explanation of how sounds are accessed and played in-game. To do this appropriately, the creation and/or replacement of sounds is also covered.
 
= SndPlayer Plug-In Assets =
The primary sound asset, [[#Generic RWAC Wave Content | Generic RWAC Wave Content]], is a container for EA SndPlayer Plug-In Assets. The parsing of these assets has been difficult in the past but has become much easier due to multiple leaks of EA tools, the most pertinent being a 2008 version of '''sx''' (EA Sound Exchange) which can be downloaded [https://cdnmega.discordapp.comnz/attachmentsfile/810315459831398420/852793592610816030/sx.exe1FUxwYzC#h0jArYIIRlR1vIeS4CbuWy4pELWmh5-4VPffmZJgO0w here].
 
Sound Exchange is a command -line tool. Opening a command prompt window and dragging and dropping the executable should list the full path to it. This path will be referred to simply as <code>sx</code> from now on. Pressing enter should output basic information, and adding <code>-h</code> after a space should output a full help menu.
 
== Handling assets ==
=== Encoding ===
Sound exchange can encode streams to a number of codecs. Those relevant to ''Burnout Paradise'' are EA-XMA, XAS V1, EALayer3 V1, and EALayer3 V2 Spike. To encode a SndPlayer-compatible file, use the following syntax:
 
<code>sx -sndplayer -<format> <input> -=<output></code>
Line 14:
Where the available formats are <code>eaxma</code> (codec 3), <code>xas_int</code> (codec 4), <code>ealayer3_int</code> (codec 5), and <code>ealayer3spike_int</code> (codec 7). (Note: int stands for Interleaved.)
 
An example command would look like this:
 
<code>sx -sndplayer -ealayer3_int "F:\Music\The Primitives - Crash (falefee trap remix).mp3" -="F:\Music\The Primitives - Crash (falefee trap remix)"</code>
Line 35:
SndPlayer Plug-In Assets are, by default, a single file that is loaded into RAM. This is the SNR (RAM-targeted) file. Burnout, however, only uses this within other assets, such as engines or splicers. The majority of sounds use a different play location: stream or gigasample. Streams have a header which goes in RAM and is used to stream the rest of the file from alternative storage, such as discs or a hard drive. Gigasample is similar, but the first portion of the sound data resides in RAM along with the header so the rest of the stream can be loaded from storage while the sound plays.
 
Generally, it is streams that are encountered—in fact, only nine gigasamples are present in ''Burnout Paradise Remastered'', those being the intro videos, race starts, showtime transitions, Party fireworks, and online entry sounds. In other words, if you need a gigasample, you will know.
 
=== Encoding streams ===
Line 48:
With the edit complete, the file should be added to <code>SOUND/STREAMS/STREAMHEADERS.BUNDLE</code>, replacing the existing header if there was one. The SNS should go in <code>SOUND/STREAMS</code>, replacing the existing stream if there was one.
 
To find an existing header, search the [[Bundle (original)#Overview | Bundle debug data]] in ''Burnout Paradise Remastered'' for the file name. If it exists, the given resource ID is that of the resource that needs to be replaced. Depending on the toolset, it may be byteswapped (e.g., 01020304 becomes 04030201).
 
=== Encoding gigasamples ===
Line 58:
 
=== Decoding streams ===
Wave resources have a [[Binary File]] header that must be removed in order to decode. This is always the first 8 bytes of the file, which is padded to 16 bytes in the retail game. To remove it, open the SNR from <code>SOUND/STREAMS/STREAMHEADERS.BUNDLE</code> in a hex editor and delete the first 16 bytes of the file. If done correctly, the file should begin with the codec ID noted in [[#Encoding | Encoding]].
 
Once the SNR is edited, streams can be decoded by placing the SNR and SNS in the same directory and using the same file name on both. Then the stream can be decoded using the same command as with RAM-targeted assets:
Line 67:
 
=== Decoding gigasamples ===
Decoding a gigasample is exactly the same as decoding a stream. Unfortunately, due to what appears to be either errors or version incompatibilities, ''Burnout''<nowiki/>'s gigasamples cannot be decoded by Sound Exchange. It is unknown whether there is a way to correctly decode them.
 
= Global sound data =
The game uses an [[AttribSysVaultAttribSys (Burnout Paradise) | AttribSysVault]] resource stored in <code>SOUND/BURNOUTGLOBALDATA.BIN</code> to find and read global audio such as streams. BurnoutGlobalData contains several settings, such as what assets to use for different languages and what volume/pitch/etc to use for specific splicer sounds. It also contains strings, including those used to display the artist, track, and album names shown in-game.
 
BurnoutGlobalData works hand in hand with Registry and any additions to it must be reflected in the relevant Registry resource for use in-game.
Line 87:
 
=== Replacing a registry entry ===
Generally, replacing a registry entry is unnecessary. If changing the name is required, however, it can be done. When viewing the resource using a hex editor, by finding the associated <code>gamedb://</code> path (which includes the name of the file), an entry can be updated to use a new name. 16 bytes before the start of the string is the hash of that string. Using Bo98's [https://bpr.bo98.uk/cgssound-playback-name/ online hasher], the new string can have a [[Common_Data_Types_(Burnout_Paradise)#CgsSound::Playback::NameSound hash | Namesound hash]] generated and the old hash and string can be replaced, effectively replacing the entry.
 
Hashes for streams are different—they are hashes of the file name in the <code>gamedb://</code> string, such as <code>Adam_Ant</code> or <code>RaceStartRolling</code>. It is important to get this right as this is how the game will find the file to read from.
Line 100:
Ginsu Wave Content, usually just called Ginsu, is a sound asset type used specifically for engine acceleration and deceleration. Ginsu is an EA format that is widely understood, but has much more limited codec and setting support than RWAC Waves. A related type, Gunsu, is found the in the Black 2 development builds.
 
=== [[Registry (Burnout Paradise) | Registry]] ===
Registry resources are, as one might expect, a registry of sound assets. They are how the game finds and accesses sounds. It is among the most important sound resources—arguably more important than the assets themselves—but are unfortunately not entirely understood.
 
Line 116:
 
=== Other types ===
[[Nicotine Map|Nicotine]] assets are present in the final game but have not been researched, so their purpose is unknown. The same is true of [[Snapshot Data]]. [[Generic RWAC Reverb IR Content]] is present in [[Burnout 5 (2007-02-22 build)]] under <code>SOUND/IR.BUNDLE</code>. [[Voice Hierarchy]] and its [[Voicecollection Hierarchy Collection | collections]]variant are both unused in Burnout, though the former is present in [[Black 2 (2007-02-0813 build)]]. [[Snr]] and [[Interpreter Data]] are sound-related but entirely unused.
 
=== Related resource types ===
Certain resources are known to be related to specific sounds. World sounds are emitted by [[Trigger Data | triggers]], while there is another world-related type called [[Static Sound Map]] that very little is known about. Engines also employ [[AttribSysVaultAttribSys (Burnout Paradise) | AttribSysVault]] resources to control their behaviour. [[World Painter 2D]] resources are also related in that ambiences are in this format.