5,389
edits
m (→WAVE-like format header ("8" flag): oops) |
m (→IMA ADPCM decoding ("4" flag): oops) |
||
Line 400: | Line 400: | ||
:*for a mono IMA4 sound, packets are 34-byte blocks carrying 64 mono samples each (two bytes of header data and 64 "nibbles", or half-bytes); | :*for a mono IMA4 sound, packets are 34-byte blocks carrying 64 mono samples each (two bytes of header data and 64 "nibbles", or half-bytes); | ||
:*for a stereo IMA4 sound, packets are ''pairs'' of consecutive 34-byte blocks (the 64 Left samples are stored first, then the 64 Right samples). | :*for a stereo IMA4 sound, packets are ''pairs'' of consecutive 34-byte blocks (the 64 Left samples are stored first, then the 64 Right samples). | ||
:(The actual duration of SNDDcomguy_dth2 is, which at 22.05 kHz requires 338 64-sample blocks, hence the value 0x152 appearing at 0x18.) | :(The actual duration of SNDDcomguy_dth2 is 0.97941 seconds, which at 22.05 kHz requires 338 64-sample blocks, hence the value 0x152 appearing at 0x18.) | ||
:Everything else in the 50-byte format block is ignored, as well as the ".raw data size" usually found at 0x40 (Oni uses the number of packets instead). | :Everything else in the 50-byte format block is ignored, as well as the ".raw data size" usually found at 0x40 (Oni uses the number of packets instead). | ||
===Raw PCM (no flags)=== | ===Raw PCM (no flags)=== |