audio 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #------------------------------------------------------------------------------
  2. # audio: file(1) magic for sound formats (see also "iff")
  3. #
  4. # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
  5. # and others
  6. #
  7. # Sun/NeXT audio data
  8. 0 string .snd Sun/NeXT audio data:
  9. >12 belong 1 8-bit ISDN u-law,
  10. >12 belong 2 8-bit linear PCM [REF-PCM],
  11. >12 belong 3 16-bit linear PCM,
  12. >12 belong 4 24-bit linear PCM,
  13. >12 belong 5 32-bit linear PCM,
  14. >12 belong 6 32-bit IEEE floating point,
  15. >12 belong 7 64-bit IEEE floating point,
  16. >12 belong 23 8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
  17. >20 belong 1 mono,
  18. >20 belong 2 stereo,
  19. >20 belong 4 quad,
  20. >16 belong >0 %d Hz
  21. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  22. # that uses little-endian encoding and has a different magic number
  23. 0 lelong 0x0064732E DEC audio data:
  24. >12 lelong 1 8-bit ISDN u-law,
  25. >12 lelong 2 8-bit linear PCM [REF-PCM],
  26. >12 lelong 3 16-bit linear PCM,
  27. >12 lelong 4 24-bit linear PCM,
  28. >12 lelong 5 32-bit linear PCM,
  29. >12 lelong 6 32-bit IEEE floating point,
  30. >12 lelong 7 64-bit IEEE floating point,
  31. >12 lelong 23 8-bit ISDN u-law compressed (CCITT G.721 ADPCM voice data encoding),
  32. >20 lelong 1 mono,
  33. >20 lelong 2 stereo,
  34. >20 lelong 4 quad,
  35. >16 lelong >0 %d Hz
  36. # Creative Labs AUDIO stuff
  37. 0 string MThd Standard MIDI data
  38. >9 byte >0 (format %d)
  39. >11 byte >1 using %d channels
  40. 0 string CTMF Creative Music (CMF) data
  41. 0 string SBI SoundBlaster instrument data
  42. 0 string Creative\ Voice\ File Creative Labs voice data
  43. # is this next line right? it came this way...
  44. >19 byte 0x1A
  45. >23 byte >0 - version %d
  46. >22 byte >0 \b.%d
  47. # first entry is also the string "NTRK"
  48. 0 belong 0x4e54524b MultiTrack sound data
  49. >4 belong x - version %ld
  50. # Microsoft WAVE format (*.wav)
  51. # [GRR 950115: probably all of the shorts and longs should be leshort/lelong]
  52. 0 string RIFF Microsoft RIFF
  53. >8 string WAVE \b, WAVE audio data
  54. >>34 short >0 \b, %d bit
  55. >>22 short =1 \b, mono
  56. >>22 short =2 \b, stereo
  57. >>22 short >2 \b, %d channels
  58. >>24 long >0 %d Hz
  59. # AVI == Audio Video Interleave
  60. >8 string AVI\ \b, AVI data
  61. # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  62. # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  63. 0 string EMOD Extended MOD sound data,
  64. >4 byte&0xf0 x version %d
  65. >4 byte&0x0f x \b.%d,
  66. >45 byte x %d instruments
  67. >83 byte 0 (module)
  68. >83 byte 1 (song)
  69. # Real Audio (Magic .ra\0375)
  70. 0 belong 0x2e7261fd realaudio sound file
  71. # Real Audio (Magic .ra\0375)
  72. 0 belong 0x2e7261fd realaudio sound file
  73. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  74. # Oct 31, 1995
  75. 0 string MTM MultiTracker Module sound file
  76. 0 string if Composer 669 Module sound data
  77. 0 string FAR Module sound data
  78. 0 string MAS_U ULT(imate) Module sound data
  79. 0x2c string SCRM ScreamTracker III Module sound data
  80. 0 string Extended Module Extended Module sound data