riff 3.0 KB

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