Browse Source

Updated VGMStream to r1050-866-g5cc215b4.

master
Christopher Snowhill 2 years ago
parent
commit
16e0a006f2
100 changed files with 5057 additions and 3509 deletions
  1. +136
    -56
      Frameworks/vgmstream/vgmstream.xcodeproj/project.pbxproj
  2. +33
    -7
      Frameworks/vgmstream/vgmstream/src/coding/coding.h
  3. +146
    -0
      Frameworks/vgmstream/vgmstream/src/coding/coding_utils.c
  4. +577
    -0
      Frameworks/vgmstream/vgmstream/src/coding/ea_mt_decoder.c
  5. +77
    -86
      Frameworks/vgmstream/vgmstream/src/coding/ea_xa_decoder.c
  6. +9
    -0
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder.c
  7. +3
    -1
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils.c
  8. +4
    -0
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils.h
  9. +58
    -0
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils_bgw_atrac3.c
  10. +8
    -6
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils_ea_xma.c
  11. +6
    -5
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils_switch_opus.c
  12. +25
    -0
      Frameworks/vgmstream/vgmstream/src/coding/g719_decoder.c
  13. +6
    -6
      Frameworks/vgmstream/vgmstream/src/coding/g721_decoder.c
  14. +26
    -0
      Frameworks/vgmstream/vgmstream/src/coding/g7221_decoder.c
  15. +299
    -213
      Frameworks/vgmstream/vgmstream/src/coding/ima_decoder.c
  16. +12
    -8
      Frameworks/vgmstream/vgmstream/src/coding/mpeg_custom_utils.c
  17. +15
    -14
      Frameworks/vgmstream/vgmstream/src/coding/mpeg_custom_utils_ahx.c
  18. +1
    -1
      Frameworks/vgmstream/vgmstream/src/coding/mpeg_custom_utils_awc.c
  19. +205
    -202
      Frameworks/vgmstream/vgmstream/src/coding/mpeg_custom_utils_ealayer3.c
  20. +42
    -44
      Frameworks/vgmstream/vgmstream/src/coding/mpeg_decoder.c
  21. +3
    -2
      Frameworks/vgmstream/vgmstream/src/coding/mpeg_decoder.h
  22. +24
    -5
      Frameworks/vgmstream/vgmstream/src/coding/ngc_dsp_decoder.c
  23. +6
    -3
      Frameworks/vgmstream/vgmstream/src/coding/vorbis_custom_decoder.c
  24. +3
    -0
      Frameworks/vgmstream/vgmstream/src/coding/vorbis_custom_decoder.h
  25. +152
    -0
      Frameworks/vgmstream/vgmstream/src/coding/vorbis_custom_utils_vid1.c
  26. +23
    -92
      Frameworks/vgmstream/vgmstream/src/coding/vorbis_custom_utils_wwise.c
  27. +20
    -10
      Frameworks/vgmstream/vgmstream/src/coding/xa_decoder.c
  28. +117
    -83
      Frameworks/vgmstream/vgmstream/src/formats.c
  29. +0
    -19
      Frameworks/vgmstream/vgmstream/src/formats.h
  30. +80
    -64
      Frameworks/vgmstream/vgmstream/src/layout/blocked.c
  31. +21
    -0
      Frameworks/vgmstream/vgmstream/src/layout/blocked_dec.c
  32. +83
    -0
      Frameworks/vgmstream/vgmstream/src/layout/blocked_ea_1snh.c
  33. +13
    -62
      Frameworks/vgmstream/vgmstream/src/layout/blocked_ea_schl.c
  34. +13
    -3
      Frameworks/vgmstream/vgmstream/src/layout/blocked_ea_sns.c
  35. +1
    -1
      Frameworks/vgmstream/vgmstream/src/layout/blocked_ivaud.c
  36. +25
    -0
      Frameworks/vgmstream/vgmstream/src/layout/blocked_vawx.c
  37. +0
    -18
      Frameworks/vgmstream/vgmstream/src/layout/de2_blocked.c
  38. +0
    -62
      Frameworks/vgmstream/vgmstream/src/layout/interleave_byte.c
  39. +8
    -11
      Frameworks/vgmstream/vgmstream/src/layout/layout.h
  40. +2
    -2
      Frameworks/vgmstream/vgmstream/src/layout/str_snds_blocked.c
  41. +2
    -2
      Frameworks/vgmstream/vgmstream/src/layout/thp_blocked.c
  42. +60
    -39
      Frameworks/vgmstream/vgmstream/src/layout/xa_blocked.c
  43. +1
    -2
      Frameworks/vgmstream/vgmstream/src/meta/Cstr.c
  44. +5
    -104
      Frameworks/vgmstream/vgmstream/src/meta/aax.c
  45. +87
    -0
      Frameworks/vgmstream/vgmstream/src/meta/aax_streamfile.h
  46. +28
    -275
      Frameworks/vgmstream/vgmstream/src/meta/adx.c
  47. +330
    -0
      Frameworks/vgmstream/vgmstream/src/meta/adx_keys.h
  48. +0
    -0
      Frameworks/vgmstream/vgmstream/src/meta/afc.c
  49. +3
    -3
      Frameworks/vgmstream/vgmstream/src/meta/aifc.c
  50. +3
    -203
      Frameworks/vgmstream/vgmstream/src/meta/aix.c
  51. +169
    -0
      Frameworks/vgmstream/vgmstream/src/meta/aix_streamfile.h
  52. +4
    -3
      Frameworks/vgmstream/vgmstream/src/meta/awc.c
  53. +77
    -0
      Frameworks/vgmstream/vgmstream/src/meta/bar.c
  54. +100
    -0
      Frameworks/vgmstream/vgmstream/src/meta/bar_streamfile.h
  55. +155
    -155
      Frameworks/vgmstream/vgmstream/src/meta/bcstm.c
  56. +48
    -19
      Frameworks/vgmstream/vgmstream/src/meta/bgw.c
  57. +60
    -207
      Frameworks/vgmstream/vgmstream/src/meta/bnsf.c
  58. +16
    -35
      Frameworks/vgmstream/vgmstream/src/meta/dc_idvi.c
  59. +17
    -40
      Frameworks/vgmstream/vgmstream/src/meta/dc_kcey.c
  60. +0
    -101
      Frameworks/vgmstream/vgmstream/src/meta/de2.c
  61. +183
    -0
      Frameworks/vgmstream/vgmstream/src/meta/dec.c
  62. +173
    -0
      Frameworks/vgmstream/vgmstream/src/meta/ea_1snh.c
  63. +254
    -0
      Frameworks/vgmstream/vgmstream/src/meta/ea_eaac.c
  64. +0
    -160
      Frameworks/vgmstream/vgmstream/src/meta/ea_old.c
  65. +11
    -18
      Frameworks/vgmstream/vgmstream/src/meta/ea_schl.c
  66. +3
    -3
      Frameworks/vgmstream/vgmstream/src/meta/ea_schl_fixed.c
  67. +0
    -165
      Frameworks/vgmstream/vgmstream/src/meta/ea_snu.c
  68. +41
    -0
      Frameworks/vgmstream/vgmstream/src/meta/ezw.c
  69. +107
    -0
      Frameworks/vgmstream/vgmstream/src/meta/flx.c
  70. +6
    -3
      Frameworks/vgmstream/vgmstream/src/meta/fsb.c
  71. +13
    -26
      Frameworks/vgmstream/vgmstream/src/meta/fsb5.c
  72. +6
    -7
      Frameworks/vgmstream/vgmstream/src/meta/g1l.c
  73. +159
    -120
      Frameworks/vgmstream/vgmstream/src/meta/genh.c
  74. +0
    -182
      Frameworks/vgmstream/vgmstream/src/meta/gh3_bar.c
  75. +1
    -2
      Frameworks/vgmstream/vgmstream/src/meta/hca.c
  76. +38
    -5
      Frameworks/vgmstream/vgmstream/src/meta/hca_keys.h
  77. +2
    -2
      Frameworks/vgmstream/vgmstream/src/meta/ivaud.c
  78. +4
    -12
      Frameworks/vgmstream/vgmstream/src/meta/maxis_xa.c
  79. +31
    -29
      Frameworks/vgmstream/vgmstream/src/meta/meta.h
  80. +3
    -0
      Frameworks/vgmstream/vgmstream/src/meta/mn_str.c
  81. +42
    -0
      Frameworks/vgmstream/vgmstream/src/meta/mogg.c
  82. +5
    -5
      Frameworks/vgmstream/vgmstream/src/meta/mus_acm.c
  83. +17
    -34
      Frameworks/vgmstream/vgmstream/src/meta/myspd.c
  84. +66
    -0
      Frameworks/vgmstream/vgmstream/src/meta/naac.c
  85. +2
    -2
      Frameworks/vgmstream/vgmstream/src/meta/nds_hwas.c
  86. +2
    -2
      Frameworks/vgmstream/vgmstream/src/meta/nds_rrds.c
  87. +4
    -4
      Frameworks/vgmstream/vgmstream/src/meta/nds_strm.c
  88. +7
    -9
      Frameworks/vgmstream/vgmstream/src/meta/nds_strm_ffta2.c
  89. +14
    -15
      Frameworks/vgmstream/vgmstream/src/meta/ngc_dsp_std.c
  90. +19
    -19
      Frameworks/vgmstream/vgmstream/src/meta/ngc_dsp_ygo.c
  91. +33
    -33
      Frameworks/vgmstream/vgmstream/src/meta/ngc_sck_dsp.c
  92. +75
    -0
      Frameworks/vgmstream/vgmstream/src/meta/ngc_vid1.c
  93. +39
    -7
      Frameworks/vgmstream/vgmstream/src/meta/nsw_opus.c
  94. +45
    -0
      Frameworks/vgmstream/vgmstream/src/meta/omu.c
  95. +1
    -44
      Frameworks/vgmstream/vgmstream/src/meta/pc_adp.c
  96. +43
    -0
      Frameworks/vgmstream/vgmstream/src/meta/pc_adp_otns.c
  97. +44
    -0
      Frameworks/vgmstream/vgmstream/src/meta/pc_ast.c
  98. +0
    -82
      Frameworks/vgmstream/vgmstream/src/meta/pc_sob.c
  99. +0
    -128
      Frameworks/vgmstream/vgmstream/src/meta/pcm.c
  100. +117
    -117
      Frameworks/vgmstream/vgmstream/src/meta/ps2_ads.c

+ 136
- 56
Frameworks/vgmstream/vgmstream.xcodeproj/project.pbxproj View File

@@ -37,6 +37,40 @@
83345A511F8AEB2800B2EAA4 /* nsw_opus.c in Sources */ = {isa = PBXBuildFile; fileRef = 83345A4D1F8AEB2800B2EAA4 /* nsw_opus.c */; };
83345A521F8AEB2800B2EAA4 /* xvag.c in Sources */ = {isa = PBXBuildFile; fileRef = 83345A4E1F8AEB2800B2EAA4 /* xvag.c */; };
833A7A2E1ED11961003EC53E /* xau.c in Sources */ = {isa = PBXBuildFile; fileRef = 833A7A2D1ED11961003EC53E /* xau.c */; };
8349A8DF1FE6251F00E26435 /* vorbis_custom_utils_vid1.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8DC1FE6251E00E26435 /* vorbis_custom_utils_vid1.c */; };
8349A8E01FE6251F00E26435 /* ffmpeg_decoder_utils_bgw_atrac3.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8DD1FE6251F00E26435 /* ffmpeg_decoder_utils_bgw_atrac3.c */; };
8349A8E11FE6251F00E26435 /* ea_mt_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8DE1FE6251F00E26435 /* ea_mt_decoder.c */; };
8349A8E81FE6253900E26435 /* blocked_dec.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8E21FE6253800E26435 /* blocked_dec.c */; };
8349A8E91FE6253900E26435 /* blocked_ea_1snh.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8E31FE6253800E26435 /* blocked_ea_1snh.c */; };
8349A8EA1FE6253900E26435 /* blocked_ea_schl.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8E41FE6253800E26435 /* blocked_ea_schl.c */; };
8349A8EB1FE6253900E26435 /* blocked_ivaud.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8E51FE6253800E26435 /* blocked_ivaud.c */; };
8349A8EC1FE6253900E26435 /* blocked_vawx.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8E61FE6253900E26435 /* blocked_vawx.c */; };
8349A8ED1FE6253900E26435 /* blocked_ea_sns.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8E71FE6253900E26435 /* blocked_ea_sns.c */; };
8349A9071FE6258200E26435 /* dec.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8EE1FE6257C00E26435 /* dec.c */; };
8349A9081FE6258200E26435 /* ezw.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8EF1FE6257C00E26435 /* ezw.c */; };
8349A9091FE6258200E26435 /* pc_ast.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8F01FE6257C00E26435 /* pc_ast.c */; };
8349A90A1FE6258200E26435 /* sab.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8F11FE6257D00E26435 /* sab.c */; };
8349A90B1FE6258200E26435 /* ps2_pcm.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8F21FE6257D00E26435 /* ps2_pcm.c */; };
8349A90C1FE6258200E26435 /* sqex_scd_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8349A8F31FE6257D00E26435 /* sqex_scd_streamfile.h */; };
8349A90D1FE6258200E26435 /* ubi_sb.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8F41FE6257D00E26435 /* ubi_sb.c */; };
8349A90E1FE6258200E26435 /* scd_pcm.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8F51FE6257D00E26435 /* scd_pcm.c */; };
8349A90F1FE6258200E26435 /* aix_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8349A8F61FE6257E00E26435 /* aix_streamfile.h */; };
8349A9101FE6258200E26435 /* ea_eaac.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8F71FE6257E00E26435 /* ea_eaac.c */; };
8349A9111FE6258200E26435 /* bar_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8349A8F81FE6257E00E26435 /* bar_streamfile.h */; };
8349A9121FE6258200E26435 /* vsf_tta.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8F91FE6257E00E26435 /* vsf_tta.c */; };
8349A9131FE6258200E26435 /* ngc_vid1.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8FA1FE6257E00E26435 /* ngc_vid1.c */; };
8349A9141FE6258200E26435 /* omu.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8FB1FE6257F00E26435 /* omu.c */; };
8349A9151FE6258200E26435 /* ps2_xa2_rrp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8FC1FE6257F00E26435 /* ps2_xa2_rrp.c */; };
8349A9161FE6258200E26435 /* flx.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8FD1FE6257F00E26435 /* flx.c */; };
8349A9171FE6258200E26435 /* pc_adp_otns.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8FE1FE6257F00E26435 /* pc_adp_otns.c */; };
8349A9181FE6258200E26435 /* ea_1snh.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A8FF1FE6258000E26435 /* ea_1snh.c */; };
8349A9191FE6258200E26435 /* afc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A9001FE6258000E26435 /* afc.c */; };
8349A91A1FE6258200E26435 /* vxn.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A9011FE6258000E26435 /* vxn.c */; };
8349A91B1FE6258200E26435 /* adx_keys.h in Headers */ = {isa = PBXBuildFile; fileRef = 8349A9021FE6258100E26435 /* adx_keys.h */; };
8349A91C1FE6258200E26435 /* mogg.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A9031FE6258100E26435 /* mogg.c */; };
8349A91D1FE6258200E26435 /* aax_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8349A9041FE6258100E26435 /* aax_streamfile.h */; };
8349A91E1FE6258200E26435 /* bar.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A9051FE6258100E26435 /* bar.c */; };
8349A91F1FE6258200E26435 /* naac.c in Sources */ = {isa = PBXBuildFile; fileRef = 8349A9061FE6258100E26435 /* naac.c */; };
834D3A6E19F47C98001C54F6 /* g1l.c in Sources */ = {isa = PBXBuildFile; fileRef = 834D3A6D19F47C98001C54F6 /* g1l.c */; };
8350270D1ED119D200C25929 /* ps3_mta2.c in Sources */ = {isa = PBXBuildFile; fileRef = 8350270C1ED119D200C25929 /* ps3_mta2.c */; };
835027131ED119E000C25929 /* mta2_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 835027121ED119E000C25929 /* mta2_decoder.c */; };
@@ -78,16 +112,12 @@
836F6F4018BDC2190095E648 /* bdsp_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0318BDC2180095E648 /* bdsp_blocked.c */; };
836F6F4118BDC2190095E648 /* blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0418BDC2180095E648 /* blocked.c */; };
836F6F4218BDC2190095E648 /* caf_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0518BDC2180095E648 /* caf_blocked.c */; };
836F6F4318BDC2190095E648 /* de2_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0618BDC2180095E648 /* de2_blocked.c */; };
836F6F4418BDC2190095E648 /* ea_block.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0718BDC2180095E648 /* ea_block.c */; };
836F6F4518BDC2190095E648 /* emff_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0818BDC2180095E648 /* emff_blocked.c */; };
836F6F4618BDC2190095E648 /* filp_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0918BDC2180095E648 /* filp_blocked.c */; };
836F6F4718BDC2190095E648 /* gsb_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0A18BDC2180095E648 /* gsb_blocked.c */; };
836F6F4818BDC2190095E648 /* halpst_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0B18BDC2180095E648 /* halpst_blocked.c */; };
836F6F4918BDC2190095E648 /* ims_block.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0C18BDC2180095E648 /* ims_block.c */; };
836F6F4A18BDC2190095E648 /* interleave.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0D18BDC2180095E648 /* interleave.c */; };
836F6F4B18BDC2190095E648 /* interleave_byte.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0E18BDC2180095E648 /* interleave_byte.c */; };
836F6F4C18BDC2190095E648 /* ivaud_layout.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0F18BDC2180095E648 /* ivaud_layout.c */; };
836F6F4D18BDC2190095E648 /* layout.h in Headers */ = {isa = PBXBuildFile; fileRef = 836F6E1018BDC2180095E648 /* layout.h */; };
836F6F4F18BDC2190095E648 /* mus_acm_layout.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1218BDC2180095E648 /* mus_acm_layout.c */; };
836F6F5018BDC2190095E648 /* mxch_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1318BDC2180095E648 /* mxch_blocked.c */; };
@@ -109,7 +139,6 @@
836F6F6618BDC2190095E648 /* aax.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2A18BDC2180095E648 /* aax.c */; };
836F6F6718BDC2190095E648 /* acm.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2B18BDC2180095E648 /* acm.c */; };
836F6F6818BDC2190095E648 /* ads.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2C18BDC2180095E648 /* ads.c */; };
836F6F6A18BDC2190095E648 /* afc_header.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2E18BDC2180095E648 /* afc_header.c */; };
836F6F6B18BDC2190095E648 /* agsc.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2F18BDC2180095E648 /* agsc.c */; };
836F6F6C18BDC2190095E648 /* ahx.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E3018BDC2180095E648 /* ahx.c */; };
836F6F6D18BDC2190095E648 /* aifc.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E3118BDC2180095E648 /* aifc.c */; };
@@ -129,12 +158,10 @@
836F6F7B18BDC2190095E648 /* dc_idvi.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E3F18BDC2180095E648 /* dc_idvi.c */; };
836F6F7C18BDC2190095E648 /* dc_kcey.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4018BDC2180095E648 /* dc_kcey.c */; };
836F6F7D18BDC2190095E648 /* dc_str.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4118BDC2180095E648 /* dc_str.c */; };
836F6F7E18BDC2190095E648 /* de2.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4218BDC2180095E648 /* de2.c */; };
836F6F7F18BDC2190095E648 /* dmsg_segh.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4318BDC2180095E648 /* dmsg_segh.c */; };
836F6F8018BDC2190095E648 /* dsp_bdsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4418BDC2180095E648 /* dsp_bdsp.c */; };
836F6F8118BDC2190095E648 /* dsp_sth_str.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4518BDC2180095E648 /* dsp_sth_str.c */; };
836F6F8218BDC2190095E648 /* ea_schl.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4618BDC2180095E648 /* ea_schl.c */; };
836F6F8318BDC2190095E648 /* ea_old.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4718BDC2180095E648 /* ea_old.c */; };
836F6F8418BDC2190095E648 /* emff.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4818BDC2180095E648 /* emff.c */; };
836F6F8518BDC2190095E648 /* exakt_sc.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4918BDC2180095E648 /* exakt_sc.c */; };
836F6F8618BDC2190095E648 /* excitebots.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4A18BDC2180095E648 /* excitebots.c */; };
@@ -143,7 +170,6 @@
836F6F8918BDC2190095E648 /* gca.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4D18BDC2180095E648 /* gca.c */; };
836F6F8A18BDC2190095E648 /* gcsw.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4E18BDC2180095E648 /* gcsw.c */; };
836F6F8B18BDC2190095E648 /* genh.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E4F18BDC2180095E648 /* genh.c */; };
836F6F8C18BDC2190095E648 /* gh3_bar.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E5018BDC2180095E648 /* gh3_bar.c */; };
836F6F8D18BDC2190095E648 /* gsp_gsb.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E5118BDC2180095E648 /* gsp_gsb.c */; };
836F6F8E18BDC2190095E648 /* halpst.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E5218BDC2180095E648 /* halpst.c */; };
836F6F8F18BDC2190095E648 /* his.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E5318BDC2180095E648 /* his.c */; };
@@ -197,8 +223,6 @@
836F6FC218BDC2190095E648 /* pc_mxst.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8618BDC2180095E648 /* pc_mxst.c */; };
836F6FC318BDC2190095E648 /* pc_smp.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8718BDC2180095E648 /* pc_smp.c */; };
836F6FC418BDC2190095E648 /* pc_snds.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8818BDC2180095E648 /* pc_snds.c */; };
836F6FC518BDC2190095E648 /* pc_sob.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8918BDC2180095E648 /* pc_sob.c */; };
836F6FC618BDC2190095E648 /* pcm.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8A18BDC2180095E648 /* pcm.c */; };
836F6FC718BDC2190095E648 /* pona.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8B18BDC2180095E648 /* pona.c */; };
836F6FC818BDC2190095E648 /* pos.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8C18BDC2180095E648 /* pos.c */; };
836F6FC918BDC2190095E648 /* ps2_2pfs.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8D18BDC2180095E648 /* ps2_2pfs.c */; };
@@ -298,7 +322,6 @@
836F702E18BDC2190095E648 /* sli.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EF218BDC2190095E648 /* sli.c */; };
836F702F18BDC2190095E648 /* spt_spd.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EF318BDC2190095E648 /* spt_spd.c */; };
836F703018BDC2190095E648 /* sqex_scd.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EF418BDC2190095E648 /* sqex_scd.c */; };
836F703118BDC2190095E648 /* ss_stream.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EF518BDC2190095E648 /* ss_stream.c */; };
836F703218BDC2190095E648 /* str_asr.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EF618BDC2190095E648 /* str_asr.c */; };
836F703318BDC2190095E648 /* str_snds.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EF718BDC2190095E648 /* str_snds.c */; };
836F703418BDC2190095E648 /* stx.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EF818BDC2190095E648 /* stx.c */; };
@@ -378,7 +401,6 @@
839E21E91F2EDAF100EE54D7 /* vorbis_custom_utils_sk.c in Sources */ = {isa = PBXBuildFile; fileRef = 839E21DF1F2EDAF000EE54D7 /* vorbis_custom_utils_sk.c */; };
839E21EB1F2EDB0600EE54D7 /* sk_aud.c in Sources */ = {isa = PBXBuildFile; fileRef = 839E21EA1F2EDB0500EE54D7 /* sk_aud.c */; };
83A3F0741E3AD8B900D6A794 /* formats.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A3F0711E3AD8B900D6A794 /* formats.c */; };
83A3F0751E3AD8B900D6A794 /* formats.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A3F0721E3AD8B900D6A794 /* formats.h */; settings = {ATTRIBUTES = (Public, ); }; };
83A3F0761E3AD8B900D6A794 /* stack_alloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A3F0731E3AD8B900D6A794 /* stack_alloc.h */; };
83A5F75F198DF021009AF94C /* bfwav.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A5F75E198DF021009AF94C /* bfwav.c */; };
83AA5D161F6E2F600020821C /* ea_xa_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D0E1F6E2F5F0020821C /* ea_xa_decoder.c */; };
@@ -387,10 +409,8 @@
83AA5D191F6E2F600020821C /* ea_xas_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D151F6E2F600020821C /* ea_xas_decoder.c */; };
83AA5D1D1F6E2F800020821C /* blocked_vgs.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D1A1F6E2F7F0020821C /* blocked_vgs.c */; };
83AA5D1E1F6E2F800020821C /* blocked_awc.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D1B1F6E2F7F0020821C /* blocked_awc.c */; };
83AA5D1F1F6E2F800020821C /* ea_sns_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D1C1F6E2F7F0020821C /* ea_sns_blocked.c */; };
83AA5D241F6E2F9C0020821C /* awc.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D201F6E2F9B0020821C /* awc.c */; };
83AA5D251F6E2F9C0020821C /* hca_keys.h in Headers */ = {isa = PBXBuildFile; fileRef = 83AA5D211F6E2F9C0020821C /* hca_keys.h */; };
83AA5D261F6E2F9C0020821C /* ea_snu.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D221F6E2F9C0020821C /* ea_snu.c */; };
83AA5D271F6E2F9C0020821C /* stm.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D231F6E2F9C0020821C /* stm.c */; };
83AB8C751E8072A100086084 /* nub_vag.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AB8C731E8072A100086084 /* nub_vag.c */; };
83AB8C761E8072A100086084 /* x360_ast.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AB8C741E8072A100086084 /* x360_ast.c */; };
@@ -543,6 +563,40 @@
83345A4D1F8AEB2800B2EAA4 /* nsw_opus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nsw_opus.c; sourceTree = "<group>"; };
83345A4E1F8AEB2800B2EAA4 /* xvag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xvag.c; sourceTree = "<group>"; };
833A7A2D1ED11961003EC53E /* xau.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xau.c; sourceTree = "<group>"; };
8349A8DC1FE6251E00E26435 /* vorbis_custom_utils_vid1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vorbis_custom_utils_vid1.c; sourceTree = "<group>"; };
8349A8DD1FE6251F00E26435 /* ffmpeg_decoder_utils_bgw_atrac3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffmpeg_decoder_utils_bgw_atrac3.c; sourceTree = "<group>"; };
8349A8DE1FE6251F00E26435 /* ea_mt_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_mt_decoder.c; sourceTree = "<group>"; };
8349A8E21FE6253800E26435 /* blocked_dec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_dec.c; sourceTree = "<group>"; };
8349A8E31FE6253800E26435 /* blocked_ea_1snh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ea_1snh.c; sourceTree = "<group>"; };
8349A8E41FE6253800E26435 /* blocked_ea_schl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ea_schl.c; sourceTree = "<group>"; };
8349A8E51FE6253800E26435 /* blocked_ivaud.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ivaud.c; sourceTree = "<group>"; };
8349A8E61FE6253900E26435 /* blocked_vawx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_vawx.c; sourceTree = "<group>"; };
8349A8E71FE6253900E26435 /* blocked_ea_sns.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ea_sns.c; sourceTree = "<group>"; };
8349A8EE1FE6257C00E26435 /* dec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dec.c; sourceTree = "<group>"; };
8349A8EF1FE6257C00E26435 /* ezw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ezw.c; sourceTree = "<group>"; };
8349A8F01FE6257C00E26435 /* pc_ast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pc_ast.c; sourceTree = "<group>"; };
8349A8F11FE6257D00E26435 /* sab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sab.c; sourceTree = "<group>"; };
8349A8F21FE6257D00E26435 /* ps2_pcm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_pcm.c; sourceTree = "<group>"; };
8349A8F31FE6257D00E26435 /* sqex_scd_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqex_scd_streamfile.h; sourceTree = "<group>"; };
8349A8F41FE6257D00E26435 /* ubi_sb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ubi_sb.c; sourceTree = "<group>"; };
8349A8F51FE6257D00E26435 /* scd_pcm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scd_pcm.c; sourceTree = "<group>"; };
8349A8F61FE6257E00E26435 /* aix_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aix_streamfile.h; sourceTree = "<group>"; };
8349A8F71FE6257E00E26435 /* ea_eaac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_eaac.c; sourceTree = "<group>"; };
8349A8F81FE6257E00E26435 /* bar_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bar_streamfile.h; sourceTree = "<group>"; };
8349A8F91FE6257E00E26435 /* vsf_tta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vsf_tta.c; sourceTree = "<group>"; };
8349A8FA1FE6257E00E26435 /* ngc_vid1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_vid1.c; sourceTree = "<group>"; };
8349A8FB1FE6257F00E26435 /* omu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = omu.c; sourceTree = "<group>"; };
8349A8FC1FE6257F00E26435 /* ps2_xa2_rrp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_xa2_rrp.c; sourceTree = "<group>"; };
8349A8FD1FE6257F00E26435 /* flx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = flx.c; sourceTree = "<group>"; };
8349A8FE1FE6257F00E26435 /* pc_adp_otns.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pc_adp_otns.c; sourceTree = "<group>"; };
8349A8FF1FE6258000E26435 /* ea_1snh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_1snh.c; sourceTree = "<group>"; };
8349A9001FE6258000E26435 /* afc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = afc.c; sourceTree = "<group>"; };
8349A9011FE6258000E26435 /* vxn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vxn.c; sourceTree = "<group>"; };
8349A9021FE6258100E26435 /* adx_keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = adx_keys.h; sourceTree = "<group>"; };
8349A9031FE6258100E26435 /* mogg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mogg.c; sourceTree = "<group>"; };
8349A9041FE6258100E26435 /* aax_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aax_streamfile.h; sourceTree = "<group>"; };
8349A9051FE6258100E26435 /* bar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bar.c; sourceTree = "<group>"; };
8349A9061FE6258100E26435 /* naac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = naac.c; sourceTree = "<group>"; };
834D3A6D19F47C98001C54F6 /* g1l.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = g1l.c; sourceTree = "<group>"; };
8350270C1ED119D200C25929 /* ps3_mta2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps3_mta2.c; sourceTree = "<group>"; };
835027121ED119E000C25929 /* mta2_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mta2_decoder.c; sourceTree = "<group>"; };
@@ -586,16 +640,12 @@
836F6E0318BDC2180095E648 /* bdsp_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bdsp_blocked.c; sourceTree = "<group>"; };
836F6E0418BDC2180095E648 /* blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked.c; sourceTree = "<group>"; };
836F6E0518BDC2180095E648 /* caf_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = caf_blocked.c; sourceTree = "<group>"; };
836F6E0618BDC2180095E648 /* de2_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = de2_blocked.c; sourceTree = "<group>"; };
836F6E0718BDC2180095E648 /* ea_block.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_block.c; sourceTree = "<group>"; };
836F6E0818BDC2180095E648 /* emff_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = emff_blocked.c; sourceTree = "<group>"; };
836F6E0918BDC2180095E648 /* filp_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = filp_blocked.c; sourceTree = "<group>"; };
836F6E0A18BDC2180095E648 /* gsb_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gsb_blocked.c; sourceTree = "<group>"; };
836F6E0B18BDC2180095E648 /* halpst_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = halpst_blocked.c; sourceTree = "<group>"; };
836F6E0C18BDC2180095E648 /* ims_block.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ims_block.c; sourceTree = "<group>"; };
836F6E0D18BDC2180095E648 /* interleave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = interleave.c; sourceTree = "<group>"; };
836F6E0E18BDC2180095E648 /* interleave_byte.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = interleave_byte.c; sourceTree = "<group>"; };
836F6E0F18BDC2180095E648 /* ivaud_layout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ivaud_layout.c; sourceTree = "<group>"; };
836F6E1018BDC2180095E648 /* layout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = layout.h; sourceTree = "<group>"; };
836F6E1218BDC2180095E648 /* mus_acm_layout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mus_acm_layout.c; sourceTree = "<group>"; };
836F6E1318BDC2180095E648 /* mxch_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mxch_blocked.c; sourceTree = "<group>"; };
@@ -617,7 +667,6 @@
836F6E2A18BDC2180095E648 /* aax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aax.c; sourceTree = "<group>"; };
836F6E2B18BDC2180095E648 /* acm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = acm.c; sourceTree = "<group>"; };
836F6E2C18BDC2180095E648 /* ads.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ads.c; sourceTree = "<group>"; };
836F6E2E18BDC2180095E648 /* afc_header.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = afc_header.c; sourceTree = "<group>"; };
836F6E2F18BDC2180095E648 /* agsc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = agsc.c; sourceTree = "<group>"; };
836F6E3018BDC2180095E648 /* ahx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ahx.c; sourceTree = "<group>"; };
836F6E3118BDC2180095E648 /* aifc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aifc.c; sourceTree = "<group>"; };
@@ -637,12 +686,10 @@
836F6E3F18BDC2180095E648 /* dc_idvi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dc_idvi.c; sourceTree = "<group>"; };
836F6E4018BDC2180095E648 /* dc_kcey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dc_kcey.c; sourceTree = "<group>"; };
836F6E4118BDC2180095E648 /* dc_str.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dc_str.c; sourceTree = "<group>"; };
836F6E4218BDC2180095E648 /* de2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = de2.c; sourceTree = "<group>"; };
836F6E4318BDC2180095E648 /* dmsg_segh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dmsg_segh.c; sourceTree = "<group>"; };
836F6E4418BDC2180095E648 /* dsp_bdsp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dsp_bdsp.c; sourceTree = "<group>"; };
836F6E4518BDC2180095E648 /* dsp_sth_str.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dsp_sth_str.c; sourceTree = "<group>"; };
836F6E4618BDC2180095E648 /* ea_schl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_schl.c; sourceTree = "<group>"; };
836F6E4718BDC2180095E648 /* ea_old.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_old.c; sourceTree = "<group>"; };
836F6E4818BDC2180095E648 /* emff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = emff.c; sourceTree = "<group>"; };
836F6E4918BDC2180095E648 /* exakt_sc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = exakt_sc.c; sourceTree = "<group>"; };
836F6E4A18BDC2180095E648 /* excitebots.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = excitebots.c; sourceTree = "<group>"; };
@@ -651,7 +698,6 @@
836F6E4D18BDC2180095E648 /* gca.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gca.c; sourceTree = "<group>"; };
836F6E4E18BDC2180095E648 /* gcsw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gcsw.c; sourceTree = "<group>"; };
836F6E4F18BDC2180095E648 /* genh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = genh.c; sourceTree = "<group>"; };
836F6E5018BDC2180095E648 /* gh3_bar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gh3_bar.c; sourceTree = "<group>"; };
836F6E5118BDC2180095E648 /* gsp_gsb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gsp_gsb.c; sourceTree = "<group>"; };
836F6E5218BDC2180095E648 /* halpst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = halpst.c; sourceTree = "<group>"; };
836F6E5318BDC2180095E648 /* his.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = his.c; sourceTree = "<group>"; };
@@ -705,8 +751,6 @@
836F6E8618BDC2180095E648 /* pc_mxst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pc_mxst.c; sourceTree = "<group>"; };
836F6E8718BDC2180095E648 /* pc_smp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pc_smp.c; sourceTree = "<group>"; };
836F6E8818BDC2180095E648 /* pc_snds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pc_snds.c; sourceTree = "<group>"; };
836F6E8918BDC2180095E648 /* pc_sob.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pc_sob.c; sourceTree = "<group>"; };
836F6E8A18BDC2180095E648 /* pcm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcm.c; sourceTree = "<group>"; };
836F6E8B18BDC2180095E648 /* pona.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pona.c; sourceTree = "<group>"; };
836F6E8C18BDC2180095E648 /* pos.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pos.c; sourceTree = "<group>"; };
836F6E8D18BDC2180095E648 /* ps2_2pfs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_2pfs.c; sourceTree = "<group>"; };
@@ -806,7 +850,6 @@
836F6EF218BDC2190095E648 /* sli.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sli.c; sourceTree = "<group>"; };
836F6EF318BDC2190095E648 /* spt_spd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = spt_spd.c; sourceTree = "<group>"; };
836F6EF418BDC2190095E648 /* sqex_scd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqex_scd.c; sourceTree = "<group>"; };
836F6EF518BDC2190095E648 /* ss_stream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ss_stream.c; sourceTree = "<group>"; };
836F6EF618BDC2190095E648 /* str_asr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = str_asr.c; sourceTree = "<group>"; };
836F6EF718BDC2190095E648 /* str_snds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = str_snds.c; sourceTree = "<group>"; };
836F6EF818BDC2190095E648 /* stx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stx.c; sourceTree = "<group>"; };
@@ -884,7 +927,6 @@
839E21DF1F2EDAF000EE54D7 /* vorbis_custom_utils_sk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vorbis_custom_utils_sk.c; sourceTree = "<group>"; };
839E21EA1F2EDB0500EE54D7 /* sk_aud.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sk_aud.c; sourceTree = "<group>"; };
83A3F0711E3AD8B900D6A794 /* formats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = formats.c; sourceTree = "<group>"; };
83A3F0721E3AD8B900D6A794 /* formats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = formats.h; sourceTree = "<group>"; };
83A3F0731E3AD8B900D6A794 /* stack_alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stack_alloc.h; sourceTree = "<group>"; };
83A5F75E198DF021009AF94C /* bfwav.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bfwav.c; sourceTree = "<group>"; };
83AA5D0E1F6E2F5F0020821C /* ea_xa_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_xa_decoder.c; sourceTree = "<group>"; };
@@ -893,10 +935,8 @@
83AA5D151F6E2F600020821C /* ea_xas_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_xas_decoder.c; sourceTree = "<group>"; };
83AA5D1A1F6E2F7F0020821C /* blocked_vgs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_vgs.c; sourceTree = "<group>"; };
83AA5D1B1F6E2F7F0020821C /* blocked_awc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_awc.c; sourceTree = "<group>"; };
83AA5D1C1F6E2F7F0020821C /* ea_sns_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_sns_blocked.c; sourceTree = "<group>"; };
83AA5D201F6E2F9B0020821C /* awc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = awc.c; sourceTree = "<group>"; };
83AA5D211F6E2F9C0020821C /* hca_keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hca_keys.h; sourceTree = "<group>"; };
83AA5D221F6E2F9C0020821C /* ea_snu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_snu.c; sourceTree = "<group>"; };
83AA5D231F6E2F9C0020821C /* stm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stm.c; sourceTree = "<group>"; };
83AB8C731E8072A100086084 /* nub_vag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nub_vag.c; sourceTree = "<group>"; };
83AB8C741E8072A100086084 /* x360_ast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = x360_ast.c; sourceTree = "<group>"; };
@@ -1038,7 +1078,6 @@
836F6DFF18BDC2180095E648 /* layout */,
836F6E2718BDC2180095E648 /* meta */,
83A3F0711E3AD8B900D6A794 /* formats.c */,
83A3F0721E3AD8B900D6A794 /* formats.h */,
83A3F0731E3AD8B900D6A794 /* stack_alloc.h */,
836F6F1718BDC2190095E648 /* streamfile.c */,
836F6F1818BDC2190095E648 /* streamfile.h */,
@@ -1054,6 +1093,9 @@
836F6DDF18BDC2180095E648 /* coding */ = {
isa = PBXGroup;
children = (
8349A8DE1FE6251F00E26435 /* ea_mt_decoder.c */,
8349A8DD1FE6251F00E26435 /* ffmpeg_decoder_utils_bgw_atrac3.c */,
8349A8DC1FE6251E00E26435 /* vorbis_custom_utils_vid1.c */,
83345A491F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c */,
8374EE361F787AB500033E90 /* ffmpeg_decoder_utils_ea_xma.c */,
8374EE3D1F787AB600033E90 /* ffmpeg_decoder_utils.c */,
@@ -1116,9 +1158,14 @@
836F6DFF18BDC2180095E648 /* layout */ = {
isa = PBXGroup;
children = (
8349A8E21FE6253800E26435 /* blocked_dec.c */,
8349A8E31FE6253800E26435 /* blocked_ea_1snh.c */,
8349A8E41FE6253800E26435 /* blocked_ea_schl.c */,
8349A8E71FE6253900E26435 /* blocked_ea_sns.c */,
8349A8E51FE6253800E26435 /* blocked_ivaud.c */,
8349A8E61FE6253900E26435 /* blocked_vawx.c */,
83AA5D1B1F6E2F7F0020821C /* blocked_awc.c */,
83AA5D1A1F6E2F7F0020821C /* blocked_vgs.c */,
83AA5D1C1F6E2F7F0020821C /* ea_sns_blocked.c */,
830165A11F256BF400CA0941 /* hwas_blocked.c */,
831BD1201EEE1D2A00198540 /* rws_blocked.c */,
836F6E0018BDC2180095E648 /* aax_layout.c */,
@@ -1127,16 +1174,12 @@
836F6E0318BDC2180095E648 /* bdsp_blocked.c */,
836F6E0418BDC2180095E648 /* blocked.c */,
836F6E0518BDC2180095E648 /* caf_blocked.c */,
836F6E0618BDC2180095E648 /* de2_blocked.c */,
836F6E0718BDC2180095E648 /* ea_block.c */,
836F6E0818BDC2180095E648 /* emff_blocked.c */,
836F6E0918BDC2180095E648 /* filp_blocked.c */,
836F6E0A18BDC2180095E648 /* gsb_blocked.c */,
836F6E0B18BDC2180095E648 /* halpst_blocked.c */,
836F6E0C18BDC2180095E648 /* ims_block.c */,
836F6E0D18BDC2180095E648 /* interleave.c */,
836F6E0E18BDC2180095E648 /* interleave_byte.c */,
836F6E0F18BDC2180095E648 /* ivaud_layout.c */,
836F6E1018BDC2180095E648 /* layout.h */,
836F6E1218BDC2180095E648 /* mus_acm_layout.c */,
836F6E1318BDC2180095E648 /* mxch_blocked.c */,
@@ -1161,12 +1204,36 @@
836F6E2718BDC2180095E648 /* meta */ = {
isa = PBXGroup;
children = (
8349A9041FE6258100E26435 /* aax_streamfile.h */,
8349A9021FE6258100E26435 /* adx_keys.h */,
8349A9001FE6258000E26435 /* afc.c */,
8349A8F61FE6257E00E26435 /* aix_streamfile.h */,
8349A8F81FE6257E00E26435 /* bar_streamfile.h */,
8349A9051FE6258100E26435 /* bar.c */,
8349A8EE1FE6257C00E26435 /* dec.c */,
8349A8FF1FE6258000E26435 /* ea_1snh.c */,
8349A8F71FE6257E00E26435 /* ea_eaac.c */,
8349A8EF1FE6257C00E26435 /* ezw.c */,
8349A8FD1FE6257F00E26435 /* flx.c */,
8349A9031FE6258100E26435 /* mogg.c */,
8349A9061FE6258100E26435 /* naac.c */,
8349A8FA1FE6257E00E26435 /* ngc_vid1.c */,
8349A8FB1FE6257F00E26435 /* omu.c */,
8349A8FE1FE6257F00E26435 /* pc_adp_otns.c */,
8349A8F01FE6257C00E26435 /* pc_ast.c */,
8349A8F21FE6257D00E26435 /* ps2_pcm.c */,
8349A8FC1FE6257F00E26435 /* ps2_xa2_rrp.c */,
8349A8F11FE6257D00E26435 /* sab.c */,
8349A8F51FE6257D00E26435 /* scd_pcm.c */,
8349A8F31FE6257D00E26435 /* sqex_scd_streamfile.h */,
8349A8F41FE6257D00E26435 /* ubi_sb.c */,
8349A8F91FE6257E00E26435 /* vsf_tta.c */,
8349A9011FE6258000E26435 /* vxn.c */,
83345A4D1F8AEB2800B2EAA4 /* nsw_opus.c */,
83345A4B1F8AEB2700B2EAA4 /* nub_xma.c */,
83345A4C1F8AEB2700B2EAA4 /* pc_al2.c */,
83345A4E1F8AEB2800B2EAA4 /* xvag.c */,
83AA5D201F6E2F9B0020821C /* awc.c */,
83AA5D221F6E2F9C0020821C /* ea_snu.c */,
83AA5D211F6E2F9C0020821C /* hca_keys.h */,
83AA5D231F6E2F9C0020821C /* stm.c */,
839E21EA1F2EDB0500EE54D7 /* sk_aud.c */,
@@ -1212,7 +1279,6 @@
836F6E2A18BDC2180095E648 /* aax.c */,
836F6E2B18BDC2180095E648 /* acm.c */,
836F6E2C18BDC2180095E648 /* ads.c */,
836F6E2E18BDC2180095E648 /* afc_header.c */,
836F6E2F18BDC2180095E648 /* agsc.c */,
836F6E3018BDC2180095E648 /* ahx.c */,
836F6E3118BDC2180095E648 /* aifc.c */,
@@ -1232,12 +1298,10 @@
836F6E3F18BDC2180095E648 /* dc_idvi.c */,
836F6E4018BDC2180095E648 /* dc_kcey.c */,
836F6E4118BDC2180095E648 /* dc_str.c */,
836F6E4218BDC2180095E648 /* de2.c */,
836F6E4318BDC2180095E648 /* dmsg_segh.c */,
836F6E4418BDC2180095E648 /* dsp_bdsp.c */,
836F6E4518BDC2180095E648 /* dsp_sth_str.c */,
836F6E4618BDC2180095E648 /* ea_schl.c */,
836F6E4718BDC2180095E648 /* ea_old.c */,
836F6E4818BDC2180095E648 /* emff.c */,
836F6E4918BDC2180095E648 /* exakt_sc.c */,
836F6E4A18BDC2180095E648 /* excitebots.c */,
@@ -1246,7 +1310,6 @@
836F6E4D18BDC2180095E648 /* gca.c */,
836F6E4E18BDC2180095E648 /* gcsw.c */,
836F6E4F18BDC2180095E648 /* genh.c */,
836F6E5018BDC2180095E648 /* gh3_bar.c */,
836F6E5118BDC2180095E648 /* gsp_gsb.c */,
836F6E5218BDC2180095E648 /* halpst.c */,
836F6E5318BDC2180095E648 /* his.c */,
@@ -1300,8 +1363,6 @@
836F6E8618BDC2180095E648 /* pc_mxst.c */,
836F6E8718BDC2180095E648 /* pc_smp.c */,
836F6E8818BDC2180095E648 /* pc_snds.c */,
836F6E8918BDC2180095E648 /* pc_sob.c */,
836F6E8A18BDC2180095E648 /* pcm.c */,
836F6E8B18BDC2180095E648 /* pona.c */,
836F6E8C18BDC2180095E648 /* pos.c */,
836F6E8D18BDC2180095E648 /* ps2_2pfs.c */,
@@ -1401,7 +1462,6 @@
836F6EF218BDC2190095E648 /* sli.c */,
836F6EF318BDC2190095E648 /* spt_spd.c */,
836F6EF418BDC2190095E648 /* sqex_scd.c */,
836F6EF518BDC2190095E648 /* ss_stream.c */,
836F6EF618BDC2190095E648 /* str_asr.c */,
836F6EF718BDC2190095E648 /* str_snds.c */,
836F6EF818BDC2190095E648 /* stx.c */,
@@ -1475,12 +1535,14 @@
836F705518BDC2190095E648 /* streamtypes.h in Headers */,
836F6F1F18BDC2190095E648 /* acm_decoder.h in Headers */,
836F6F3518BDC2190095E648 /* nwa_decoder.h in Headers */,
8349A91D1FE6258200E26435 /* aax_streamfile.h in Headers */,
8349A90F1FE6258200E26435 /* aix_streamfile.h in Headers */,
8349A9111FE6258200E26435 /* bar_streamfile.h in Headers */,
836F6F2718BDC2190095E648 /* g72x_state.h in Headers */,
839E21E01F2EDAF100EE54D7 /* vorbis_custom_data_fsb.h in Headers */,
836F705418BDC2190095E648 /* streamfile.h in Headers */,
8374EE401F787AB600033E90 /* ffmpeg_decoder_utils.h in Headers */,
83A3F0761E3AD8B900D6A794 /* stack_alloc.h in Headers */,
83A3F0751E3AD8B900D6A794 /* formats.h in Headers */,
8323894B1D22419B00482226 /* clHCA.h in Headers */,
839E21E81F2EDAF100EE54D7 /* mpeg_decoder.h in Headers */,
839E21E51F2EDAF100EE54D7 /* vorbis_custom_decoder.h in Headers */,
@@ -1489,6 +1551,8 @@
48C2650F1A5D420800A0A3D6 /* vorbisfile.h in Headers */,
836F705718BDC2190095E648 /* util.h in Headers */,
836F6F9A18BDC2190095E648 /* meta.h in Headers */,
8349A90C1FE6258200E26435 /* sqex_scd_streamfile.h in Headers */,
8349A91B1FE6258200E26435 /* adx_keys.h in Headers */,
836F6F4D18BDC2190095E648 /* layout.h in Headers */,
83AA5D251F6E2F9C0020821C /* hca_keys.h in Headers */,
836F6F2318BDC2190095E648 /* coding.h in Headers */,
@@ -1641,6 +1705,7 @@
files = (
839E21E21F2EDAF100EE54D7 /* vorbis_custom_utils_wwise.c in Sources */,
83E56BA51F2EE3520026BC60 /* vorbis_custom_utils_ogl.c in Sources */,
8349A9071FE6258200E26435 /* dec.c in Sources */,
839E21E91F2EDAF100EE54D7 /* vorbis_custom_utils_sk.c in Sources */,
839E21E41F2EDAF100EE54D7 /* vorbis_custom_utils_fsb.c in Sources */,
839E21E11F2EDAF100EE54D7 /* vorbis_custom_decoder.c in Sources */,
@@ -1652,8 +1717,10 @@
8301659C1F256BD000CA0941 /* nds_strm_ffta2.c in Sources */,
83CAB8E31F0B0755001BC993 /* pc_xa30.c in Sources */,
83CAB8E21F0B0752001BC993 /* wii_04sw.c in Sources */,
8349A8DF1FE6251F00E26435 /* vorbis_custom_utils_vid1.c in Sources */,
839B54571EEE1DA000048A2D /* rws_blocked.c in Sources */,
839B54521EEE1D9600048A2D /* ngc_ulw.c in Sources */,
8349A8E01FE6251F00E26435 /* ffmpeg_decoder_utils_bgw_atrac3.c in Sources */,
836F6FAD18BDC2190095E648 /* ngc_dsp_konami.c in Sources */,
836F6FF818BDC2190095E648 /* ps2_smpl.c in Sources */,
836F6F8118BDC2190095E648 /* dsp_sth_str.c in Sources */,
@@ -1664,7 +1731,6 @@
836F6F7418BDC2190095E648 /* bgw.c in Sources */,
836F6F7218BDC2190095E648 /* baf.c in Sources */,
83F5F8831908D0A400C8E65F /* fsb5.c in Sources */,
836F6F4B18BDC2190095E648 /* interleave_byte.c in Sources */,
836F6FD418BDC2190095E648 /* ps2_dxh.c in Sources */,
836F700C18BDC2190095E648 /* ps2_wb.c in Sources */,
836F6F7D18BDC2190095E648 /* dc_str.c in Sources */,
@@ -1678,6 +1744,7 @@
836F6F9B18BDC2190095E648 /* mn_str.c in Sources */,
836F6F5918BDC2190095E648 /* tra_blocked.c in Sources */,
836F6F9F18BDC2190095E648 /* musc.c in Sources */,
8349A9121FE6258200E26435 /* vsf_tta.c in Sources */,
836F6FCA18BDC2190095E648 /* ps2_adm.c in Sources */,
836F6FA118BDC2190095E648 /* myspd.c in Sources */,
836F6FD718BDC2190095E648 /* ps2_filp.c in Sources */,
@@ -1691,6 +1758,7 @@
83299FD01E7660C7003A3242 /* bik.c in Sources */,
836F6F3318BDC2190095E648 /* ngc_dtk_decoder.c in Sources */,
836F6FBB18BDC2190095E648 /* ngca.c in Sources */,
8349A91E1FE6258200E26435 /* bar.c in Sources */,
836F6F5218BDC2190095E648 /* ps2_adm_blocked.c in Sources */,
832389521D224C0800482226 /* hca_decoder.c in Sources */,
836F6F9418BDC2190095E648 /* ivb.c in Sources */,
@@ -1700,21 +1768,27 @@
836F6F2218BDC2190095E648 /* at3_decoder.c in Sources */,
83EDE5D91A70951A005F5D84 /* btsnd.c in Sources */,
836F6FFC18BDC2190095E648 /* ps2_ster.c in Sources */,
8349A9171FE6258200E26435 /* pc_adp_otns.c in Sources */,
836F701E18BDC2190095E648 /* redspark.c in Sources */,
836F6FA018BDC2190095E648 /* musx.c in Sources */,
836F705818BDC2190095E648 /* vgmstream.c in Sources */,
8349A90A1FE6258200E26435 /* sab.c in Sources */,
836F6F6818BDC2190095E648 /* ads.c in Sources */,
83AB8C761E8072A100086084 /* x360_ast.c in Sources */,
836F6F8B18BDC2190095E648 /* genh.c in Sources */,
8349A8EA1FE6253900E26435 /* blocked_ea_schl.c in Sources */,
836F705118BDC2190095E648 /* zsd.c in Sources */,
8349A91F1FE6258200E26435 /* naac.c in Sources */,
836F6FD218BDC2190095E648 /* ps2_bmdx.c in Sources */,
836F703C18BDC2190095E648 /* wii_bns.c in Sources */,
835027131ED119E000C25929 /* mta2_decoder.c in Sources */,
836F6FA718BDC2190095E648 /* nds_strm.c in Sources */,
8349A91A1FE6258200E26435 /* vxn.c in Sources */,
8349A8EB1FE6253900E26435 /* blocked_ivaud.c in Sources */,
83A3F0741E3AD8B900D6A794 /* formats.c in Sources */,
836F6F6E18BDC2190095E648 /* aix.c in Sources */,
836F703118BDC2190095E648 /* ss_stream.c in Sources */,
836F6F8718BDC2190095E648 /* ffw.c in Sources */,
8349A9141FE6258200E26435 /* omu.c in Sources */,
836F6FE418BDC2190095E648 /* ps2_leg.c in Sources */,
836F705618BDC2190095E648 /* util.c in Sources */,
836F703618BDC2190095E648 /* thp.c in Sources */,
@@ -1745,16 +1819,17 @@
836F6F6518BDC2190095E648 /* 2dx9.c in Sources */,
836F700818BDC2190095E648 /* ps2_vms.c in Sources */,
836F702418BDC2190095E648 /* rwsd.c in Sources */,
836F6F7E18BDC2190095E648 /* de2.c in Sources */,
836F6F5618BDC2190095E648 /* scd_int_layout.c in Sources */,
836F6F6618BDC2190095E648 /* aax.c in Sources */,
836F6F4C18BDC2190095E648 /* ivaud_layout.c in Sources */,
836F6FD618BDC2190095E648 /* ps2_exst.c in Sources */,
836F6F6718BDC2190095E648 /* acm.c in Sources */,
836F6F8A18BDC2190095E648 /* gcsw.c in Sources */,
836F6F9C18BDC2190095E648 /* mp4.c in Sources */,
8349A9101FE6258200E26435 /* ea_eaac.c in Sources */,
836F700F18BDC2190095E648 /* ps2_xa30.c in Sources */,
8349A8ED1FE6253900E26435 /* blocked_ea_sns.c in Sources */,
836F6F6F18BDC2190095E648 /* akb.c in Sources */,
8349A9181FE6258200E26435 /* ea_1snh.c in Sources */,
836F6F7F18BDC2190095E648 /* dmsg_segh.c in Sources */,
83709E071ECBC1A4005C03D3 /* mss.c in Sources */,
836F6F8F18BDC2190095E648 /* his.c in Sources */,
@@ -1762,7 +1837,6 @@
836F6FEF18BDC2190095E648 /* ps2_pnb.c in Sources */,
836F6FCB18BDC2190095E648 /* ps2_ads.c in Sources */,
836F6FD318BDC2190095E648 /* ps2_ccc.c in Sources */,
83AA5D261F6E2F9C0020821C /* ea_snu.c in Sources */,
83AA5D171F6E2F600020821C /* mpeg_custom_utils_ealayer3.c in Sources */,
83345A521F8AEB2800B2EAA4 /* xvag.c in Sources */,
836F704C18BDC2190095E648 /* xbox_xvas.c in Sources */,
@@ -1775,16 +1849,15 @@
836F6FCC18BDC2190095E648 /* ps2_adsc.c in Sources */,
836F6F7918BDC2190095E648 /* dc_asd.c in Sources */,
836F6FC118BDC2190095E648 /* pc_adp.c in Sources */,
836F6F8318BDC2190095E648 /* ea_old.c in Sources */,
836F701A18BDC2190095E648 /* psx_fag.c in Sources */,
836F703B18BDC2190095E648 /* vsf.c in Sources */,
836F6F3D18BDC2190095E648 /* aax_layout.c in Sources */,
83AA5D1F1F6E2F800020821C /* ea_sns_blocked.c in Sources */,
836F6F8218BDC2190095E648 /* ea_schl.c in Sources */,
836F700A18BDC2190095E648 /* ps2_vpk.c in Sources */,
836F6F7318BDC2190095E648 /* bcstm.c in Sources */,
83299FD11E7660C7003A3242 /* dsp_adx.c in Sources */,
836F704018BDC2190095E648 /* wii_sng.c in Sources */,
8349A9131FE6258200E26435 /* ngc_vid1.c in Sources */,
8350C0551E071881009E0A93 /* xma.c in Sources */,
836F6F3218BDC2190095E648 /* ngc_dsp_decoder.c in Sources */,
836F704218BDC2190095E648 /* wii_sts.c in Sources */,
@@ -1799,7 +1872,6 @@
836F702B18BDC2190095E648 /* sdt.c in Sources */,
836F6FDA18BDC2190095E648 /* ps2_hgc1.c in Sources */,
836F702C18BDC2190095E648 /* seg.c in Sources */,
836F6F6A18BDC2190095E648 /* afc_header.c in Sources */,
836F700918BDC2190095E648 /* ps2_voi.c in Sources */,
836F6F3E18BDC2190095E648 /* aix_layout.c in Sources */,
836F6FE018BDC2190095E648 /* ps2_joe.c in Sources */,
@@ -1814,6 +1886,7 @@
836F6F5518BDC2190095E648 /* psx_mgav_blocked.c in Sources */,
836F6F2018BDC2190095E648 /* adx_decoder.c in Sources */,
836F6FCF18BDC2190095E648 /* ps2_aus.c in Sources */,
8349A8EC1FE6253900E26435 /* blocked_vawx.c in Sources */,
836F6F4018BDC2190095E648 /* bdsp_blocked.c in Sources */,
836F700418BDC2190095E648 /* ps2_vas.c in Sources */,
836F6F9818BDC2190095E648 /* mattel_hyperscan.c in Sources */,
@@ -1822,7 +1895,7 @@
83709E081ECBC1A4005C03D3 /* ps2_rxws.c in Sources */,
836F6F6D18BDC2190095E648 /* aifc.c in Sources */,
836F702218BDC2190095E648 /* rsd.c in Sources */,
836F6FC618BDC2190095E648 /* pcm.c in Sources */,
8349A90D1FE6258200E26435 /* ubi_sb.c in Sources */,
83345A501F8AEB2800B2EAA4 /* pc_al2.c in Sources */,
836F702518BDC2190095E648 /* rwx.c in Sources */,
836F6F3A18BDC2190095E648 /* sdx2_decoder.c in Sources */,
@@ -1851,6 +1924,7 @@
836F6FE618BDC2190095E648 /* ps2_mcg.c in Sources */,
836F6F5118BDC2190095E648 /* nolayout.c in Sources */,
83AA5D241F6E2F9C0020821C /* awc.c in Sources */,
8349A8E91FE6253900E26435 /* blocked_ea_1snh.c in Sources */,
836F702918BDC2190095E648 /* sat_sap.c in Sources */,
836F6F3718BDC2190095E648 /* pcm_decoder.c in Sources */,
831BA6281EAC61CB00CF89B0 /* coding_utils.c in Sources */,
@@ -1869,11 +1943,13 @@
83709E061ECBC1A4005C03D3 /* mc3.c in Sources */,
831BA61F1EAC61A500CF89B0 /* x360_cxs.c in Sources */,
836F6FCD18BDC2190095E648 /* ps2_ass.c in Sources */,
8349A90B1FE6258200E26435 /* ps2_pcm.c in Sources */,
836F6FFE18BDC2190095E648 /* ps2_str.c in Sources */,
836F6F4A18BDC2190095E648 /* interleave.c in Sources */,
83EDE5D81A70951A005F5D84 /* mca.c in Sources */,
831BA61B1EAC61A500CF89B0 /* sgxd.c in Sources */,
838BDB6C1D3AFAB10022CA6F /* ffmpeg_decoder.c in Sources */,
8349A8E11FE6251F00E26435 /* ea_mt_decoder.c in Sources */,
836F6FA518BDC2190095E648 /* nds_rrds.c in Sources */,
836F702F18BDC2190095E648 /* spt_spd.c in Sources */,
836F704618BDC2190095E648 /* x360_tra.c in Sources */,
@@ -1882,7 +1958,9 @@
834D3A6E19F47C98001C54F6 /* g1l.c in Sources */,
836F6FC318BDC2190095E648 /* pc_smp.c in Sources */,
836F6FCE18BDC2190095E648 /* ps2_ast.c in Sources */,
8349A9091FE6258200E26435 /* pc_ast.c in Sources */,
836F6F5418BDC2190095E648 /* ps2_strlr_blocked.c in Sources */,
8349A91C1FE6258200E26435 /* mogg.c in Sources */,
836F703D18BDC2190095E648 /* wii_mus.c in Sources */,
836F700D18BDC2190095E648 /* ps2_wmus.c in Sources */,
831BA61C1EAC61A500CF89B0 /* sxd.c in Sources */,
@@ -1901,14 +1979,16 @@
836F6F7718BDC2190095E648 /* capdsp.c in Sources */,
836F6FB018BDC2190095E648 /* ngc_dsp_ygo.c in Sources */,
836F703318BDC2190095E648 /* str_snds.c in Sources */,
8349A9191FE6258200E26435 /* afc.c in Sources */,
836F703718BDC2190095E648 /* tun.c in Sources */,
836F700B18BDC2190095E648 /* ps2_wad.c in Sources */,
8349A9161FE6258200E26435 /* flx.c in Sources */,
831BA61E1EAC61A500CF89B0 /* vawx.c in Sources */,
836F702A18BDC2190095E648 /* sd9.c in Sources */,
836F6FB418BDC2190095E648 /* ngc_nst_dsp.c in Sources */,
836F6F4418BDC2190095E648 /* ea_block.c in Sources */,
836F6FDB18BDC2190095E648 /* ps2_hsf.c in Sources */,
836F6FF618BDC2190095E648 /* ps2_sfs.c in Sources */,
8349A90E1FE6258200E26435 /* scd_pcm.c in Sources */,
836F6F9518BDC2190095E648 /* kraw.c in Sources */,
836F6FB718BDC2190095E648 /* ngc_ssm.c in Sources */,
83709E051ECBC1A4005C03D3 /* gtd.c in Sources */,
@@ -1926,8 +2006,8 @@
836F700318BDC2190095E648 /* ps2_vag.c in Sources */,
836F6FAA18BDC2190095E648 /* ngc_bh2pcm.c in Sources */,
831BA6211EAC61A500CF89B0 /* x360_pasx.c in Sources */,
836F6F4318BDC2190095E648 /* de2_blocked.c in Sources */,
836F6F3018BDC2190095E648 /* nds_procyon_decoder.c in Sources */,
8349A8E81FE6253900E26435 /* blocked_dec.c in Sources */,
831BA6181EAC61A500CF89B0 /* adx.c in Sources */,
836F6F5A18BDC2190095E648 /* vs_blocked.c in Sources */,
836F6FB118BDC2190095E648 /* ngc_ffcc_str.c in Sources */,
@@ -1937,6 +2017,7 @@
836F6F4918BDC2190095E648 /* ims_block.c in Sources */,
836F6F7518BDC2190095E648 /* bnsf.c in Sources */,
836F704318BDC2190095E648 /* wpd.c in Sources */,
8349A9081FE6258200E26435 /* ezw.c in Sources */,
836F6FE118BDC2190095E648 /* ps2_jstm.c in Sources */,
836F6FD918BDC2190095E648 /* ps2_gcm.c in Sources */,
836F6F8E18BDC2190095E648 /* halpst.c in Sources */,
@@ -1959,7 +2040,6 @@
836F700718BDC2190095E648 /* ps2_vgv.c in Sources */,
836F704F18BDC2190095E648 /* xwb.c in Sources */,
8350270D1ED119D200C25929 /* ps3_mta2.c in Sources */,
836F6FC518BDC2190095E648 /* pc_sob.c in Sources */,
836F6FE918BDC2190095E648 /* ps2_mihb.c in Sources */,
836F6FA918BDC2190095E648 /* ngc_adpdtk.c in Sources */,
836F6FDC18BDC2190095E648 /* ps2_iab.c in Sources */,
@@ -1983,6 +2063,7 @@
836F6F2E18BDC2190095E648 /* msadpcm_decoder.c in Sources */,
836F6F9218BDC2190095E648 /* ish_isd.c in Sources */,
836F6F2A18BDC2190095E648 /* lsf_decoder.c in Sources */,
8349A9151FE6258200E26435 /* ps2_xa2_rrp.c in Sources */,
836F703518BDC2190095E648 /* svs.c in Sources */,
836F6FA318BDC2190095E648 /* naomi_spsd.c in Sources */,
836F6F9D18BDC2190095E648 /* msvp.c in Sources */,
@@ -1990,7 +2071,6 @@
836F705018BDC2190095E648 /* ydsp.c in Sources */,
836F702718BDC2190095E648 /* sat_baka.c in Sources */,
83345A4A1F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c in Sources */,
836F6F8C18BDC2190095E648 /* gh3_bar.c in Sources */,
836F704B18BDC2190095E648 /* xbox_xmu.c in Sources */,
832389501D2246C300482226 /* hca.c in Sources */,
836F701B18BDC2190095E648 /* psx_gms.c in Sources */,


+ 33
- 7
Frameworks/vgmstream/vgmstream/src/coding/coding.h View File

@@ -18,11 +18,10 @@ void g72x_init_state(struct g72x_state *state_ptr);
void decode_nds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
void decode_dat4_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
void decode_xbox_ima(VGMSTREAM * vgmstream,VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel);
void decode_xbox_ima_int(VGMSTREAM * vgmstream,VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel);
void decode_dvi_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
void decode_eacs_ima(VGMSTREAM * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
void decode_xbox_ima_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel);
void decode_snds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
void decode_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
void decode_standard_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo, int is_high_first);
void decode_3ds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
void decode_rad_ima(VGMSTREAM * vgmstream,VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel);
void decode_rad_ima_mono(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
void decode_apple_ima4(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
@@ -32,12 +31,14 @@ void decode_fsb_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * o
void decode_wwise_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
void decode_ref_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel);
void decode_awc_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
void decode_ubi_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
size_t ms_ima_bytes_to_samples(size_t bytes, int block_align, int channels);
size_t ima_bytes_to_samples(size_t bytes, int channels);
size_t ubi_ima_bytes_to_samples(size_t bytes, int channels, STREAMFILE *streamFile, off_t offset);

/* ngc_dsp_decoder */
void decode_ngc_dsp(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
void decode_ngc_dsp_mem(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, uint8_t * mem);
void decode_ngc_dsp_subint(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int interleave);
size_t dsp_bytes_to_samples(size_t bytes, int channels);
int32_t dsp_nibbles_to_samples(int32_t nibbles);
void dsp_read_coefs_be(VGMSTREAM * vgmstream, STREAMFILE *streamFile, off_t offset, off_t spacing);
@@ -78,7 +79,8 @@ size_t ps_bytes_to_samples(size_t bytes, int channels);

/* xa_decoder */
void decode_xa(VGMSTREAM * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
void init_get_high_nibble(VGMSTREAM * vgmstream);
void xa_init_get_high_nibble(VGMSTREAM * vgmstream);
size_t xa_bytes_to_samples(size_t bytes, int channels, int is_blocked);

/* ea_xa_decoder */
void decode_ea_xa(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
@@ -133,6 +135,14 @@ void decode_mta2(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing,
/* mc3_decoder */
void decode_mc3(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);

/* ea_mt_decoder*/
ea_mt_codec_data *init_ea_mt(int channel_count, int type);
void decode_ea_mt(VGMSTREAM * vgmstream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
void reset_ea_mt(VGMSTREAM * vgmstream);
void flush_ea_mt(VGMSTREAM *vgmstream);
void seek_ea_mt(VGMSTREAM * vgmstream, int32_t num_sample);
void free_ea_mt(ea_mt_codec_data *data);

/* hca_decoder */
void decode_hca(hca_codec_data * data, sample * outbuf, int32_t samples_to_do, int channels);
void reset_hca(VGMSTREAM *vgmstream);
@@ -167,11 +177,11 @@ void free_mpeg(mpeg_codec_data *data);
void flush_mpeg(mpeg_codec_data * data);

long mpeg_bytes_to_samples(long bytes, const mpeg_codec_data *data);
void mpeg_set_error_logging(mpeg_codec_data * data, int enable);
#endif

#ifdef VGM_USE_G7221
/* g7221_decoder */
g7221_codec_data *init_g7221(int channel_count, int frame_size);
void decode_g7221(VGMSTREAM *vgmstream, sample * outbuf, int channelspacing, int32_t samples_to_do, int channel);
void reset_g7221(VGMSTREAM *vgmstream);
void free_g7221(VGMSTREAM *vgmstream);
@@ -179,6 +189,7 @@ void free_g7221(VGMSTREAM *vgmstream);

#ifdef VGM_USE_G719
/* g719_decoder */
g719_codec_data *init_g719(int channel_count, int frame_size);
void decode_g719(VGMSTREAM *vgmstream, sample * outbuf, int channelspacing, int32_t samples_to_do, int channel);
void reset_g719(VGMSTREAM *vgmstream);
void free_g719(VGMSTREAM *vgmstream);
@@ -265,4 +276,19 @@ void xma2_parse_xma2_chunk(STREAMFILE *streamFile, off_t chunk_offset, int * cha
size_t atrac3_bytes_to_samples(size_t bytes, int full_block_align);
size_t atrac3plus_bytes_to_samples(size_t bytes, int full_block_align);



/* An internal struct to pass around and simulate a bitstream. */
typedef enum { BITSTREAM_MSF, BITSTREAM_VORBIS } vgm_bitstream_t;
typedef struct {
uint8_t * buf; /* buffer to read/write*/
size_t bufsize; /* max size of the buffer */
off_t b_off; /* current offset in bits inside the buffer */
off_t info_offset; /* for logging */
vgm_bitstream_t mode; /* read/write modes */
} vgm_bitstream;

int r_bits(vgm_bitstream * ib, int num_bits, uint32_t * value);
int w_bits(vgm_bitstream * ob, int num_bits, uint32_t value);

#endif /*_CODING_H*/

+ 146
- 0
Frameworks/vgmstream/vgmstream/src/coding/coding_utils.c View File

@@ -835,3 +835,149 @@ size_t atrac3plus_bytes_to_samples(size_t bytes, int full_block_align) {
* so (full_block_align / channels) DOESN'T give the size of a single channel (common in ATRAC3plus) */
return (bytes / full_block_align) * 2048;
}


/* ******************************************** */
/* BITSTREAM */
/* ******************************************** */


/* Read bits (max 32) from buf and update the bit offset. Vorbis packs values in LSB order and byte by byte.
* (ex. from 2 bytes 00100111 00000001 we can could read 4b=0111 and 6b=010010, 6b=remainder (second value is split into the 2nd byte) */
static int r_bits_vorbis(vgm_bitstream * ib, int num_bits, uint32_t * value) {
off_t off, pos;
int i, bit_buf, bit_val;
if (num_bits == 0) return 1;
if (num_bits > 32 || num_bits < 0 || ib->b_off + num_bits > ib->bufsize*8) goto fail;

*value = 0; /* set all bits to 0 */
off = ib->b_off / 8; /* byte offset */
pos = ib->b_off % 8; /* bit sub-offset */
for (i = 0; i < num_bits; i++) {
bit_buf = (1U << pos) & 0xFF; /* bit check for buf */
bit_val = (1U << i); /* bit to set in value */

if (ib->buf[off] & bit_buf) /* is bit in buf set? */
*value |= bit_val; /* set bit */

pos++; /* new byte starts */
if (pos%8 == 0) {
pos = 0;
off++;
}
}

ib->b_off += num_bits;
return 1;
fail:
return 0;
}

/* Write bits (max 32) to buf and update the bit offset. Vorbis packs values in LSB order and byte by byte.
* (ex. writing 1101011010 from b_off 2 we get 01101011 00001101 (value split, and 11 in the first byte skipped)*/
static int w_bits_vorbis(vgm_bitstream * ob, int num_bits, uint32_t value) {
off_t off, pos;
int i, bit_val, bit_buf;
if (num_bits == 0) return 1;
if (num_bits > 32 || num_bits < 0 || ob->b_off + num_bits > ob->bufsize*8) goto fail;


off = ob->b_off / 8; /* byte offset */
pos = ob->b_off % 8; /* bit sub-offset */
for (i = 0; i < num_bits; i++) {
bit_val = (1U << i); /* bit check for value */
bit_buf = (1U << pos) & 0xFF; /* bit to set in buf */

if (value & bit_val) /* is bit in val set? */
ob->buf[off] |= bit_buf; /* set bit */
else
ob->buf[off] &= ~bit_buf; /* unset bit */

pos++; /* new byte starts */
if (pos%8 == 0) {
pos = 0;
off++;
}
}

ob->b_off += num_bits;
return 1;
fail:
return 0;
}


/* Read bits (max 32) from buf and update the bit offset. Order is BE (MSF). */
static int r_bits_msf(vgm_bitstream * ib, int num_bits, uint32_t * value) {
off_t off, pos;
int i, bit_buf, bit_val;
if (num_bits == 0) return 1;
if (num_bits > 32 || num_bits < 0 || ib->b_off + num_bits > ib->bufsize*8) goto fail;

*value = 0; /* set all bits to 0 */
off = ib->b_off / 8; /* byte offset */
pos = ib->b_off % 8; /* bit sub-offset */
for (i = 0; i < num_bits; i++) {
bit_buf = (1U << (8-1-pos)) & 0xFF; /* bit check for buf */
bit_val = (1U << (num_bits-1-i)); /* bit to set in value */

if (ib->buf[off] & bit_buf) /* is bit in buf set? */
*value |= bit_val; /* set bit */

pos++;
if (pos%8 == 0) { /* new byte starts */
pos = 0;
off++;
}
}

ib->b_off += num_bits;
return 1;
fail:
return 0;
}

/* Write bits (max 32) to buf and update the bit offset. Order is BE (MSF). */
static int w_bits_msf(vgm_bitstream * ob, int num_bits, uint32_t value) {
off_t off, pos;
int i, bit_val, bit_buf;
if (num_bits == 0) return 1;
if (num_bits > 32 || num_bits < 0 || ob->b_off + num_bits > ob->bufsize*8) goto fail;


off = ob->b_off / 8; /* byte offset */
pos = ob->b_off % 8; /* bit sub-offset */
for (i = 0; i < num_bits; i++) {
bit_val = (1U << (num_bits-1-i)); /* bit check for value */
bit_buf = (1U << (8-1-pos)) & 0xFF; /* bit to set in buf */

if (value & bit_val) /* is bit in val set? */
ob->buf[off] |= bit_buf; /* set bit */
else
ob->buf[off] &= ~bit_buf; /* unset bit */

pos++;
if (pos%8 == 0) { /* new byte starts */
pos = 0;
off++;
}
}

ob->b_off += num_bits;
return 1;
fail:
return 0;
}

int r_bits(vgm_bitstream * ib, int num_bits, uint32_t * value) {
if (ib->mode == BITSTREAM_VORBIS)
return r_bits_vorbis(ib,num_bits,value);
else
return r_bits_msf(ib,num_bits,value);
}
int w_bits(vgm_bitstream * ob, int num_bits, uint32_t value) {
if (ob->mode == BITSTREAM_VORBIS)
return w_bits_vorbis(ob,num_bits,value);
else
return w_bits_msf(ob,num_bits,value);
}

+ 577
- 0
Frameworks/vgmstream/vgmstream/src/coding/ea_mt_decoder.c View File

@@ -0,0 +1,577 @@
#include "coding.h"
/* Decodes EA MicroTalk (speech codec) using a copied utkencode lib.
* EA separates MT10:1 and MT5:1 (bigger frames), but apparently are the same
* with different encoding parameters. Later revisions may have PCM blocks (rare).
*
* Decoder by Andrew D'Addesio: https://github.com/daddesio/utkencode
* Info: http://wiki.niotso.org/UTK
*
* The following tries to follow the original code as close as possible, with minimal changes for vgmstream
*/
/* ************************************************************************************************* */
#define UTK_BUFFER_SIZE 0x4000
//#define UTK_MAKE_U32(a,b,c,d) ((a)|((b)<<8)|((c)<<16)|((d)<<24))
#define UTK_ROUND(x) ((x) >= 0.0f ? ((x)+0.5f) : ((x)-0.5f))
#define UTK_MIN(x,y) ((x)<(y)?(x):(y))
#define UTK_MAX(x,y) ((x)>(y)?(x):(y))
#define UTK_CLAMP(x,min,max) UTK_MIN(UTK_MAX(x,min),max)
/* Note: This struct assumes a member alignment of 4 bytes.
** This matters when pitch_lag > 216 on the first subframe of any given frame. */
typedef struct UTKContext {
uint8_t buffer[UTK_BUFFER_SIZE]; //vgmstream extra
STREAMFILE * streamfile; //vgmstream extra
off_t offset; //vgmstream extra
int samples_filled; //vgmstream extra
//FILE *fp; //vgmstream extra
const uint8_t *ptr, *end;
int parsed_header;
unsigned int bits_value;
int bits_count;
int reduced_bw;
int multipulse_thresh;
float fixed_gains[64];
float rc[12];
float synth_history[12];
float adapt_cb[324];
float decompressed_frame[432];
} UTKContext;
enum {
MDL_NORMAL = 0,
MDL_LARGEPULSE = 1
};
static const float utk_rc_table[64] = {
0.0f,
-.99677598476409912109375f, -.99032700061798095703125f, -.983879029750823974609375f, -.977430999279022216796875f,
-.970982015132904052734375f, -.964533984661102294921875f, -.958085000514984130859375f, -.9516370296478271484375f,
-.930754005908966064453125f, -.904959976673126220703125f, -.879167020320892333984375f, -.853372991085052490234375f,
-.827579021453857421875f, -.801786005496978759765625f, -.775991976261138916015625f, -.75019800662994384765625f,
-.724404990673065185546875f, -.6986110210418701171875f, -.6706349849700927734375f, -.61904799938201904296875f,
-.567460000514984130859375f, -.515873014926910400390625f, -.4642859995365142822265625f, -.4126980006694793701171875f,
-.361110985279083251953125f, -.309523999691009521484375f, -.257937014102935791015625f, -.20634900033473968505859375f,
-.1547619998455047607421875f, -.10317499935626983642578125f, -.05158700048923492431640625f,
0.0f,
+.05158700048923492431640625f, +.10317499935626983642578125f, +.1547619998455047607421875f, +.20634900033473968505859375f,
+.257937014102935791015625f, +.309523999691009521484375f, +.361110985279083251953125f, +.4126980006694793701171875f,
+.4642859995365142822265625f, +.515873014926910400390625f, +.567460000514984130859375f, +.61904799938201904296875f,
+.6706349849700927734375f, +.6986110210418701171875f, +.724404990673065185546875f, +.75019800662994384765625f,
+.775991976261138916015625f, +.801786005496978759765625f, +.827579021453857421875f, +.853372991085052490234375f,
+.879167020320892333984375f, +.904959976673126220703125f, +.930754005908966064453125f, +.9516370296478271484375f,
+.958085000514984130859375f, +.964533984661102294921875f, +.970982015132904052734375f, +.977430999279022216796875f,
+.983879029750823974609375f, +.99032700061798095703125f, +.99677598476409912109375
};
static const uint8_t utk_codebooks[2][256] = {
{ /* normal model */
4, 6, 5, 9, 4, 6, 5, 13, 4, 6, 5, 10, 4, 6, 5, 17,
4, 6, 5, 9, 4, 6, 5, 14, 4, 6, 5, 10, 4, 6, 5, 21,
4, 6, 5, 9, 4, 6, 5, 13, 4, 6, 5, 10, 4, 6, 5, 18,
4, 6, 5, 9, 4, 6, 5, 14, 4, 6, 5, 10, 4, 6, 5, 25,
4, 6, 5, 9, 4, 6, 5, 13, 4, 6, 5, 10, 4, 6, 5, 17,
4, 6, 5, 9, 4, 6, 5, 14, 4, 6, 5, 10, 4, 6, 5, 22,
4, 6, 5, 9, 4, 6, 5, 13, 4, 6, 5, 10, 4, 6, 5, 18,
4, 6, 5, 9, 4, 6, 5, 14, 4, 6, 5, 10, 4, 6, 5, 0,
4, 6, 5, 9, 4, 6, 5, 13, 4, 6, 5, 10, 4, 6, 5, 17,
4, 6, 5, 9, 4, 6, 5, 14, 4, 6, 5, 10, 4, 6, 5, 21,
4, 6, 5, 9, 4, 6, 5, 13, 4, 6, 5, 10, 4, 6, 5, 18,
4, 6, 5, 9, 4, 6, 5, 14, 4, 6, 5, 10, 4, 6, 5, 26,
4, 6, 5, 9, 4, 6, 5, 13, 4, 6, 5, 10, 4, 6, 5, 17,
4, 6, 5, 9, 4, 6, 5, 14, 4, 6, 5, 10, 4, 6, 5, 22,
4, 6, 5, 9, 4, 6, 5, 13, 4, 6, 5, 10, 4, 6, 5, 18,
4, 6, 5, 9, 4, 6, 5, 14, 4, 6, 5, 10, 4, 6, 5, 2
}, { /* large-pulse model */
4, 11, 7, 15, 4, 12, 8, 19, 4, 11, 7, 16, 4, 12, 8, 23,
4, 11, 7, 15, 4, 12, 8, 20, 4, 11, 7, 16, 4, 12, 8, 27,
4, 11, 7, 15, 4, 12, 8, 19, 4, 11, 7, 16, 4, 12, 8, 24,
4, 11, 7, 15, 4, 12, 8, 20, 4, 11, 7, 16, 4, 12, 8, 1,
4, 11, 7, 15, 4, 12, 8, 19, 4, 11, 7, 16, 4, 12, 8, 23,
4, 11, 7, 15, 4, 12, 8, 20, 4, 11, 7, 16, 4, 12, 8, 28,
4, 11, 7, 15, 4, 12, 8, 19, 4, 11, 7, 16, 4, 12, 8, 24,
4, 11, 7, 15, 4, 12, 8, 20, 4, 11, 7, 16, 4, 12, 8, 3,
4, 11, 7, 15, 4, 12, 8, 19, 4, 11, 7, 16, 4, 12, 8, 23,
4, 11, 7, 15, 4, 12, 8, 20, 4, 11, 7, 16, 4, 12, 8, 27,
4, 11, 7, 15, 4, 12, 8, 19, 4, 11, 7, 16, 4, 12, 8, 24,
4, 11, 7, 15, 4, 12, 8, 20, 4, 11, 7, 16, 4, 12, 8, 1,
4, 11, 7, 15, 4, 12, 8, 19, 4, 11, 7, 16, 4, 12, 8, 23,
4, 11, 7, 15, 4, 12, 8, 20, 4, 11, 7, 16, 4, 12, 8, 28,
4, 11, 7, 15, 4, 12, 8, 19, 4, 11, 7, 16, 4, 12, 8, 24,
4, 11, 7, 15, 4, 12, 8, 20, 4, 11, 7, 16, 4, 12, 8, 3
}
};
static const struct {
int next_model;
int code_size;
float pulse_value;
} utk_commands[29] = {
{MDL_LARGEPULSE, 8, 0.0f},
{MDL_LARGEPULSE, 7, 0.0f},
{MDL_NORMAL, 8, 0.0f},
{MDL_NORMAL, 7, 0.0f},
{MDL_NORMAL, 2, 0.0f},
{MDL_NORMAL, 2, -1.0f},
{MDL_NORMAL, 2, +1.0f},
{MDL_NORMAL, 3, -1.0f},
{MDL_NORMAL, 3, +1.0f},
{MDL_LARGEPULSE, 4, -2.0f},
{MDL_LARGEPULSE, 4, +2.0f},
{MDL_LARGEPULSE, 3, -2.0f},
{MDL_LARGEPULSE, 3, +2.0f},
{MDL_LARGEPULSE, 5, -3.0f},
{MDL_LARGEPULSE, 5, +3.0f},
{MDL_LARGEPULSE, 4, -3.0f},
{MDL_LARGEPULSE, 4, +3.0f},
{MDL_LARGEPULSE, 6, -4.0f},
{MDL_LARGEPULSE, 6, +4.0f},
{MDL_LARGEPULSE, 5, -4.0f},
{MDL_LARGEPULSE, 5, +4.0f},
{MDL_LARGEPULSE, 7, -5.0f},
{MDL_LARGEPULSE, 7, +5.0f},
{MDL_LARGEPULSE, 6, -5.0f},
{MDL_LARGEPULSE, 6, +5.0f},
{MDL_LARGEPULSE, 8, -6.0f},
{MDL_LARGEPULSE, 8, +6.0f},
{MDL_LARGEPULSE, 7, -6.0f},
{MDL_LARGEPULSE, 7, +6.0f}
};
static int utk_read_byte(UTKContext *ctx)
{
if (ctx->ptr < ctx->end)
return *ctx->ptr++;
//vgmstream extra: this reads from FILE if static buffer was exhausted, now from a context buffer and STREAMFILE instead
if (ctx->streamfile) { //if (ctx->fp) {
//static uint8_t buffer[4096];
//size_t bytes_copied = fread(buffer, 1, sizeof(buffer), ctx->fp);
size_t bytes_copied = read_streamfile(ctx->buffer, ctx->offset, sizeof(ctx->buffer), ctx->streamfile);
ctx->offset += bytes_copied;
if (bytes_copied > 0 && bytes_copied <= sizeof(ctx->buffer)) {
ctx->ptr = ctx->buffer;
ctx->end = ctx->buffer + bytes_copied;
return *ctx->ptr++;
}
}
return 0;
}
static int16_t utk_read_i16(UTKContext *ctx)
{
int x = utk_read_byte(ctx);
x = (x << 8) | utk_read_byte(ctx);
return x;
}
static int utk_read_bits(UTKContext *ctx, int count)
{
int ret = ctx->bits_value & ((1 << count) - 1);
ctx->bits_value >>= count;
ctx->bits_count -= count;
if (ctx->bits_count < 8) {
/* read another byte */
ctx->bits_value |= utk_read_byte(ctx) << ctx->bits_count;
ctx->bits_count += 8;
}
return ret;
}
static void utk_parse_header(UTKContext *ctx)
{
int i;
float multiplier;
ctx->reduced_bw = utk_read_bits(ctx, 1);
ctx->multipulse_thresh = 32 - utk_read_bits(ctx, 4);
ctx->fixed_gains[0] = 8.0f * (1 + utk_read_bits(ctx, 4));
multiplier = 1.04f + utk_read_bits(ctx, 6)*0.001f;
for (i = 1; i < 64; i++)
ctx->fixed_gains[i] = ctx->fixed_gains[i-1] * multiplier;
}
static void utk_decode_excitation(UTKContext *ctx, int use_multipulse, float *out, int stride)
{
int i;
if (use_multipulse) {
/* multi-pulse model: n pulses are coded explicitly; the rest are zero */
int model, cmd;
model = 0;
i = 0;
while (i < 108) {
cmd = utk_codebooks[model][ctx->bits_value & 0xff];
model = utk_commands[cmd].next_model;
utk_read_bits(ctx, utk_commands[cmd].code_size);
if (cmd > 3) {
/* insert a pulse with magnitude <= 6.0f */
out[i] = utk_commands[cmd].pulse_value;
i += stride;
} else if (cmd > 1) {
/* insert between 7 and 70 zeros */
int count = 7 + utk_read_bits(ctx, 6);
if (i + count * stride > 108)
count = (108 - i)/stride;
while (count > 0) {
out[i] = 0.0f;
i += stride;
count--;
}
} else {
/* insert a pulse with magnitude >= 7.0f */
int x = 7;
while (utk_read_bits(ctx, 1))
x++;
if (!utk_read_bits(ctx, 1))
x *= -1;
out[i] = (float)x;
i += stride;
}
}
} else {
/* RELP model: entire residual (excitation) signal is coded explicitly */
i = 0;
while (i < 108) {
if (!utk_read_bits(ctx, 1))
out[i] = 0.0f;
else if (!utk_read_bits(ctx, 1))
out[i] = -2.0f;
else
out[i] = 2.0f;
i += stride;
}
}
}
static void rc_to_lpc(const float *rc, float *lpc)
{
int i, j;
float tmp1[12];
float tmp2[12];
for (i = 10; i >= 0; i--)
tmp2[1+i] = rc[i];
tmp2[0] = 1.0f;
for (i = 0; i < 12; i++) {
float x = -tmp2[11] * rc[11];
for (j = 10; j >= 0; j--) {
x -= tmp2[j] * rc[j];
tmp2[j+1] = x * rc[j] + tmp2[j];
}
tmp1[i] = tmp2[0] = x;
for (j = 0; j < i; j++)
x -= tmp1[i-1-j] * lpc[j];
lpc[i] = x;
}
}
static void utk_lp_synthesis_filter(UTKContext *ctx, int offset, int num_blocks)
{
int i, j, k;
float lpc[12];
float *ptr = &ctx->decompressed_frame[offset];
rc_to_lpc(ctx->rc, lpc);
for (i = 0; i < num_blocks; i++) {
for (j = 0; j < 12; j++) {
float x = *ptr;
for (k = 0; k < j; k++)
x += lpc[k] * ctx->synth_history[k-j+12];
for (; k < 12; k++)
x += lpc[k] * ctx->synth_history[k-j];
ctx->synth_history[11-j] = x;
*ptr++ = x;
}
}
}
/*
** Public functions.
*/
static void utk_decode_frame(UTKContext *ctx)
{
int i, j;
int use_multipulse = 0;
float excitation[5+108+5];
float rc_delta[12];
if (!ctx->bits_count) {
ctx->bits_value = utk_read_byte(ctx);
ctx->bits_count = 8;
}
if (!ctx->parsed_header) {
utk_parse_header(ctx);
ctx->parsed_header = 1;
}
memset(&excitation[0], 0, 5*sizeof(float));
memset(&excitation[5+108], 0, 5*sizeof(float));
/* read the reflection coefficients */
for (i = 0; i < 12; i++) {
int idx;
if (i == 0) {
idx = utk_read_bits(ctx, 6);
if (idx < ctx->multipulse_thresh)
use_multipulse = 1;
} else if (i < 4) {
idx = utk_read_bits(ctx, 6);
} else {
idx = 16 + utk_read_bits(ctx, 5);
}
rc_delta[i] = (utk_rc_table[idx] - ctx->rc[i])*0.25f;
}
/* decode four subframes */
for (i = 0; i < 4; i++) {
int pitch_lag = utk_read_bits(ctx, 8);
float pitch_gain = (float)utk_read_bits(ctx, 4)/15.0f;
float fixed_gain = ctx->fixed_gains[utk_read_bits(ctx, 6)];
if (!ctx->reduced_bw) {
utk_decode_excitation(ctx, use_multipulse, &excitation[5], 1);
} else {
/* residual (excitation) signal is encoded at reduced bandwidth */
int align = utk_read_bits(ctx, 1);
int zero = utk_read_bits(ctx, 1);
utk_decode_excitation(ctx, use_multipulse, &excitation[5+align], 2);
if (zero) {
/* fill the remaining samples with zero
** (spectrum is duplicated into high frequencies) */
for (j = 0; j < 54; j++)
excitation[5+(1-align)+2*j] = 0.0f;
} else {
/* interpolate the remaining samples
** (spectrum is low-pass filtered) */
float *ptr = &excitation[5+(1-align)];
for (j = 0; j < 108; j += 2)
ptr[j] = ptr[j-5] * 0.01803267933428287506103515625f
- ptr[j-3] * 0.114591561257839202880859375f
+ ptr[j-1] * 0.597385942935943603515625f
+ ptr[j+1] * 0.597385942935943603515625f
- ptr[j+3] * 0.114591561257839202880859375f
+ ptr[j+5] * 0.01803267933428287506103515625f;
/* scale by 0.5f to give the sinc impulse response unit energy */
fixed_gain *= 0.5f;
}
}
for (j = 0; j < 108; j++)
ctx->decompressed_frame[108*i+j] = fixed_gain * excitation[5+j]
+ pitch_gain * ctx->adapt_cb[108*i+216-pitch_lag+j];
}
for (i = 0; i < 324; i++)
ctx->adapt_cb[i] = ctx->decompressed_frame[108+i];
for (i = 0; i < 4; i++) {
for (j = 0; j < 12; j++)
ctx->rc[j] += rc_delta[j];
utk_lp_synthesis_filter(ctx, 12*i, i < 3 ? 1 : 33);
}
}
static void utk_init(UTKContext *ctx)
{
memset(ctx, 0, sizeof(*ctx));
}
#if 0 //vgmstream extra: see flush_ea_mt
static void utk_set_fp(UTKContext *ctx, FILE *fp)
{
ctx->fp = fp;
/* reset the bit reader */
ctx->bits_count = 0;
}
static void utk_set_ptr(UTKContext *ctx, const uint8_t *ptr, const uint8_t *end)
{
ctx->ptr = ptr;
ctx->end = end;
/* reset the bit reader */
ctx->bits_count = 0;
}
#endif
/*
** MicroTalk Revision 3 decoding function.
*/
static void utk_rev3_decode_frame(UTKContext *ctx)
{
int pcm_data_present = (utk_read_byte(ctx) == 0xee);
int i;
utk_decode_frame(ctx);
/* unread the last 8 bits and reset the bit reader */
ctx->ptr--;
ctx->bits_count = 0;
if (pcm_data_present) {
/* Overwrite n samples at a given offset in the decoded frame with
** raw PCM data. */
int offset = utk_read_i16(ctx);
int count = utk_read_i16(ctx);
/* sx.exe does not do any bounds checking or clamping of these two
** fields (see 004274D1 in sx.exe v3.01.01), which means a specially
** crafted MT5:1 file can crash sx.exe.
** We will throw an error instead. */
if (offset < 0 || offset > 432) {
//fprintf(stderr, "error: invalid PCM offset %d\n", offset);
//exit(EXIT_FAILURE);
return; //vgmstream extra
}
if (count < 0 || count > 432 - offset) {
//fprintf(stderr, "error: invalid PCM count %d\n", count);
//exit(EXIT_FAILURE);
return; //vgmstream extra
}
for (i = 0; i < count; i++)
ctx->decompressed_frame[offset+i] = (float)utk_read_i16(ctx);
}
}
/* ************************************************************************************************* */
ea_mt_codec_data *init_ea_mt(int channel_count, int pcm_blocks) {
ea_mt_codec_data *data = NULL;
int i;
data = calloc(channel_count, sizeof(ea_mt_codec_data));
if (!data) goto fail;
data->pcm_blocks = pcm_blocks;
data->utk_context_size = channel_count;
data->utk_context = calloc(channel_count, sizeof(UTKContext*));
if (!data->utk_context) goto fail;
for (i = 0; i < channel_count; i++) {
data->utk_context[i] = calloc(1, sizeof(UTKContext));
if (!data->utk_context[i]) goto fail;
utk_init(data->utk_context[i]);
}
return data;
fail:
free_ea_mt(data);
return NULL;
}
void decode_ea_mt(VGMSTREAM * vgmstream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
ea_mt_codec_data *data = vgmstream->codec_data;
int i, sample_count = 0, frame_samples;
UTKContext* ctx = data->utk_context[channel];
/* Use the above decoder, which expects pointers to read data. Since EA-MT frames aren't
* byte-aligned, reading new buffer data is decided by the decoder. When decoding starts
* or a SCHl block changes flush_ea_mt must be called to reset the state.
* A bit hacky but would need some restructuring otherwise. */
frame_samples = 432;
first_sample = first_sample % frame_samples;
/* don't decode again if we didn't consume the current frame.
* UTKContext saves the sample buffer, and can't re-decode a frame */
if (!ctx->samples_filled) {
if (data->pcm_blocks)
utk_rev3_decode_frame(ctx);
else
utk_decode_frame(ctx);
ctx->samples_filled = 1;
}
/* copy samples */
for (i = first_sample; i < first_sample+samples_to_do; i++) {
int x = UTK_ROUND(ctx->decompressed_frame[i]);
outbuf[sample_count] = (int16_t)UTK_CLAMP(x, -32768, 32767);
sample_count += channelspacing;
}
if (i == frame_samples)
ctx->samples_filled = 0;
}
static void flush_ea_mt_internal(VGMSTREAM *vgmstream, int is_start) {
ea_mt_codec_data *data = vgmstream->codec_data;
int i;
size_t bytes;
/* the decoder needs to be notified when offsets change */
for (i = 0; i < vgmstream->channels; i++) {
UTKContext *ctx = data->utk_context[i];
ctx->streamfile = vgmstream->ch[i].streamfile;
ctx->offset = is_start ? vgmstream->ch[i].channel_start_offset : vgmstream->ch[i].offset;
ctx->samples_filled = 0;
bytes = read_streamfile(ctx->buffer,ctx->offset,sizeof(ctx->buffer),ctx->streamfile);
ctx->offset += sizeof(ctx->buffer);
ctx->ptr = ctx->buffer;
ctx->end = ctx->buffer + bytes;
ctx->bits_count = 0;
}
}
void flush_ea_mt(VGMSTREAM *vgmstream) {
flush_ea_mt_internal(vgmstream, 0);
}
void reset_ea_mt(VGMSTREAM *vgmstream) {
flush_ea_mt_internal(vgmstream, 1);
}
void seek_ea_mt(VGMSTREAM * vgmstream, int32_t num_sample) {
flush_ea_mt_internal(vgmstream, 1);
//todo discard loop (though this should be adecuate as probably only uses full loops, if at all)
}
void free_ea_mt(ea_mt_codec_data *data) {
int i;
if (!data)
return;
for (i = 0; i < data->utk_context_size; i++) {
free(data->utk_context[i]);
}
free(data->utk_context);
free(data);
}

+ 77
- 86
Frameworks/vgmstream/vgmstream/src/coding/ea_xa_decoder.c View File

@@ -29,59 +29,57 @@ static const int EA_XA_TABLE[20] = {
0, -1, -3, -4
};
/* EA XA v2; like ea_xa_int but with "PCM samples" flag and doesn't add 128 on expand or clamp (pre-adjusted by the encoder?) */
/* EA XA v2 (always mono); like ea_xa_int but with "PCM samples" flag and doesn't add 128 on expand or clamp (pre-adjusted by the encoder?) */
void decode_ea_xa_v2(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel) {
uint8_t frame_info;
int32_t sample_count;
int32_t coef1, coef2;
int i, shift;
off_t channel_offset = stream->channel_start_offset; /* suboffset within frame */
int i, sample_count, shift;
first_sample = first_sample%28;
int pcm_frame_size = 0x01 + 2*0x02 + 28*0x02;
int xa_frame_size = 0x0f;
int frame_samples = 28;
first_sample = first_sample % frame_samples;
/* header */
frame_info = (uint8_t)read_8bit(stream->offset+channel_offset,stream->streamfile);
channel_offset++;
frame_info = read_8bit(stream->offset,stream->streamfile);
if (frame_info == 0xEE) { /* PCM frame (used in later revisions), samples always BE */
stream->adpcm_history1_32 = read_16bitBE(stream->offset+channel_offset+0x00,stream->streamfile);
stream->adpcm_history2_32 = read_16bitBE(stream->offset+channel_offset+0x02,stream->streamfile);
channel_offset += 4;
stream->adpcm_history1_32 = read_16bitBE(stream->offset + 0x01 + 0x00,stream->streamfile);
stream->adpcm_history2_32 = read_16bitBE(stream->offset + 0x01 + 0x02,stream->streamfile);
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
outbuf[sample_count] = read_16bitBE(stream->offset+channel_offset,stream->streamfile);
channel_offset+=2;
outbuf[sample_count] = read_16bitBE(stream->offset + 0x01 + 2*0x02 + i*0x02,stream->streamfile);
}
/* Only increment offset on complete frame */
if (channel_offset-stream->channel_start_offset == (2*28)+5)
stream->channel_start_offset += (2*28)+5;
} else { /* ADPCM frame */
/* only increment offset on complete frame */
if (i == frame_samples)
stream->offset += pcm_frame_size;
}
else { /* ADPCM frame */
coef1 = EA_XA_TABLE[(frame_info >> 4) + 0];
coef2 = EA_XA_TABLE[(frame_info >> 4) + 4];
shift = (frame_info & 0x0F) + 8;
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
uint8_t sample_byte, sample_nibble;
int32_t sample;
off_t byte_offset = (stream->offset + channel_offset + i/2);
int32_t new_sample;
off_t byte_offset = (stream->offset + 0x01 + i/2);
int nibble_shift = (!(i&1)) ? 4 : 0; /* high nibble first */
sample_byte = (uint8_t)read_8bit(byte_offset,stream->streamfile);
sample_nibble = (!(i%2) ? sample_byte >> 4 : sample_byte & 0x0F); /* i=even > high nibble */
sample = (sample_nibble << 28) >> shift; /* sign extend to 32b and shift */
sample = (sample + coef1 * stream->adpcm_history1_32 + coef2 * stream->adpcm_history2_32) >> 8;
sample = clamp16(sample);
sample_nibble = (sample_byte >> nibble_shift) & 0x0F;
new_sample = (sample_nibble << 28) >> shift; /* sign extend to 32b and shift */
new_sample = (new_sample + coef1 * stream->adpcm_history1_32 + coef2 * stream->adpcm_history2_32) >> 8;
new_sample = clamp16(new_sample);
outbuf[sample_count] = sample;
outbuf[sample_count] = new_sample;
stream->adpcm_history2_32 = stream->adpcm_history1_32;
stream->adpcm_history1_32 = sample;
stream->adpcm_history1_32 = new_sample;
}
channel_offset += i/2;
/* Only increment offset on complete frame */
if (channel_offset - stream->channel_start_offset == 0x0F)
stream->channel_start_offset += 0x0F;
/* only increment offset on complete frame */
if (i == frame_samples)
stream->offset += xa_frame_size;
}
}
@@ -90,43 +88,42 @@ void decode_ea_xa(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing
uint8_t frame_info;
int32_t coef1, coef2;
int i, sample_count, shift;
off_t channel_offset = stream->channel_start_offset; /* suboffset within frame */
int hn = (channel==0); /* high nibble marker for stereo subinterleave, ch0/L=high nibble, ch1/R=low nibble */
first_sample = first_sample % 28;
int frame_size = 0x1e;
int frame_samples = 28;
first_sample = first_sample % frame_samples;
/* header (coefs ch0+ch1 + shift ch0+ch1) */
frame_info = read_8bit(stream->offset+channel_offset,stream->streamfile);
channel_offset++;
frame_info = read_8bit(stream->offset+0x00,stream->streamfile);
coef1 = EA_XA_TABLE[(hn ? frame_info >> 4 : frame_info & 0x0F) + 0];
coef2 = EA_XA_TABLE[(hn ? frame_info >> 4 : frame_info & 0x0F) + 4];
shift = (frame_info & 0x0F) + 8;
frame_info = read_8bit(stream->offset+channel_offset,stream->streamfile);
channel_offset++;
frame_info = read_8bit(stream->offset+0x01,stream->streamfile);
shift = (hn ? frame_info >> 4 : frame_info & 0x0F) + 8;
/* samples */
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
uint8_t sample_byte, sample_nibble;
int32_t sample;
off_t byte_offset = (stream->offset + channel_offset + i);
int32_t new_sample;
off_t byte_offset = (stream->offset + 0x02 + i);
int nibble_shift = (hn ? 4 : 0); /* high nibble first */
sample_byte = (uint8_t)read_8bit(byte_offset,stream->streamfile);
sample_nibble = (hn ? sample_byte >> 4 : sample_byte & 0x0F);
sample = (sample_nibble << 28) >> shift; /* sign extend to 32b and shift */
sample = (sample + coef1 * stream->adpcm_history1_32 + coef2 * stream->adpcm_history2_32 + 128) >> 8;
sample = clamp16(sample);
sample_nibble = (sample_byte >> nibble_shift) & 0x0F;
new_sample = (sample_nibble << 28) >> shift; /* sign extend to 32b and shift */
new_sample = (new_sample + coef1 * stream->adpcm_history1_32 + coef2 * stream->adpcm_history2_32 + 128) >> 8;
new_sample = clamp16(new_sample);
outbuf[sample_count] = sample;
outbuf[sample_count] = new_sample;
stream->adpcm_history2_32 = stream->adpcm_history1_32;
stream->adpcm_history1_32 = sample;
stream->adpcm_history1_32 = new_sample;
}
channel_offset += i;
/* Only increment offset on complete frame */
if(channel_offset - stream->channel_start_offset == 0x1E)
stream->channel_start_offset += 0x1E;
/* only increment offset on complete frame */
if (i == frame_samples)
stream->offset += frame_size;
}
/* EA-XA v1 mono/interleave */
@@ -134,13 +131,13 @@ void decode_ea_xa_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspa
uint8_t frame_info;
int32_t coef1, coef2;
int i, sample_count, shift;
off_t channel_offset = stream->channel_start_offset; /* suboffset within frame */
first_sample = first_sample % 28;
int frame_size = 0x0f;
int frame_samples = 28;
first_sample = first_sample % frame_samples;
/* header (coefs+shift ch0) */
frame_info = read_8bit(stream->offset+channel_offset,stream->streamfile);
channel_offset++;
frame_info = read_8bit(stream->offset,stream->streamfile);
coef1 = EA_XA_TABLE[(frame_info >> 4) + 0];
coef2 = EA_XA_TABLE[(frame_info >> 4) + 4];
shift = (frame_info & 0x0F) + 8;
@@ -148,39 +145,38 @@ void decode_ea_xa_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspa
/* samples */
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
uint8_t sample_byte, sample_nibble;
int32_t sample;
off_t byte_offset = (stream->offset + channel_offset + i/2);
int32_t new_sample;
off_t byte_offset = (stream->offset + 0x01 + i/2);
int nibble_shift = (!(i&1)) ? 4 : 0; /* high nibble first */
sample_byte = (uint8_t)read_8bit(byte_offset,stream->streamfile);
sample_nibble = (!(i%2) ? sample_byte >> 4 : sample_byte & 0x0F); /* i=even > high nibble */
sample = (sample_nibble << 28) >> shift; /* sign extend to 32b and shift */
sample = (sample + coef1 * stream->adpcm_history1_32 + coef2 * stream->adpcm_history2_32 + 128) >> 8;
sample = clamp16(sample);
sample_nibble = (sample_byte >> nibble_shift) & 0x0F;
new_sample = (sample_nibble << 28) >> shift; /* sign extend to 32b and shift */
new_sample = (new_sample + coef1 * stream->adpcm_history1_32 + coef2 * stream->adpcm_history2_32 + 128) >> 8;
new_sample = clamp16(new_sample);
outbuf[sample_count] = sample;
outbuf[sample_count] = new_sample;
stream->adpcm_history2_32 = stream->adpcm_history1_32;
stream->adpcm_history1_32 = sample;
stream->adpcm_history1_32 = new_sample;
}
channel_offset += i/2;
/* Only increment offset on complete frame */
if(channel_offset - stream->channel_start_offset == 0x0F)
stream->channel_start_offset += 0x0F;
/* only increment offset on complete frame */
if (i == frame_samples)
stream->offset += frame_size;
}
/* Maxis EA-XA v1 (mono+stereo), differing slightly in the header layout in stereo mode */
/* Maxis EA-XA v1 (mono+stereo) with byte-interleave layout in stereo mode */
void decode_maxis_xa(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
uint8_t frame_info;
int32_t coef1, coef2;
int i, sample_count, shift;
off_t channel_offset = stream->channel_start_offset;
int frame_size = channelspacing * 15; /* mono samples have a frame of 15, stereo files have frames of 30 */
first_sample = first_sample % 28;
int frame_size = 0x0f * channelspacing; /* varies in mono/stereo */
int frame_samples = 28;
first_sample = first_sample % frame_samples;
/* header (coefs+shift ch0 + coefs+shift ch1) */
frame_info = read_8bit(channel_offset,stream->streamfile);
channel_offset += channelspacing;
frame_info = read_8bit(stream->offset + channel,stream->streamfile);
coef1 = EA_XA_TABLE[(frame_info >> 4) + 0];
coef2 = EA_XA_TABLE[(frame_info >> 4) + 4];
shift = (frame_info & 0x0F) + 8;
@@ -188,27 +184,22 @@ void decode_maxis_xa(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspac
/* samples */
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
uint8_t sample_byte, sample_nibble;
int32_t sample;
off_t byte_offset = (stream->offset + channel_offset);
int32_t new_sample;
off_t byte_offset = (stream->offset + 0x01*channelspacing + (channelspacing == 2 ? i/2 + channel + (i/2)*0x01 : i/2));
int nibble_shift = (!(i&1)) ? 4 : 0; /* high nibble first */
sample_byte = (uint8_t)read_8bit(byte_offset,stream->streamfile);
sample_nibble = (i&1) ? sample_byte & 0x0F : sample_byte >> 4;
sample = (sample_nibble << 28) >> shift; /* sign extend to 32b and shift */
sample = (sample + coef1 * stream->adpcm_history1_32 + coef2 * stream->adpcm_history2_32 + 128) >> 8;
sample = clamp16(sample);
sample_nibble = (sample_byte >> nibble_shift) & 0x0F;
new_sample = (sample_nibble << 28) >> shift; /* sign extend to 32b and shift */
new_sample = (new_sample + coef1 * stream->adpcm_history1_32 + coef2 * stream->adpcm_history2_32 + 128) >> 8;
new_sample = clamp16(new_sample);
outbuf[sample_count] = sample;
outbuf[sample_count] = new_sample;
stream->adpcm_history2_32 = stream->adpcm_history1_32;
stream->adpcm_history1_32 = sample;
if(i&1)
stream->offset+=channelspacing;
stream->adpcm_history1_32 = new_sample;
}
channel_offset+=i;
/* Only increment offset on complete frame */
if (channel_offset - stream->channel_start_offset == frame_size) {
stream->channel_start_offset += frame_size;
stream->offset=0;
}
/* only increment offset on complete frame */
if (i == frame_samples)
stream->offset += frame_size;
}

+ 9
- 0
Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder.c View File

@@ -98,6 +98,8 @@ static void convert_audio(sample *outbuf, const uint8_t *inbuf, int sampleCount,
* Fortunately seek_frame_generic can use an index to find the correct position. This function reads the
* first frame/packet and sets up index to timestamp 0. This ensures faulty demuxers will seek to 0 correctly.
* Some formats may not seek to 0 even with this, though.
*
* todo: some formats don't work with the current index values
*/
static int init_seek(ffmpeg_codec_data * data) {
int ret, ts_index, found_first = 0;
@@ -220,6 +222,7 @@ static int ffmpeg_read(void *opaque, uint8_t *buf, int buf_size) {
switch(data->config.type) {
case FFMPEG_EA_XMA: ret = ffmpeg_custom_read_eaxma(data, buf, buf_size); break;
case FFMPEG_SWITCH_OPUS: ret = ffmpeg_custom_read_switch_opus(data, buf, buf_size); break;
case FFMPEG_BGW_ATRAC3: ret = ffmpeg_custom_read_bgw_atrac3(data, buf, buf_size); break;
//case FFMPEG_EA_SCHL: ret = ffmpeg_custom_read_ea_schl(data, buf, buf_size); break;
//case FFMPEG_SFH: ret = ffmpeg_custom_read_sfh(data, buf, buf_size); break;
default: ret = ffmpeg_custom_read_standard(data, buf, buf_size); break;
@@ -228,6 +231,7 @@ static int ffmpeg_read(void *opaque, uint8_t *buf, int buf_size) {
//data->real_offset = ; /* must be updated in function */

//;VGM_LOG("AVIO read done: ret=%x, r_off=%"PRIx64", v_off=%"PRIx64"\n", ret + max_to_copy, data->real_offset, data->virtual_offset);fflush(stdout);
//;VGM_LOGB((buf - max_to_copy),ret + max_to_copy,0);
return ret + max_to_copy;
}

@@ -287,6 +291,7 @@ static int64_t ffmpeg_seek(void *opaque, int64_t offset, int whence) {
switch(data->config.type) {
case FFMPEG_EA_XMA: offset = ffmpeg_custom_seek_eaxma(data, offset); break;
case FFMPEG_SWITCH_OPUS: offset = ffmpeg_custom_seek_switch_opus(data, offset); break;
case FFMPEG_BGW_ATRAC3: offset = ffmpeg_custom_seek_bgw_atrac3(data, offset); break;
//case FFMPEG_EA_SCHL: offset = ffmpeg_custom_seek_ea_schl(data, offset); break;
//case FFMPEG_SFH: offset = ffmpeg_custom_seek_sfh(data, offset); break;
default: offset = ffmpeg_custom_seek_standard(data, offset); break;
@@ -304,6 +309,7 @@ static int64_t ffmpeg_size(ffmpeg_codec_data * data) {
switch(data->config.type) {
case FFMPEG_EA_XMA: bytes = ffmpeg_custom_size_eaxma(data); break;
case FFMPEG_SWITCH_OPUS: bytes = ffmpeg_custom_size_switch_opus(data); break;
case FFMPEG_BGW_ATRAC3: bytes = ffmpeg_custom_size_bgw_atrac3(data); break;
//case FFMPEG_EA_SCHL: bytes = ffmpeg_custom_size_ea_schl(data); break;
//case FFMPEG_SFH: bytes = ffmpeg_custom_size_sfh(data); break;
default: bytes = ffmpeg_custom_size_standard(data); break;
@@ -800,6 +806,9 @@ void free_ffmpeg(ffmpeg_codec_data *data) {
close_streamfile(data->streamfile);
data->streamfile = NULL;
}
if (data->config.key) {
free(data->config.key);
}
free(data);
}



+ 3
- 1
Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils.c View File

@@ -16,7 +16,9 @@ int ffmpeg_custom_read_standard(ffmpeg_codec_data *data, uint8_t *buf, int buf_s
}
int64_t ffmpeg_custom_seek_standard(ffmpeg_codec_data *data, int64_t virtual_offset) {
data->real_offset = data->real_start + (virtual_offset - data->header_size);
int64_t seek_virtual_offset = virtual_offset - data->header_size;
data->real_offset = data->real_start + seek_virtual_offset;
return virtual_offset;
}


+ 4
- 0
Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils.h View File

@@ -31,6 +31,10 @@ int ffmpeg_custom_read_switch_opus(ffmpeg_codec_data *data, uint8_t *buf, int bu
int64_t ffmpeg_custom_seek_switch_opus(ffmpeg_codec_data *data, int64_t virtual_offset);
int64_t ffmpeg_custom_size_switch_opus(ffmpeg_codec_data *data);
int ffmpeg_custom_read_bgw_atrac3(ffmpeg_codec_data *data, uint8_t *buf, int buf_size);
int64_t ffmpeg_custom_seek_bgw_atrac3(ffmpeg_codec_data *data, int64_t virtual_offset);
int64_t ffmpeg_custom_size_bgw_atrac3(ffmpeg_codec_data *data);
//int ffmpeg_custom_read_ea_schl(ffmpeg_codec_data *data, uint8_t *buf, int buf_size);
//int64_t ffmpeg_custom_seek_ea_schl(ffmpeg_codec_data *data, int64_t virtual_offset);
//int64_t ffmpeg_custom_size_ea_schl(ffmpeg_codec_data *data);


+ 58
- 0
Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils_bgw_atrac3.c View File

@@ -0,0 +1,58 @@
#if 1
#include "coding.h"
#include "ffmpeg_decoder_utils.h"
#ifdef VGM_USE_FFMPEG
#define BGM_ATRAC3_FRAME_SIZE 0xC0
/**
* Encrypted ATRAC3 used in BGW (Final Fantasy XI PC).
* Info from Moogle Toolbox: https://sourceforge.net/projects/mogbox/
*/
int ffmpeg_custom_read_bgw_atrac3(ffmpeg_codec_data *data, uint8_t *buf, int buf_size) {
int i, ch;
size_t bytes;
size_t block_align = BGM_ATRAC3_FRAME_SIZE * data->config.channels;
/* init key: first frame + modified channel header */
if (data->config.key == NULL) {
data->config.key = malloc(block_align);
if (!data->config.key) return 0;
read_streamfile(data->config.key, data->real_start, block_align, data->streamfile);
for (ch = 0; ch < data->config.channels; ch++) {
uint32_t xor = get_32bitBE(data->config.key + ch*BGM_ATRAC3_FRAME_SIZE);
put_32bitBE(data->config.key + ch*BGM_ATRAC3_FRAME_SIZE, xor ^ 0xA0024E9F);
}
}
/* read normally and unXOR the data */
bytes = read_streamfile(buf, data->real_offset, buf_size, data->streamfile);
for (i = 0; i < bytes; i++) {
int key_pos = (data->real_offset - data->real_start + i) % block_align;
buf[i] = buf[i] ^ data->config.key[key_pos];
}
data->real_offset += bytes;
return bytes;
}
int64_t ffmpeg_custom_seek_bgw_atrac3(ffmpeg_codec_data *data, int64_t virtual_offset) {
int64_t seek_virtual_offset = virtual_offset - data->header_size;
data->real_offset = data->real_start + seek_virtual_offset;
return virtual_offset;
}
int64_t ffmpeg_custom_size_bgw_atrac3(ffmpeg_codec_data *data) {
return data->real_size + data->header_size;
}
#endif
#endif

+ 8
- 6
Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils_ea_xma.c View File

@@ -3,7 +3,7 @@
#ifdef VGM_USE_FFMPEG
#define EAXMA_XMA_MAX_PACKETS_PER_SNS_BLOCK 3 /* only seen up to 3 (Dante's Inferno) */
#define EAXMA_XMA_MAX_PACKETS_PER_SNS_BLOCK 4 /* normally max 3 (Dante's Inferno), ~14 (1 stream) in Burnout Paradise */
#define EAXMA_XMA_MAX_STREAMS_PER_SNS_BLOCK 4 /* XMA2 max is 8ch = 4 * 2ch */
#define EAXMA_XMA_PACKET_SIZE 0x800
#define EAXMA_XMA_BUFFER_SIZE (EAXMA_XMA_MAX_PACKETS_PER_SNS_BLOCK * EAXMA_XMA_MAX_STREAMS_PER_SNS_BLOCK * EAXMA_XMA_PACKET_SIZE)
@@ -48,7 +48,8 @@ int ffmpeg_custom_read_eaxma(ffmpeg_codec_data *data, uint8_t *buf, int buf_size
if (max_packets == 0) goto fail;
if (max_packets * num_streams * EAXMA_XMA_PACKET_SIZE > EAXMA_XMA_BUFFER_SIZE) {
VGM_LOG("EA XMA: block too big at %lx\n", (off_t)real_offset);
VGM_LOG("EA XMA: block too big (%i * %i * 0x%x = 0x%x vs max 0x%x) at %lx\n",
max_packets,num_streams,EAXMA_XMA_PACKET_SIZE, max_packets*num_streams*EAXMA_XMA_PACKET_SIZE, EAXMA_XMA_BUFFER_SIZE,(off_t)real_offset);
goto fail;
}
@@ -134,12 +135,13 @@ fail:
int64_t ffmpeg_custom_seek_eaxma(ffmpeg_codec_data *data, int64_t virtual_offset) {
int64_t real_offset, virtual_base;
int64_t current_virtual_offset = data->virtual_offset;
int64_t current_virtual_offset = data->virtual_offset - data->header_size;
int64_t seek_virtual_offset = virtual_offset - data->header_size;
/* Find SNS block start closest to offset. ie. virtual_offset 0x1A10 could mean SNS blocks
* of 0x456+0x820 padded to 0x800+0x1000 (base) + 0x210 (extra for reads), thus real_offset = 0xC76 */
if (virtual_offset > current_virtual_offset) { /* seek after current: start from current block */
if (seek_virtual_offset > current_virtual_offset) { /* seek after current: start from current block */
real_offset = data->real_offset;
virtual_base = data->virtual_base;
}
@@ -150,7 +152,7 @@ int64_t ffmpeg_custom_seek_eaxma(ffmpeg_codec_data *data, int64_t virtual_offset
/* find target block */
while (virtual_base < virtual_offset) {
while (virtual_base < seek_virtual_offset) {
size_t data_size, extra_size = 0;
size_t block_size = read_32bitBE(real_offset, data->streamfile);
@@ -159,7 +161,7 @@ int64_t ffmpeg_custom_seek_eaxma(ffmpeg_codec_data *data, int64_t virtual_offset
extra_size = EAXMA_XMA_PACKET_SIZE - (data_size % EAXMA_XMA_PACKET_SIZE);
/* stop if virtual_offset lands inside current block */
if (data_size + extra_size > virtual_offset)
if (data_size + extra_size > seek_virtual_offset)
break;
real_offset += (block_size & 0x00FFFFFF);


+ 6
- 5
Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils_switch_opus.c View File

@@ -101,10 +101,11 @@ int ffmpeg_custom_read_switch_opus(ffmpeg_codec_data *data, uint8_t *buf, int bu
int64_t ffmpeg_custom_seek_switch_opus(ffmpeg_codec_data *data, int64_t virtual_offset) {
int64_t real_offset, virtual_base;
int64_t current_virtual_offset = data->virtual_offset;
int64_t seek_virtual_offset = virtual_offset - data->header_size;
/* find Wwise block start closest to offset; a 0x1E8 block expands to 0x1D + 0x1E0 (oggs + data) */
if (virtual_offset > current_virtual_offset) { /* seek after current: start from current block */
if (seek_virtual_offset > current_virtual_offset) { /* seek after current: start from current block */
real_offset = data->real_offset;
virtual_base = data->virtual_base;
}
@@ -117,14 +118,14 @@ int64_t ffmpeg_custom_seek_switch_opus(ffmpeg_codec_data *data, int64_t virtual_
/* find target block */
while (virtual_base < virtual_offset) {
while (virtual_base < seek_virtual_offset) {
size_t extra_size;
size_t data_size = read_32bitBE(real_offset, data->streamfile);
extra_size = 0x1b + (int)(data_size / 0xFF + 1); /* OggS page: base size + lacing values */
/* stop if virtual_offset lands inside current block */
if (data_size + extra_size > virtual_offset)
if (data_size + extra_size > seek_virtual_offset)
break;
real_offset += 0x04 + 0x04 + data_size;
@@ -332,8 +333,8 @@ fail:
static size_t make_opus_comment(uint8_t * buf, int buf_size) {
size_t comment_size;
int vendor_string_length, user_comment_0_length;
char * vendor_string = "vgmstream";
char * user_comment_0_string = "vgmstream Opus converter";
const char * vendor_string = "vgmstream";
const char * user_comment_0_string = "vgmstream Opus converter";
vendor_string_length = strlen(vendor_string);
user_comment_0_length = strlen(user_comment_0_string);


+ 25
- 0
Frameworks/vgmstream/vgmstream/src/coding/g719_decoder.c View File

@@ -4,6 +4,31 @@
#ifdef VGM_USE_G719
#include "../stack_alloc.h"

g719_codec_data *init_g719(int channel_count, int frame_size) {
int i;
g719_codec_data *data = NULL;

data = calloc(channel_count, sizeof(g719_codec_data)); /* one decoder per channel */
if (!data) goto fail;

for (i = 0; i < channel_count; i++) {
data[i].handle = g719_init(frame_size); /* Siren 22 == 22khz bandwidth */
if (!data[i].handle) goto fail;