5,391
edits
m (→Raw PCM (no flags):  oops)  | 
				m (→WAVE-like format header ("8" flag):  oops)  | 
				||
| Line 233: | Line 233: | ||
{{Table}}  | {{Table}}  | ||
{{OBDth}}  | {{OBDth}}  | ||
{{OBDtr| 0x0C | int16    |FFFFC8|   | {{OBDtr| 0x0C | int16    |FFFFC8| 02 00       | 2     | format ID (2 <nowiki>=</nowiki> MS ADPCM format)  | ||
:<small>'''N.B.''' At the time of writing, only "1" (linear PCM) and "2" (MS ADPCM) are known to work in Oni; in Vanilla Oni, only MS ADPCM is ever used.</small>}}  | :<small>'''N.B.''' At the time of writing, only "1" (linear PCM) and "2" (MS ADPCM) are known to work in Oni; in Vanilla Oni, only MS ADPCM is ever used.</small>}}  | ||
{{OBDtr| 0x0E | int16    |C8FFC8| 01 00       | 1     | number of channels (1 <nowiki>=</nowiki> mono)  | {{OBDtr| 0x0E | int16    |C8FFC8| 01 00       | 1     | number of channels (1 <nowiki>=</nowiki> mono)  | ||
| Line 244: | Line 244: | ||
:<small>'''N.B.''' The block size is trivially 2 bytes for PCM mono (one 16-bit sample) and 4 bytes for PCM stereo (Left and Right 16-bit samples).</small>  | :<small>'''N.B.''' The block size is trivially 2 bytes for PCM mono (one 16-bit sample) and 4 bytes for PCM stereo (Left and Right 16-bit samples).</small>  | ||
:<small>'''N.B.''' For ADPCM, Oni's Vanilla data always uses 512 bytes per channel for 22050 Hz waveforms, and 1024 bytes for 44.1 kHz mono (see below).}}  | :<small>'''N.B.''' For ADPCM, Oni's Vanilla data always uses 512 bytes per channel for 22050 Hz waveforms, and 1024 bytes for 44.1 kHz mono (see below).}}  | ||
{{OBDtr| 0x1A | int16    |C800C8|   | {{OBDtr| 0x1A | int16    |C800C8| 04 00       | 4     | bits per sample (per channel); typically 4 bits for ADPCM, 16 bits for PCM }}  | ||
{{OBDtrBK|1=Special extended ADPCM wav format header (black outline); fully ignored if the format ID is 1 }}  | {{OBDtrBK|1=Special extended ADPCM wav format header (black outline); fully ignored if the format ID is 1 }}  | ||
{{OBDtr| 0x1C | int16    |C87C64| 20 00       | 32    | size of the extra ADPCM parameters, in bytes; typically always 32 }}  | {{OBDtr| 0x1C | int16    |C87C64| 20 00       | 32    | size of the extra ADPCM parameters, in bytes; typically always 32 }}  | ||