OBD:SNDD/wav: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (break)
Line 1: Line 1:
<center>'''Wav Header'''</center>
Oni uses in the PC version the ADPCM wav format. The header of this format is explained below.
[[image:sndd_hd.gif]]
{{Table}}
{{OBDth}}
{{OBDtr| 0x08 | int32    |FFC8C8| 08 00 00 00 | 8    | size of the following complete header part in bytes; (it seems that Oni uses only the following first 8 bytes, though the complete size of the header is 50 bytes) }}
{{OBDtr| 0x0C | int16    |FFFFC8| 02 00      | 2    | format ID (2 <nowiki>=</nowiki> ADPCM format) }}
{{OBDtr| 0x0E | int16    |C8FFC8| 01 00      | 1    | number of channels (1 <nowiki>=</nowiki> mono) }}
{{OBDtr| 0x10 | int32    |C8FFFF| 22 56 00 00 | 22050 | samples per seconds; (also known as "frequency" or "sample rate") }}
{{OBDtr| 0x14 | int32    |FFC8FF| 93 2B 00 00 | 11155 | [[image:sndd_hd1.gif]] }}
{{OBDtr| 0x18 | int16    |FFC800| 00 02      | 512  | block alignment; used for buffer estimation; (the block alignment of 22050 samples per second is
always 512 bytes) }}
{{OBDtr| 0x1A | int16    |C800C8| 04 00      | 4    | bits per sample
{{OBDtrBK|1=Special extended ADPCM wav format header (black outline)}}
{{OBDtr| 0x1C | int16    |C87C64| 20 00      | 32    | size of the following extended information part in bytes }}
{{OBDtr| 0x1E | int16    |B0C3D4| F4 03      | 1012  | [[image:sndd_hd2.gif]] }}
{{OBDtr| 0x20 | int16    |E7CEA5| 07 00      | 7    | number of the following coefficient sets }}
|-align=center valign=top
| 0x22 || int16-16 || bgcolor="#FFDDDD" | 00 01 00 00 || 256, 0 || rowspan=1 align=left | [[image:sndd_hd3.gif]]
The 14 coefficients are standard and are used by the wave to play.
The seven coefficient sets are preset. They must appear in this order.
|}
<center>[[OBD:SNDD|Back to SNDD]]</center>
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> [[OBD:SNDD|SNDD File]] >> Wav Header
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> [[OBD:SNDD|SNDD File]] >> Wav Header


Line 6: Line 41:




Oni uses in the PC version the ADPCM wav format. The header of this format is explained below.
 





Revision as of 16:07, 12 September 2007

Wav Header


Oni uses in the PC version the ADPCM wav format. The header of this format is explained below.


Sndd hd.gif


Offset Type Raw Hex Value Description
0x08 int32 08 00 00 00 8 size of the following complete header part in bytes; (it seems that Oni uses only the following first 8 bytes, though the complete size of the header is 50 bytes)
0x0C int16 02 00 2 format ID (2 = ADPCM format)
0x0E int16 01 00 1 number of channels (1 = mono)
0x10 int32 22 56 00 00 22050 samples per seconds; (also known as "frequency" or "sample rate")
0x14 int32 93 2B 00 00 11155 File:Sndd hd1.gif
0x18 int16 00 02 512 block alignment; used for buffer estimation; (the block alignment of 22050 samples per second is

always 512 bytes) {{OBDtr| 0x1A | int16 |C800C8| 04 00 | 4 | bits per sample

Special extended ADPCM wav format header (black outline)
0x1C int16 20 00 32 size of the following extended information part in bytes
0x1E int16 F4 03 1012 File:Sndd hd2.gif
0x20 int16 07 00 7 number of the following coefficient sets
0x22 int16-16 00 01 00 00 256, 0 File:Sndd hd3.gif

The 14 coefficients are standard and are used by the wave to play.

The seven coefficient sets are preset. They must appear in this order.


Back to SNDD


Main Page >> Oni Binary Data >> File Types >> SNDD File >> Wav Header


<== SNDD File ==>
Sound Data



sndd_hd.gif


Hex Translation Meaning
Below follows the basic wav format header.
08 00 00 00 8 size of the following complete header part in bytes; (it seems that Oni uses only the following first 8 bytes, though the complete size of the header is 50 bytes)
02 00 2 format ID (2 = ADPCM format)
01 00 1 number of channels (1 = mono)
22 56 00 00 22050 samples per seconds; (also known as "frequency" or "sample rate")
93 2B 00 00 11155

sndd_hd1.gif

00 02 512 block alignment; used for buffer estimation; (the block alignment of 22050 samples per second is always 512 bytes)
04 00 4 bits per sample
Below follows the special extended ADPCM wav format header.
20 00 32 size of the following extended information part in bytes
F4 03 1012

sndd_hd2.gif

07 00 7 number of the following coefficient sets
00 01 00 00 256, 0

sndd_hd3.gif

The 14 coefficients are standard and are used by the wave to play.

The seven coefficient sets are preset. They must appear in this order.

00 02 00 FF 512, -256
00 00 00 00 0, 0
C0 00 40 00 192, 64
F0 00 00 00 240, 0

CC 01 30 FF

460, -208

88 01 15 FF 392, -232
22.05 kHz mono
  • sample rate 22.05 kHz
  • average rate 11155
  • block alignment 512
  • 1012 samples per block
0x00:  °° °° °° °° °° °° °° °° 08 00 00 00 02 00 01 00  °°°°°°°°°°°°°°°°
0x10:  22 56 00 00 93 2B 00 00 00 02 04 00 20 00 F4 03  °°°°°°°°°°°°°°°°
0x20:  07 00 00 01 00 00 00 02 00 FF 00 00 00 00 C0 00  °°°°°°°°°°°°°°°°
0x30:  40 00 F0 00 00 00 CC 01 30 FF 88 01 18 FF 00 °°  °°°°°°°°°°°°°°°°
44 kHz mono
  • sample rate 44.1 kHz
  • average rate 22179
  • block alignment 1024
  • 2036 samples per block
0x00:  °° °° °° °° °° °° °° °° 08 00 00 00 02 00 01 00  °°°°°°°°°°°°°°°°
0x10:  22 56 00 00 93 2B 00 00 00 02 04 00 20 00 F4 03  °°°°°°°°°°°°°°°°
0x20:  07 00 00 01 00 00 00 02 00 FF 00 00 00 00 C0 00  °°°°°°°°°°°°°°°°
0x30:  40 00 F0 00 00 00 CC 01 30 FF 88 01 18 FF 00 °°  °°°°°°°°°°°°°°°°
22.05 kHz stereo
  • sample rate 22.05 kHz
  • average rate 22311
  • block alignment 1024
  • 1012 samples per block
0x00:  °° °° °° °° °° °° °° °° 08 00 00 00 02 00 01 00  °°°°°°°°°°°°°°°°
0x10:  22 56 00 00 93 2B 00 00 00 02 04 00 20 00 F4 03  °°°°°°°°°°°°°°°°
0x20:  07 00 00 01 00 00 00 02 00 FF 00 00 00 00 C0 00  °°°°°°°°°°°°°°°°
0x30:  40 00 F0 00 00 00 CC 01 30 FF 88 01 18 FF 00 °°  °°°°°°°°°°°°°°°°


Main Page >> Oni Binary Data >> File Types >> SNDD File >> Wav Header