OBD:SNDD/wav

From OniGalore
< OBD:SNDD
Revision as of 10:45, 25 March 2020 by Geyser (talk | contribs) (Filling in some accurate knowledge (while debugging the zap sounds).)
Jump to navigation Jump to search
Wav Header          Aif Header


Oni PC sound data uses an ADPCMWAVEFORMAT header.


Sndd hd.gif


Offset Type Raw Hex Value Description
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)

0x1A int16 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

N.B. For stereo, the -7 in the numerator is replaced with a -14. geyser (talk)

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 18 FF 392, -232


Below are the three types of headers occurring in Oni


22.05 kHz mono
  • 1 channel
  • sample rate 22050 Hz
  • average rate 11155, truncated from ~11155.7312253 = 22050*512/1012
  • block alignment 512
  • 4 bits per sample
  • 1012 samples per block = 2 + (512 - 7)*8/4/1
  • standard coefficient table
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 °° °°  °°°°°°°°°°°°°°°°

22.05 kHz stereo
  • 2 cnannels
  • sample rate 22050 Hz
  • average rate 22311, truncated from ~22311.4624506 = 22050*1024/1012
  • block alignment 1024
  • 4 bits per sample
  • 1012 samples per block = 2 + (1024 - 2*7)*8/4/2
  • standard coefficient table
0x00:  °° °° °° °° °° °° °° °° 08 00 00 00 02 00 02 00  °°°°°°°°°°°°°°°°
0x10:  22 56 00 00 27 57 00 00 00 04 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 °° °°  °°°°°°°°°°°°°°°°

44 kHz mono
  • 1 channel
  • sample rate 44100 kHz
  • average rate 22179, truncated from ~22179.9607073 = 44100*1024/2036
  • block alignment 1024
  • 4 bits per sample
  • 2036 samples per block = 2 + (1024 - 7)*8/4
  • standard coefficient table
0x00:  °° °° °° °° °° °° °° °° 08 00 00 00 02 00 01 00  °°°°°°°°°°°°°°°°
0x10:  44 AC 00 00 A3 56 00 00 00 04 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 °° °°  °°°°°°°°°°°°°°°°

List of the (relatively rare) 44 kHz sounds and their OSBDs (without the .aif suffix):

  • SNDDap_hit_shld (1 sound, referenced in OSBDap_hit_shld.grp, present in level0)
  • SNDDzap01 to SNDDzap45 (45 sounds, OSBDelec_detail.grp, in level9 and level10)
  • SNDDzap03, SNDDzap04, SNDDzap07, SNDDzap20, SNDDzap26, SNDDzap32 and SNDDzap40
    (7 sounds, OSBDelecfire_detail.grp, in level3, level4, level6, level8, level9, level10 and level18)
Back to SNDD