OBD:SNDD/wav: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (break)
m (finished - What's with these additional kHz tables? They're all the same. Can we delete them?)
Line 23: Line 23:
{{OBDtr| 0x20 | int16    |E7CEA5| 07 00      | 7    | number of the following coefficient sets }}
{{OBDtr| 0x20 | int16    |E7CEA5| 07 00      | 7    | number of the following coefficient sets }}
|-align=center valign=top
|-align=center valign=top
| 0x22 || int16-16 || bgcolor="#FFDDDD" | 00 01 00 00 || 256, 0 || rowspan=1 align=left | [[image:sndd_hd3.gif]]
| 0x22 || int16-16 || bgcolor="#FFDDDD" | 00 01 00 00 || 256, 0 || rowspan=7 align=left | [[image:sndd_hd3.gif|left]]
The 14 coefficients are standard and are used by the wave to play.
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.  
The seven coefficient sets are preset. They must appear in this order.  
|-align=center valign=top
| 0x26 || int16-16 || bgcolor="#FFDDDD" | 00 02 00 FF || 512, -256
|-align=center valign=top
| 0x2A || int16-16 || bgcolor="#FFDDDD" | 00 00 00 00 || 0, 0
|-align=center valign=top
| 0x2E || int16-16 || bgcolor="#FFDDDD" | C0 00 40 00 || 192, 64
|-align=center valign=top
| 0x32 || int16-16 || bgcolor="#FFDDDD" | F0 00 00 00 || 240, 0
|-align=center valign=top
| 0x36 || int16-16 || bgcolor="#FFDDDD" | CC 01 30 FF || 460, -208
|-align=center valign=top
| 0x3A || int16-16 || bgcolor="#FFDDDD" | 88 01 15 FF || 392, -232
|}
|}


<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
<CENTER>[[OBD:QTNA|<==]] <FONT SIZE=5>SNDD File</FONT> [[OBD:StNA|==>]]<BR>
<FONT SIZE=2>Sound Data</FONT></CENTER>
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/sndd_hd.gif
{| width="100%" cellspacing="1" cellpadding="2" bgcolor="#000000" border=1
|- bgcolor="#FFDDBB" align="CENTER"
| width="15%" | '''Hex'''
| width="15%" | '''Translation'''
| width="70%" | '''Meaning'''
|- bgcolor="#000000" align="CENTER" valign="TOP"
| colspan="3" | <font size="2" color="#FFFFFF">Below follows the basic wav format header.</font>
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8C8" | 08 00 00 00
| 8
| align="LEFT" | 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)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFFFC8" | 02 00
| 2
| align="LEFT" | format ID (2 = ADPCM format)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 01 00
| 1
| align="LEFT" | number of channels (1 = mono)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" | 22 56 00 00
| 22050
| align="LEFT" | samples per seconds; (also known as "frequency" or "sample rate")
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | 93 2B 00 00
| 11155
| align="LEFT" |
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/sndd_hd1.gif
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC800" | 00 02
| 512
| align="LEFT" | block alignment; used for buffer estimation; (the block alignment of 22050 samples per second is always 512 bytes)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C800C8" | 04 00
| 4
| align="LEFT" | bits per sample
|- bgcolor="#000000" align="CENTER" valign="TOP"
| colspan="3" | <font size="2" color="#FFFFFF">Below follows the special extended ADPCM wav format header.</font>
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C87C64" | 20 00
| 32
| align="LEFT" | size of the following extended information part in bytes
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#B0C3D4" | F4 03
| 1012
| align="LEFT" |
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/sndd_hd2.gif
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#E7CEA5" | 07 00
| 7
| align="LEFT" | number of the following coefficient sets
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFDDDD" | 00 01 00 00
| 256, 0
| rowspan="7" align="LEFT" |
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/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.
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFDDDD" | 00 02 00 FF
| 512, -256
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFDDDD" | 00 00 00 00
| 0, 0
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFDDDD" | C0 00 40 00
| 192, 64
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFDDDD" | F0 00 00 00
| 240, 0
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFDDDD" |
CC 01 30 FF
|
460, -208
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFDDDD" | 88 01 15 FF
| 392, -232
|}


;22.05 kHz mono
;22.05 kHz mono
Line 188: Line 101:




[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> [[OBD:SNDD|SNDD File]] >> Wav Header
<center>[[OBD:SNDD|Back to SNDD]]</center>

Revision as of 17:44, 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

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.

0x26 int16-16 00 02 00 FF 512, -256
0x2A int16-16 00 00 00 00 0, 0
0x2E int16-16 C0 00 40 00 192, 64
0x32 int16-16 F0 00 00 00 240, 0
0x36 int16-16 CC 01 30 FF 460, -208
0x3A int16-16 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 °°  °°°°°°°°°°°°°°°°


Back to SNDD