riff 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. >>22 leshort =1 \b, mono
  42. >>22 leshort =2 \b, stereo
  43. >>22 leshort >2 \b, %d channels
  44. >>24 lelong >0 %d Hz
  45. # AVI == Audio Video Interleave
  46. >8 string AVI\ \b, AVI
  47. # Animated Cursor format
  48. >8 string ACON \b, animated cursor
  49. #
  50. # XXX - some of the below may only appear in little-endian form.
  51. #
  52. # Also "MV93" appears to be for one form of Macromedia Director
  53. # files, and "GDMF" appears to be another multimedia format.
  54. #
  55. 0 string RIFX RIFF (big-endian) data
  56. # RIFF Palette format
  57. >8 string PAL \b, palette
  58. >>16 beshort x \b, version %d
  59. >>18 beshort x \b, %d entries
  60. # RIFF Device Independent Bitmap format
  61. >8 string RDIB \b, device-independent bitmap
  62. >>16 string BM
  63. >>>30 beshort 12 \b, OS/2 1.x format
  64. >>>>34 beshort x \b, %d x
  65. >>>>36 beshort x %d
  66. >>>30 beshort 64 \b, OS/2 2.x format
  67. >>>>34 beshort x \b, %d x
  68. >>>>36 beshort x %d
  69. >>>30 beshort 40 \b, Windows 3.x format
  70. >>>>34 belong x \b, %d x
  71. >>>>38 belong x %d x
  72. >>>>44 beshort x %d
  73. # RIFF MIDI format
  74. >8 string RMID \b, MIDI
  75. # RIFF Multimedia Movie File format
  76. >8 string RMMP \b, multimedia movie
  77. # Microsoft WAVE format (*.wav)
  78. >8 string WAVE \b, WAVE audio
  79. >>20 leshort 1 \b, Microsoft PCM
  80. >>>34 leshort >0 \b, %d bit
  81. >>22 beshort =1 \b, mono
  82. >>22 beshort =2 \b, stereo
  83. >>22 beshort >2 \b, %d channels
  84. >>24 belong >0 %d Hz
  85. # AVI == Audio Video Interleave
  86. >8 string AVI\ \b, AVI
  87. # Animated Cursor format
  88. >8 string ACON \b, animated cursor
  89. # Notation Interchange File Format (big-endian only)
  90. >8 string NIFF \b, Notation Interchange File Format