EvilEngine/Sound Format: Difference between revisions

no edit summary
m (Seil moved page Sound Format to EvilEngine/Sound Format)
No edit summary
Line 55:
|}
 
===GameCube (MovieThe Game/Incredibles/RiseSpongeBob ofSquarePants Movie the- Underminer/RatRatatouille ProtoPrototype)===
In those games, the SNDI contains not only the sound headers but also the entirety of the sound files themselves.
 
Line 64:
! Offset !! Type !! Variable !! Description
|-
| 0x00 || [[AssetID]] || this'''uSoundInfoID''' || Asset ID of this asset
|-
| 0x04 || intuint || footerOffset'''uSumFSBSize / nOffsetFinalFSBEnd''' || Offset relative to end of this header to the Footer section. SubtractAdd 0x20 from this to get the absolute offset of the Footer.
|-
| 0x08 || byte[0x10]int || ?'''pFMusicMod''' || Usually all 0s''null''
|-
| 0x0C || int || '''pFSBFileArray''' || ''null''
| 0x18 || short || soundCount || Total amount of sounds in SNDI
|-
| 0x10 || int || '''pWavInfoArray''' || ''null''
| 0x1A || short || firstFSB3soundCount || Amount of sounds in the first FSB3 of the SNDI
|-
| 0x14 || int || '''pCutsceneAudioHeaders''' || ''null''
| 0x1C || short || otherFSB3soundCount || Amount of sounds combining all FSB3s which are not the first of the SNDI
|-
| 0x1E0x18 || byteushort || FSB3count'''nWavFiles''' || AmountTotal amount of FSB3sounds in filesSNDI
|-
| 0x1F0x1A || byteushort || cutsceneSoundCount'''nSounds''' || Amount of cutscene sounds in file.the '''Thefirst valuesFSB3 related to cutscene files are not addressed inof the description below yet.'''SNDI
|-
| 0x1A0x1C || shortushort || firstFSB3soundCount'''nStreams''' || Amount of sounds incombining all FSB3s which are not the first FSB3 of the SNDI
|-
| 0x1E || byte || '''nFSBFiles''' || Amount of FSB3 files
|-
| 0x1F || byte || '''nCutsceneAudioHeaders''' || Amount of cutscene sounds in file. '''The values related to cutscene files are not addressed in the description below yet.'''
|}
 
Line 167 ⟶ 173:
! Offset !! Type !! Variable !! Description
|-
| 0x00 || int[FSB3count[#SNDI Header|'''[nFSBFiles]''']] || FSB3offsets || An array of ints. The amount of ints is the same amount of FSB3 files, as set in the SNDI header. Each int is an offset to the start of each FSB3 file, relative to the end of the header. SubtractAdd 0x20 fromto each value to get the absolute offset of the file.
|}
 
After this, we have [[#SNDI Header|'''soundCountnWavFiles''']] times the following structure, which refers to each sound in the SNDI:
=====gcWavInfo=====
 
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x00 || [[Asset IDAssetID]] || [[SND]]/[[SNDS]]'''uAssetID''' || Asset ID of sound.
|-
| 0x04 || byte || unknown'''uFlags''' ||
|-
| 0x05 || byte || index'''uAudioSampleIndex''' || Zero-based index of sound inside its FSB3 file.
|-
| 0x06 || byte || fileIndex'''uFSBIndex''' || Zero-based index of the FSB3 file containing this sound (index to the FSB3offsets array).
|-
| 0x07 || byte || unknown'''uSoundInfoIndex''' ||
|}
 
Line 226 ⟶ 232:
| 0x1C || byte[16] || Padding ||
|}
 
 
===Playstation 2===
Line 234 ⟶ 239:
! Offset !! Type !! Variable !! Description
|-
| 0x00 || intuint || amount of SND'''num_effects''' || Amount of headers for SND assets.
|-
| 0x080x04 || intuint || amount of SNDS'''num_streams''' || Amount of headers for SNDS assets.
|}
 
After that, there are two consecutive arrays of SNDI entries: one for the SND and one for the SNDS. Each SNDI entry is 0x30 bytes long and is a [http://www.psdevwiki.com/ps3/Multimedia_Formats_and_Tools#VAG VAG header]. The reserved space at 0x8 in the header contains the sound's [[Asset ID]].
 
====VAGHeader====
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x00 || char[4] || '''id''' || "VAGp"
|-
| 0x04 || uint || '''version''' ||
|-
| 0x08 || uint || '''assetID''' || Asset ID of SND/SNDS
|-
| 0x0C || uint || '''data_size''' ||
|-
| 0x10 || uint || '''frequency''' ||
|-
| 0x14 || uint || '''streamInterleaveSize''' ||
|-
| 0x18 || uint || '''streamInterleaveCount''' ||
|-
| 0x1C || uint || '''reserved2''' ||
|-
| 0x20 || char[16] || '''name''' ||
|}
 
{{Assets}}
2,079

edits