Omnicoder wrote:Been working on the sound files from
Valve's 360 games.
Here's what I got so far:
Code: Select all
DWORD id = 1482118688 "XWV " (Xbox Wave (Little Endian) or Valve Wave Xbox (Big Endian))
DWORD magic1 = 4
DWORD magic2 = 48
DWORD magic3 = (known values 156, 172, 192, 324) increases with file size
DWORD magic4 = 2048 (header size?)
DWORD magic5 = (filesize - magic4)
DWORD magic6 = (kv 268288, 204288, 243200, 471040) proportionally increases with file size (double file size doubles this)
DWORD magic7 = -1
DWORD magic8 = 0
DWORD magic9 = 16
DWORD magic10 = 17826305
DWORD magic11 = 1258356736
DWORD magic12 = (known values 6144, 7680, 5632, 2 files of vastly different sizes both had 7680)
DWORD magic13 = (kv 14848, 13312, 13824) (2 files of different sizes both had 13312, bigger files have had smaller numbers)
DWORD magic14 = (kv 20992, 19968)
<more magics, always seem to be similar between files and slightly bigger in bigger files>
One thing I noticed: the file seems to be divided into blocks of 2048 B size. Not only the header has 2048=0x800 B:
from 0x800-0x1000 is (I assume) the 1st data packet (the end is "padded" with 0xff Bytes),
from 0x100-0x1800 is then the 2nd data packet (again: filled up with 0xff bytes at the end) .... and so on.
So you have a data size of (magic5=)94208=2048 *
46. If this is correct, then the sample file has 46 data packets
And if you look at the DWORDS from 0x30(magic12) to 0xe8, then you have there
46 (similar and 'accumulative' looking) entries... so one entry for each of the 46 data packets.
This strongly reminds me of the
DPDS-Chunk from the xWMA-Format: there you have as well ONE DWORD for each data packet... each entry describes the buffer size needed for the according data packet in an accumulative way. I.e. entry0=size needed for decompressed data packet 0(in the example: 0x2a00), entry1=size needed for decompressed data packets 0 AND 1 ( in the example: 0x4400) and so on.
If this assumption is correct, then the last entry (at Pos. 0xe8) should contain the size of the whole decompressed data of the file... in case of the sample file, this would be 0x3fc00=261120 Byte.... but that's just an assumption
BTW: at Pos 0x18 (magic6) you have the same value: 0x3fc00=261120 ... so magic6 would be the size of the decompressed data of the file.