SHARE
TWEET

txth-info.txt

bnnm Jul 15th, 2017 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # TXTH FORMAT
  2.  
  3. # comments start with #, can be inline
  4. # The file is made lines of "key = value" describing a header.
  5. # Spaces are optional: key=value, key=   value, and so on are all ok.
  6. # The parser is fairly simple and may be buggy or unexpected in some cases.
  7. # The order of keys is variable but some things won't work if others aren't defined
  8. # (ex. bytes-to-samples may not work without channels or interleave).
  9.  
  10. # Common values:
  11. # - (number): constant number in dec/hex.
  12. #   Examples: 44100, 40, 0x40 (dec=64)
  13. # - (offset): format is @(number)[:LE|BE][$1|2|3|4]
  14. #   * @(number): value at offset (required)
  15. #   * :LE|BE: value is little/big endian (optional, defaults to LE)
  16. #   * $1|2|3|4: value has size of 8/16/24/32 bit (optional, defaults to 4)
  17. #   Examples: @0x10:BE$2 (get big endian 16b value at 0x10)
  18. # - {string}: special values for certain keys, described below
  19.  
  20. # Codec used to encode the data [REQUIRED]
  21. # Accepted codec strings:
  22. # - PSX            PlayStation ADPCM
  23. # - XBOX           Xbox IMA ADPCM
  24. # - NGC_DTK        Nintendo ADP/DTK ADPCM
  25. # - PCM16BE        PCM RAW 16bit big endian
  26. # - PCM16LE        PCM RAW 16bit little endian
  27. # - PCM8           PCM RAW 8bit
  28. # - SDX2           Squareroot-delta-exact 8-bit DPCM (3DO games)
  29. # - DVI_IMA        DVI IMA ADPCM
  30. # - MPEG           MPEG Audio Layer File (MP1/2/3)
  31. # - IMA            IMA ADPCM
  32. # - AICA           Yamaha AICA ADPCM (Dreamcast)
  33. # - MSADPCM        Microsoft ADPCM (Windows)
  34. # - NGC_DSP        Nintengo GameCube ADPCM
  35. # - PCM8_U_int     PCM RAW 8bit unsigned (interleaved)
  36. # - PSX_bf         PlayStation ADPCM with bad flags
  37. # - MS_IMA         Microsoft IMA ADPCM
  38. # - PCM8_U         PCM RAW 8bit unsigned
  39. # - APPLE_IMA4     Apple Quicktime IMA ADPCM
  40. # - ATRAC3         raw ATRAC3
  41. # - ATRAC3PLUS     raw ATRAC3PLUS
  42. # - XMA1           raw XMA1
  43. # - XMA2           raw XMA2
  44. # - FFMPEG         any headered FFmpeg format
  45. codec = (codec string)
  46.  
  47. # Varies with codec:
  48. # - NGC_DSP: 0=normal interleave, 1=byte interleave, 2=no interleave
  49. # - ATRAC3: 0=autodetect joint stereo, 1=force joint stereo, 2=force normal stereo
  50. # - XMA1|XMA2: 0=dual multichannel (2ch xN), 1=single multichannel (1ch xN) [NOT IMPLEMENTED]
  51. # - others: ignored
  52. codec_mode = (number)
  53.  
  54. # Interleave or block size [REQUIRED/OPTIONAL, depends on codec]
  55. interleave = (number)|(offset)
  56.  
  57.  
  58. # Validate that id_value matches value at id_offset [OPTIONAL]
  59. # Can be redefined several times, it's checked when a new id_offset is found.
  60. id_value = (number)|(offset)
  61. id_offset = (number)|(offset)
  62.  
  63. # Number of channels [REQUIRED]
  64. channels = (number)|(offset)
  65.  
  66. # Music frequency in hz [REQUIRED]
  67. sample_rate = (number)|(offset)
  68.  
  69.  
  70. # Data start [OPTIONAL, default to 0]
  71. start_offset = (number)|(offset)
  72.  
  73. # Variable that can be used in sample values [OPTIONAL]
  74. # Defaults to (file_size - start_offset), re-calculated when start_offset is set.
  75. data_size = (number)|(offset)
  76.  
  77.  
  78. # Modifies the meaning of sample fields when set *before* them [OPTIONAL, defaults to samples]
  79. # - samples: exact sample
  80. # - bytes: automatically converts bytes/offset to samples
  81. # It's possible to re-define multiple times:
  82. #  * samples_type=bytes ... num_samples=@0x10
  83. #  * samples_type=sample ... loop_end_sample=@0x14
  84. # Some codecs can't convert bytes-to-samples at the moment: MPEG/FFMPEG
  85. # For XMA1/2 bytes does special parsing, with loop values being bit offsets within data.
  86. sample_type = samples|bytes
  87.  
  88. # Various sample values [REQUIRED (num_samples) / OPTIONAL (rest)]
  89. num_samples         = (number)|(offset)|data_size
  90. loop_start_sample   = (number)|(offset)
  91. loop_end_sample     = (number)|(offset)|data_size
  92.  
  93. # For XMA1/2 + sample_type=bytes it means loop subregion, if read after loop values.
  94. # For other codecs its added to loop start/end, if read before loop values
  95. # (rarely a format may have rough loop offset/bytes, then a loop adjust in samples).
  96. loop_adjust = (number)|(offset)
  97.  
  98. # Force loop, on (>0) or off (0), as loop start/end may be defined but not used [OPTIONAL]
  99. # By default it loops when loop_end_sample is defined
  100. loop_flag    = (number)|(offset)
  101.  
  102. # beginning samples to skip (encoder delay), for codecs that need them (ATRAC3/XMA/etc)
  103. skip_samples = (number)|(offset)
  104.  
  105.  
  106. # DSP coefficients [REQUIRED for NGC_DSP]
  107. # Coefs start
  108. coef_offset = (number)|(offset)
  109. # offset separation per channel, usually 0x20
  110. # - Example: channel N coefs are read at coef_offset + coef_spacing * N
  111. coef_spacing = (number)|(offset)
  112. # Format, usually BE; with (offset): 0=LE, >0=BE
  113. coef_endianness = BE|LE|(offset)
  114. # Split/normal coefs [NOT IMPLEMENTED YET]
  115. #coef_mode = (number)|(offset)
  116.  
  117. # [NOT IMPLEMENTED YET]
  118. #global_endianness = BE|LE|(offset)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top