#------------------------------------------------------------------------------
-# $File: audio,v 1.86 2018/03/11 00:53:11 christos Exp $
+# $File: audio,v 1.87 2018/06/23 16:36:04 christos Exp $
# audio: file(1) magic for sound formats (see also "iff")
#
# Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
2 string ADLIB- AdLib instrument data
>0 byte x \b, version %u
>1 byte x \b.%u
+
+# CRI ADX ADPCM audio
+# Used by various Sega games.
+# https://en.wikipedia.org/wiki/ADX_(file_format)
+# https://wiki.multimedia.cx/index.php/CRI_ADX_file
+# Added by David Korth <gerbilsoft@gerbilsoft.com>
+0x00 beshort 0x8000
+>(2.S-2) string (c)CRI CRI ADX ADPCM audio
+>>0x12 byte x v%u
+>>0x04 byte 0x02 \b, pre-set prediction coefficients
+>>0x04 byte 0x03 \b, standard ADX
+>>0x04 byte 0x04 \b, exponential scale
+>>0x04 byte 0x05 \b, AHX
+>>0x08 belong x \b, %u Hz
+>>0x12 byte 0x03
+>>>0x02 beshort >0x2B
+>>>>0x18 belong !0 \b, looping
+>>0x12 byte 0x04
+>>>0x02 beshort >0x37
+>>>>0x24 belong !0 \b, looping