Sounds (Burnout Paradise): Difference between revisions

Added stream header clarification
(Add details of working with sounds.)
(Added stream header clarification)
Line 42:
<code>sx -sndplayer -ealayer3_int -playlocstream "F:\Music\The Primitives - Crash (falefee trap remix).mp3" -="F:\Music\The Primitives - Crash (falefee trap remix)"</code>
 
Once this is done, via a hex editor [https://mh-nexus.de/en/downloads.php?product=HxD20 such as HxD], the SNR should be given a [[Binary File]] header that looks like this:
Once this is done, the SNR 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.
 
<code>10 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00</code>
 
OnceWith thisthe isedit donecomplete, the SNRfile 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#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).
 
==== Gigasample ====
Line 52 ⟶ 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 [https://mh-nexus.de/en/downloads.php?product=HxD20 such as HxD] 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: