Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / file / Magdir / riff
1
2 #------------------------------------------------------------------------------
3 # riff:  file(1) magic for RIFF format
4 # See
5 #
6 #       http://www.seanet.com/users/matts/riffmci/riffmci.htm
7 #
8 # and
9 #
10 #       http://www.ora.com/centers/gff/formats/micriff/index.htm
11 #
12 # and
13 #
14 #       http://www.jtauber.com/music/encoding/niff/spec/
15 #
16 0       string          RIFF            RIFF (little-endian) data
17 # RIFF Palette format
18 >8      string          PAL             \b, palette
19 >>16    leshort         x               \b, version %d
20 >>18    leshort         x               \b, %d entries
21 # RIFF Device Independent Bitmap format
22 >8      string          RDIB            \b, device-independent bitmap
23 >>16    string          BM              
24 >>>30   leshort         12              \b, OS/2 1.x format
25 >>>>34  leshort         x               \b, %d x
26 >>>>36  leshort         x               %d
27 >>>30   leshort         64              \b, OS/2 2.x format
28 >>>>34  leshort         x               \b, %d x
29 >>>>36  leshort         x               %d
30 >>>30   leshort         40              \b, Windows 3.x format
31 >>>>34  lelong          x               \b, %d x
32 >>>>38  lelong          x               %d x
33 >>>>44  leshort         x               %d
34 # RIFF MIDI format
35 >8      string          RMID            \b, MIDI
36 # RIFF Multimedia Movie File format
37 >8      string          RMMP            \b, multimedia movie
38 # Microsoft WAVE format (*.wav)
39 >8      string          WAVE            \b, WAVE audio
40 >>20    leshort         1               \b, Microsoft PCM
41 >>>34   leshort         >0              \b, %d bit
42 >>20    leshort         2               \b, Microsoft ADPCM
43 >>20    leshort         6               \b, ITU G.711 a-law
44 >>20    leshort         7               \b, ITU G.711 u-law
45 >>20    leshort         17              \b, IMA ADPCM
46 >>20    leshort         20              \b, ITU G.723 ADPCM (Yamaha)
47 >>20    leshort         49              \b, GSM 6.10
48 >>20    leshort         64              \b, ITU G.721 ADPCM
49 >>20    leshort         80              \b, MPEG
50 >>20    leshort         85              \b, MPEG Layer 3
51 >>22    leshort         =1              \b, mono
52 >>22    leshort         =2              \b, stereo
53 >>22    leshort         >2              \b, %d channels
54 >>24    lelong          >0              %d Hz
55 # AVI == Audio Video Interleave
56 >8      string          AVI\            \b, AVI
57 # Animated Cursor format
58 >8      string          ACON            \b, animated cursor
59
60 #
61 # XXX - some of the below may only appear in little-endian form.
62 #
63 # Also "MV93" appears to be for one form of Macromedia Director
64 # files, and "GDMF" appears to be another multimedia format.
65 #
66 0       string          RIFX            RIFF (big-endian) data
67 # RIFF Palette format
68 >8      string          PAL             \b, palette
69 >>16    beshort         x               \b, version %d
70 >>18    beshort         x               \b, %d entries
71 # RIFF Device Independent Bitmap format
72 >8      string          RDIB            \b, device-independent bitmap
73 >>16    string          BM              
74 >>>30   beshort         12              \b, OS/2 1.x format
75 >>>>34  beshort         x               \b, %d x
76 >>>>36  beshort         x               %d
77 >>>30   beshort         64              \b, OS/2 2.x format
78 >>>>34  beshort         x               \b, %d x
79 >>>>36  beshort         x               %d
80 >>>30   beshort         40              \b, Windows 3.x format
81 >>>>34  belong          x               \b, %d x
82 >>>>38  belong          x               %d x
83 >>>>44  beshort         x               %d
84 # RIFF MIDI format
85 >8      string          RMID            \b, MIDI
86 # RIFF Multimedia Movie File format
87 >8      string          RMMP            \b, multimedia movie
88 # Microsoft WAVE format (*.wav)
89 >8      string          WAVE            \b, WAVE audio
90 >>20    leshort         1               \b, Microsoft PCM
91 >>>34   leshort         >0              \b, %d bit
92 >>22    beshort         =1              \b, mono
93 >>22    beshort         =2              \b, stereo
94 >>22    beshort         >2              \b, %d channels
95 >>24    belong          >0              %d Hz
96 # AVI == Audio Video Interleave
97 >8      string          AVI\            \b, AVI
98 # Animated Cursor format
99 >8      string          ACON            \b, animated cursor
100 # Notation Interchange File Format (big-endian only)
101 >8      string          NIFF            \b, Notation Interchange File Format
102
103 # SoundFont 2 <mpruett@sgi.com>
104 >8      string          sfbk            SoundFont 2