Sound Bank: Difference between revisions

Content added Content deleted
m (AcuteSyntax moved page EA Sound Container to Sound Data Table)
No edit summary
Line 2: Line 2:


= Layout =
= Layout =
== SDT ==

{|class="wikitable"
{|class="wikitable"
|-
|-
Line 11: Line 11:
! Details
! Details
|-
|-
| <tt>0x00 || <tt>0x04 || UInt32 || File magic (<tt>BNKl</tt>/<tt>0x424E4B6C</tt>) ||
| <tt>0x00 || <tt>0x04 || UInt32 || File magic (<code>BNKl</code>/<code>0x424E4B6C</code>) ||
|-
|-
| <tt>0x08 || <tt>0x04 || UInt32 || Header size in bytes ||
| <tt>0x04 || <tt>0x01 || UInt32 || Version number ||
|-
| <tt>0x06 || <tt>0x01 || UInt32 || Number of sounds in archive ||
|-
| <tt>0x08 || <tt>0x04 || UInt32 || Header size in bytes/start offset of<br>1st sound in archive ||
|-
|-
| <tt>0x0C || <tt>0x04 || UInt32 || Archive size in bytes (minus header) ||
| <tt>0x0C || <tt>0x04 || UInt32 || Archive size in bytes (minus header) ||
|-
|-
| <tt>0x14 || <tt>0x04 || UInt32 || Metadata pointer table size in bytes || The pointer table itself also starts at this offset.
| <tt>0x14 || <tt>0x04 || UInt32 || PT headers pointer table size in bytes || The table itself also starts at this offset.
|-
|}

== PT Header (WIP) ==
SDT contains metadata headers, each <tt>0x20</tt> in length, for each sound in the archive. The metadata in question consists of a given sound's sample rate, compression, start offset, etc.

{|class="wikitable"
|-
! Offset
! Length
! Type
! Description
! Details
|-
| <tt>0x00 || <tt>0x04 || UInt32 || Header ID (<code>PT/0/0</code>/<code>0x50540A00</code>) ||
|-
|-
| <tt>0x14</tt> + (pointer table size) || Variable || UInt32 || Audio metadata and offsets || Audio offsets are stored in big-endian.
| <tt>0x18 || <tt>0x04 || UInt32 || Audio start offset || Uses big-endian byte order.
|}
|}