EvilEngine/Sound Format: Difference between revisions

Content added Content deleted
m (Seil moved page Sound Format to EvilEngine/Sound Format)
No edit summary
Line 55: Line 55:
|}
|}


===GameCube (Movie Game/Incredibles/Rise of the Underminer/Rat Proto)===
===GameCube (The SpongeBob SquarePants Movie - Ratatouille Prototype)===
In those games, the SNDI contains not only the sound headers but also the entirety of the sound files themselves.
In those games, the SNDI contains not only the sound headers but also the entirety of the sound files themselves.


Line 64: Line 64:
! Offset !! Type !! Variable !! Description
! Offset !! Type !! Variable !! Description
|-
|-
| 0x00 || [[AssetID]] || this || Asset ID of this asset
| 0x00 || [[AssetID]] || '''uSoundInfoID''' || Asset ID of this asset
|-
|-
| 0x04 || int || footerOffset || Offset relative to end of this header to the Footer section. Subtract 0x20 from this to get the absolute offset of the Footer.
| 0x04 || uint || '''uSumFSBSize / nOffsetFinalFSBEnd''' || Offset relative to end of this header to the Footer section. Add 0x20 to get the absolute offset of the Footer.
|-
|-
| 0x08 || byte[0x10] || ? || Usually all 0s
| 0x08 || int || '''pFMusicMod''' || ''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
|-
|-
| 0x1E || byte || FSB3count || Amount of FSB3 files
| 0x18 || ushort || '''nWavFiles''' || Total amount of sounds in SNDI
|-
|-
| 0x1F || byte || cutsceneSoundCount || Amount of cutscene sounds in file. '''The values related to cutscene files are not addressed in the description below yet.'''
| 0x1A || ushort || '''nSounds''' || Amount of sounds in the first FSB3 of the SNDI
|-
| 0x1C || ushort || '''nStreams''' || Amount of sounds combining all FSB3s which are not the first 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: Line 173:
! Offset !! Type !! Variable !! Description
! Offset !! Type !! Variable !! Description
|-
|-
| 0x00 || int[FSB3count] || 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. Subtract 0x20 from each value to get the absolute offset of the file.
| 0x00 || int[[#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. Add 0x20 to each value to get the absolute offset of the file.
|}
|}


After this, we have '''soundCount''' times the following structure, which refers to each sound in the SNDI:
After this, we have [[#SNDI Header|'''nWavFiles''']] times the following structure, which refers to each sound in the SNDI:
=====gcWavInfo=====

{| class="wikitable"
{| class="wikitable"
! Offset !! Type !! Variable !! Description
! Offset !! Type !! Variable !! Description
|-
|-
| 0x00 || [[Asset ID]] || [[SND]]/[[SNDS]] || Asset ID of sound.
| 0x00 || [[AssetID]] || '''uAssetID''' || Asset ID of sound.
|-
|-
| 0x04 || byte || unknown ||
| 0x04 || byte || '''uFlags''' ||
|-
|-
| 0x05 || byte || index || Zero-based index of sound inside its FSB3 file.
| 0x05 || byte || '''uAudioSampleIndex''' || Zero-based index of sound inside its FSB3 file.
|-
|-
| 0x06 || byte || fileIndex || Zero-based index of the FSB3 file containing this sound (index to the FSB3offsets array).
| 0x06 || byte || '''uFSBIndex''' || Zero-based index of the FSB3 file containing this sound (index to the FSB3offsets array).
|-
|-
| 0x07 || byte || unknown ||
| 0x07 || byte || '''uSoundInfoIndex''' ||
|}
|}


Line 226: Line 232:
| 0x1C || byte[16] || Padding ||
| 0x1C || byte[16] || Padding ||
|}
|}



===Playstation 2===
===Playstation 2===
Line 234: Line 239:
! Offset !! Type !! Variable !! Description
! Offset !! Type !! Variable !! Description
|-
|-
| 0x00 || int || amount of SND || Amount of headers for SND assets.
| 0x00 || uint || '''num_effects''' || Amount of headers for SND assets.
|-
|-
| 0x08 || int || amount of SNDS || Amount of headers for SNDS assets.
| 0x04 || uint || '''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]].
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}}
{{Assets}}