Browse Source

Updated VGMStream to r1050-1001-gebdfed99.

master
Christopher Snowhill 2 years ago
parent
commit
56ed9c3429
56 changed files with 3099 additions and 1344 deletions
  1. +150
    -118
      Frameworks/vgmstream/vgmstream.xcodeproj/project.pbxproj
  2. +3
    -1
      Frameworks/vgmstream/vgmstream/src/coding/atrac9_decoder.c
  3. +0
    -6
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder.c
  4. +0
    -4
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils.h
  5. +0
    -58
      Frameworks/vgmstream/vgmstream/src/coding/ffmpeg_decoder_utils_bgw_atrac3.c
  6. +10
    -10
      Frameworks/vgmstream/vgmstream/src/coding/vorbis_custom_utils_wwise.c
  7. +27
    -14
      Frameworks/vgmstream/vgmstream/src/formats.c
  8. +3
    -0
      Frameworks/vgmstream/vgmstream/src/layout/blocked.c
  9. +5
    -1
      Frameworks/vgmstream/vgmstream/src/layout/blocked_ea_schl.c
  10. +19
    -0
      Frameworks/vgmstream/vgmstream/src/layout/blocked_xvag.c
  11. +1
    -0
      Frameworks/vgmstream/vgmstream/src/layout/layout.h
  12. +0
    -4
      Frameworks/vgmstream/vgmstream/src/meta/aax_streamfile.h
  13. +1
    -1
      Frameworks/vgmstream/vgmstream/src/meta/adx.c
  14. +3
    -0
      Frameworks/vgmstream/vgmstream/src/meta/adx_keys.h
  15. +1
    -1
      Frameworks/vgmstream/vgmstream/src/meta/ahx.c
  16. +0
    -4
      Frameworks/vgmstream/vgmstream/src/meta/aix_streamfile.h
  17. +76
    -0
      Frameworks/vgmstream/vgmstream/src/meta/atsl3.c
  18. +109
    -0
      Frameworks/vgmstream/vgmstream/src/meta/atx.c
  19. +10
    -9
      Frameworks/vgmstream/vgmstream/src/meta/awc.c
  20. +0
    -13
      Frameworks/vgmstream/vgmstream/src/meta/bar_streamfile.h
  21. +79
    -24
      Frameworks/vgmstream/vgmstream/src/meta/bgw.c
  22. +23
    -18
      Frameworks/vgmstream/vgmstream/src/meta/bik.c
  23. +12
    -7
      Frameworks/vgmstream/vgmstream/src/meta/flx.c
  24. +191
    -163
      Frameworks/vgmstream/vgmstream/src/meta/fsb.c
  25. +10
    -9
      Frameworks/vgmstream/vgmstream/src/meta/fsb5.c
  26. +158
    -0
      Frameworks/vgmstream/vgmstream/src/meta/fsb_encrypted.c
  27. +126
    -0
      Frameworks/vgmstream/vgmstream/src/meta/fsb_keys.h
  28. +8
    -2
      Frameworks/vgmstream/vgmstream/src/meta/gtd.c
  29. +1
    -1
      Frameworks/vgmstream/vgmstream/src/meta/hca.c
  30. +6
    -0
      Frameworks/vgmstream/vgmstream/src/meta/hca_keys.h
  31. +79
    -0
      Frameworks/vgmstream/vgmstream/src/meta/kma9.c
  32. +16
    -3
      Frameworks/vgmstream/vgmstream/src/meta/ktss.c
  33. +19
    -3
      Frameworks/vgmstream/vgmstream/src/meta/meta.h
  34. +24
    -8
      Frameworks/vgmstream/vgmstream/src/meta/nsw_opus.c
  35. +453
    -0
      Frameworks/vgmstream/vgmstream/src/meta/ogg_vorbis.c
  36. +0
    -461
      Frameworks/vgmstream/vgmstream/src/meta/ogg_vorbis_file.c
  37. +15
    -14
      Frameworks/vgmstream/vgmstream/src/meta/ps2_rxws.c
  38. +19
    -12
      Frameworks/vgmstream/vgmstream/src/meta/psx_cdxa.c
  39. +144
    -21
      Frameworks/vgmstream/vgmstream/src/meta/riff.c
  40. +21
    -19
      Frameworks/vgmstream/vgmstream/src/meta/rws.c
  41. +20
    -20
      Frameworks/vgmstream/vgmstream/src/meta/sab.c
  42. +17
    -18
      Frameworks/vgmstream/vgmstream/src/meta/sgxd.c
  43. +82
    -0
      Frameworks/vgmstream/vgmstream/src/meta/sps_n1.c
  44. +152
    -128
      Frameworks/vgmstream/vgmstream/src/meta/sqex_scd.c
  45. +273
    -0
      Frameworks/vgmstream/vgmstream/src/meta/sqex_sead.c
  46. +20
    -13
      Frameworks/vgmstream/vgmstream/src/meta/sxd.c
  47. +1
    -0
      Frameworks/vgmstream/vgmstream/src/meta/ubi_sb.c
  48. +9
    -9
      Frameworks/vgmstream/vgmstream/src/meta/vxn.c
  49. +16
    -16
      Frameworks/vgmstream/vgmstream/src/meta/wwise.c
  50. +46
    -20
      Frameworks/vgmstream/vgmstream/src/meta/xvag.c
  51. +17
    -22
      Frameworks/vgmstream/vgmstream/src/meta/xwb.c
  52. +108
    -0
      Frameworks/vgmstream/vgmstream/src/meta/xwc.c
  53. +444
    -46
      Frameworks/vgmstream/vgmstream/src/streamfile.c
  54. +27
    -24
      Frameworks/vgmstream/vgmstream/src/streamfile.h
  55. +22
    -2
      Frameworks/vgmstream/vgmstream/src/vgmstream.c
  56. +23
    -17
      Frameworks/vgmstream/vgmstream/src/vgmstream.h

+ 150
- 118
Frameworks/vgmstream/vgmstream.xcodeproj/project.pbxproj View File

@@ -43,7 +43,6 @@
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 */; };
@@ -221,7 +220,6 @@
836F6FBA18BDC2190095E648 /* ngc_ymf.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E7E18BDC2180095E648 /* ngc_ymf.c */; };
836F6FBB18BDC2190095E648 /* ngca.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E7F18BDC2180095E648 /* ngca.c */; };
836F6FBD18BDC2190095E648 /* nwa.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8118BDC2180095E648 /* nwa.c */; };
836F6FBE18BDC2190095E648 /* ogg_vorbis_file.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8218BDC2180095E648 /* ogg_vorbis_file.c */; };
836F6FBF18BDC2190095E648 /* otm.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8318BDC2180095E648 /* otm.c */; };
836F6FC018BDC2190095E648 /* p3d.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8418BDC2180095E648 /* p3d.c */; };
836F6FC118BDC2190095E648 /* pc_adp.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E8518BDC2180095E648 /* pc_adp.c */; };
@@ -405,6 +403,16 @@
839E21E81F2EDAF100EE54D7 /* mpeg_decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 839E21DE1F2EDAF000EE54D7 /* mpeg_decoder.h */; };
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 */; };
83A21F7B201D895B000F04B9 /* blocked_xvag.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F7A201D895B000F04B9 /* blocked_xvag.c */; };
83A21F85201D8981000F04B9 /* atx.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F7C201D897F000F04B9 /* atx.c */; };
83A21F86201D8981000F04B9 /* xwc.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F7D201D8980000F04B9 /* xwc.c */; };
83A21F87201D8981000F04B9 /* fsb_keys.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A21F7E201D8980000F04B9 /* fsb_keys.h */; };
83A21F88201D8981000F04B9 /* ogg_vorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F7F201D8980000F04B9 /* ogg_vorbis.c */; };
83A21F89201D8982000F04B9 /* atsl3.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F80201D8980000F04B9 /* atsl3.c */; };
83A21F8A201D8982000F04B9 /* fsb_encrypted.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F81201D8981000F04B9 /* fsb_encrypted.c */; };
83A21F8B201D8982000F04B9 /* sps_n1.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F82201D8981000F04B9 /* sps_n1.c */; };
83A21F8C201D8982000F04B9 /* kma9.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F83201D8981000F04B9 /* kma9.c */; };
83A21F8D201D8982000F04B9 /* sqex_sead.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A21F84201D8981000F04B9 /* sqex_sead.c */; };
83A3F0741E3AD8B900D6A794 /* formats.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A3F0711E3AD8B900D6A794 /* formats.c */; };
83A3F0761E3AD8B900D6A794 /* stack_alloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A3F0731E3AD8B900D6A794 /* stack_alloc.h */; };
83A5F75F198DF021009AF94C /* bfwav.c in Sources */ = {isa = PBXBuildFile; fileRef = 83A5F75E198DF021009AF94C /* bfwav.c */; };
@@ -595,7 +603,6 @@
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>"; };
@@ -775,7 +782,6 @@
836F6E7E18BDC2180095E648 /* ngc_ymf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_ymf.c; sourceTree = "<group>"; };
836F6E7F18BDC2180095E648 /* ngca.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngca.c; sourceTree = "<group>"; };
836F6E8118BDC2180095E648 /* nwa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nwa.c; sourceTree = "<group>"; };
836F6E8218BDC2180095E648 /* ogg_vorbis_file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ogg_vorbis_file.c; sourceTree = "<group>"; };
836F6E8318BDC2180095E648 /* otm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = otm.c; sourceTree = "<group>"; };
836F6E8418BDC2180095E648 /* p3d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = p3d.c; sourceTree = "<group>"; };
836F6E8518BDC2180095E648 /* pc_adp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pc_adp.c; sourceTree = "<group>"; };
@@ -957,6 +963,16 @@
839E21DE1F2EDAF000EE54D7 /* mpeg_decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mpeg_decoder.h; sourceTree = "<group>"; };
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>"; };
83A21F7A201D895B000F04B9 /* blocked_xvag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_xvag.c; sourceTree = "<group>"; };
83A21F7C201D897F000F04B9 /* atx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atx.c; sourceTree = "<group>"; };
83A21F7D201D8980000F04B9 /* xwc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xwc.c; sourceTree = "<group>"; };
83A21F7E201D8980000F04B9 /* fsb_keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fsb_keys.h; sourceTree = "<group>"; };
83A21F7F201D8980000F04B9 /* ogg_vorbis.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ogg_vorbis.c; sourceTree = "<group>"; };
83A21F80201D8980000F04B9 /* atsl3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atsl3.c; sourceTree = "<group>"; };
83A21F81201D8981000F04B9 /* fsb_encrypted.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fsb_encrypted.c; sourceTree = "<group>"; };
83A21F82201D8981000F04B9 /* sps_n1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sps_n1.c; sourceTree = "<group>"; };
83A21F83201D8981000F04B9 /* kma9.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = kma9.c; sourceTree = "<group>"; };
83A21F84201D8981000F04B9 /* sqex_sead.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqex_sead.c; sourceTree = "<group>"; };
83A3F0711E3AD8B900D6A794 /* formats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = formats.c; 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>"; };
@@ -1134,51 +1150,40 @@
836F6DDF18BDC2180095E648 /* coding */ = {
isa = PBXGroup;
children = (
836F6DE018BDC2180095E648 /* acm_decoder.c */,
836F6DE118BDC2180095E648 /* acm_decoder.h */,
836F6DE218BDC2180095E648 /* adx_decoder.c */,
836F6DE318BDC2180095E648 /* aica_decoder.c */,
836F6DE418BDC2180095E648 /* at3_decoder.c */,
830EBE0F2004655D0023AA10 /* atrac9_decoder.c */,
831BA6221EAC61CB00CF89B0 /* coding_utils.c */,
836F6DE518BDC2180095E648 /* coding.h */,
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 */,
83AA5D0E1F6E2F5F0020821C /* ea_xa_decoder.c */,
83AA5D151F6E2F600020821C /* ea_xas_decoder.c */,
8374EE361F787AB500033E90 /* ffmpeg_decoder_utils_ea_xma.c */,
83345A491F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c */,
8374EE3D1F787AB600033E90 /* ffmpeg_decoder_utils.c */,
8374EE3C1F787AB600033E90 /* ffmpeg_decoder_utils.h */,
83AA5D0E1F6E2F5F0020821C /* ea_xa_decoder.c */,
83AA5D151F6E2F600020821C /* ea_xas_decoder.c */,
83AA5D141F6E2F600020821C /* mpeg_custom_utils_awc.c */,
83AA5D131F6E2F5F0020821C /* mpeg_custom_utils_ealayer3.c */,
83E56BA01F2EE3500026BC60 /* vorbis_custom_utils_ogl.c */,
839E21D91F2EDAF000EE54D7 /* mpeg_custom_utils_ahx.c */,
839E21DD1F2EDAF000EE54D7 /* mpeg_custom_utils.c */,
839E21DE1F2EDAF000EE54D7 /* mpeg_decoder.h */,
839E21D61F2EDAF000EE54D7 /* vorbis_custom_data_fsb.h */,
839E21DC1F2EDAF000EE54D7 /* vorbis_custom_data_wwise.h */,
839E21D71F2EDAF000EE54D7 /* vorbis_custom_decoder.c */,
839E21DB1F2EDAF000EE54D7 /* vorbis_custom_decoder.h */,
839E21DA1F2EDAF000EE54D7 /* vorbis_custom_utils_fsb.c */,
839E21DF1F2EDAF000EE54D7 /* vorbis_custom_utils_sk.c */,
839E21D81F2EDAF000EE54D7 /* vorbis_custom_utils_wwise.c */,
835027121ED119E000C25929 /* mta2_decoder.c */,
83709E0B1ECBC1C3005C03D3 /* mc3_decoder.c */,
83709E0C1ECBC1C3005C03D3 /* psv_decoder.c */,
831BA6221EAC61CB00CF89B0 /* coding_utils.c */,
838BDB6B1D3AFAB10022CA6F /* ffmpeg_decoder.c */,
832389511D224C0800482226 /* hca_decoder.c */,
836F6DE918BDC2180095E648 /* g72x_state.h */,
83D7318B1A749EEE00CA1366 /* g719_decoder.c */,
836F6DE018BDC2180095E648 /* acm_decoder.c */,
836F6DE118BDC2180095E648 /* acm_decoder.h */,
836F6DE218BDC2180095E648 /* adx_decoder.c */,
836F6DE318BDC2180095E648 /* aica_decoder.c */,
836F6DE418BDC2180095E648 /* at3_decoder.c */,
836F6DE518BDC2180095E648 /* coding.h */,
836F6DE718BDC2180095E648 /* g721_decoder.c */,
836F6DE818BDC2180095E648 /* g7221_decoder.c */,
836F6DE918BDC2180095E648 /* g72x_state.h */,
832389511D224C0800482226 /* hca_decoder.c */,
836F6DEA18BDC2180095E648 /* ima_decoder.c */,
836F6DEB18BDC2180095E648 /* l5_555_decoder.c */,
836F6DEC18BDC2180095E648 /* lsf_decoder.c */,
83709E0B1ECBC1C3005C03D3 /* mc3_decoder.c */,
836F6DEE18BDC2180095E648 /* mp4_aac_decoder.c */,
839E21D91F2EDAF000EE54D7 /* mpeg_custom_utils_ahx.c */,
83AA5D141F6E2F600020821C /* mpeg_custom_utils_awc.c */,
83AA5D131F6E2F5F0020821C /* mpeg_custom_utils_ealayer3.c */,
839E21DD1F2EDAF000EE54D7 /* mpeg_custom_utils.c */,
836F6DEF18BDC2180095E648 /* mpeg_decoder.c */,
839E21DE1F2EDAF000EE54D7 /* mpeg_decoder.h */,
836F6DF018BDC2180095E648 /* msadpcm_decoder.c */,
835027121ED119E000C25929 /* mta2_decoder.c */,
836F6DF118BDC2180095E648 /* mtaf_decoder.c */,
836F6DF218BDC2180095E648 /* nds_procyon_decoder.c */,
836F6DF318BDC2180095E648 /* ngc_afc_decoder.c */,
@@ -1188,9 +1193,19 @@
836F6DF718BDC2180095E648 /* nwa_decoder.h */,
836F6DF818BDC2180095E648 /* ogg_vorbis_decoder.c */,
836F6DF918BDC2180095E648 /* pcm_decoder.c */,
83709E0C1ECBC1C3005C03D3 /* psv_decoder.c */,
836F6DFA18BDC2180095E648 /* psx_decoder.c */,
836F6DFB18BDC2180095E648 /* SASSC_decoder.c */,
836F6DFC18BDC2180095E648 /* sdx2_decoder.c */,
839E21D61F2EDAF000EE54D7 /* vorbis_custom_data_fsb.h */,
839E21DC1F2EDAF000EE54D7 /* vorbis_custom_data_wwise.h */,
839E21D71F2EDAF000EE54D7 /* vorbis_custom_decoder.c */,
839E21DB1F2EDAF000EE54D7 /* vorbis_custom_decoder.h */,
839E21DA1F2EDAF000EE54D7 /* vorbis_custom_utils_fsb.c */,
83E56BA01F2EE3500026BC60 /* vorbis_custom_utils_ogl.c */,
839E21DF1F2EDAF000EE54D7 /* vorbis_custom_utils_sk.c */,
8349A8DC1FE6251E00E26435 /* vorbis_custom_utils_vid1.c */,
839E21D81F2EDAF000EE54D7 /* vorbis_custom_utils_wwise.c */,
836F6DFD18BDC2180095E648 /* ws_decoder.c */,
836F6DFE18BDC2180095E648 /* xa_decoder.c */,
);
@@ -1200,26 +1215,26 @@
836F6DFF18BDC2180095E648 /* layout */ = {
isa = PBXGroup;
children = (
836F6E0018BDC2180095E648 /* aax_layout.c */,
836F6E0118BDC2180095E648 /* aix_layout.c */,
836F6E0218BDC2180095E648 /* ast_blocked.c */,
836F6E0318BDC2180095E648 /* bdsp_blocked.c */,
83AA5D1B1F6E2F7F0020821C /* blocked_awc.c */,
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 */,
830165A11F256BF400CA0941 /* hwas_blocked.c */,
831BD1201EEE1D2A00198540 /* rws_blocked.c */,
836F6E0018BDC2180095E648 /* aax_layout.c */,
836F6E0118BDC2180095E648 /* aix_layout.c */,
836F6E0218BDC2180095E648 /* ast_blocked.c */,
836F6E0318BDC2180095E648 /* bdsp_blocked.c */,
83A21F7A201D895B000F04B9 /* blocked_xvag.c */,
836F6E0418BDC2180095E648 /* blocked.c */,
836F6E0518BDC2180095E648 /* caf_blocked.c */,
836F6E0818BDC2180095E648 /* emff_blocked.c */,
836F6E0918BDC2180095E648 /* filp_blocked.c */,
836F6E0A18BDC2180095E648 /* gsb_blocked.c */,
836F6E0B18BDC2180095E648 /* halpst_blocked.c */,
830165A11F256BF400CA0941 /* hwas_blocked.c */,
836F6E0C18BDC2180095E648 /* ims_block.c */,
836F6E0D18BDC2180095E648 /* interleave.c */,
836F6E1018BDC2180095E648 /* layout.h */,
@@ -1230,6 +1245,7 @@
836F6E1618BDC2180095E648 /* ps2_iab_blocked.c */,
836F6E1718BDC2180095E648 /* ps2_strlr_blocked.c */,
836F6E1818BDC2180095E648 /* psx_mgav_blocked.c */,
831BD1201EEE1D2A00198540 /* rws_blocked.c */,
836F6E1918BDC2180095E648 /* scd_int_layout.c */,
836F6E1A18BDC2180095E648 /* str_snds_blocked.c */,
836F6E1B18BDC2180095E648 /* thp_blocked.c */,
@@ -1246,95 +1262,36 @@
836F6E2718BDC2180095E648 /* meta */ = {
isa = PBXGroup;
children = (
830EBE122004656E0023AA10 /* ktss.c */,
830EBE112004656E0023AA10 /* xnb.c */,
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 */,
83AA5D211F6E2F9C0020821C /* hca_keys.h */,
83AA5D231F6E2F9C0020821C /* stm.c */,
839E21EA1F2EDB0500EE54D7 /* sk_aud.c */,
830165971F256BD000CA0941 /* txth.c */,
830165981F256BD000CA0941 /* ea_schl_fixed.c */,
830165991F256BD000CA0941 /* nds_strm_ffta2.c */,
83CAB8DC1F0B0744001BC993 /* pc_xa30.c */,
83CAB8E11F0B0745001BC993 /* wii_04sw.c */,
831BD11F1EEE1CF200198540 /* ngc_ulw.c */,
8350270C1ED119D200C25929 /* ps3_mta2.c */,
833A7A2D1ED11961003EC53E /* xau.c */,
83709DFF1ECBC1A4005C03D3 /* gtd.c */,
83709E001ECBC1A4005C03D3 /* mc3.c */,
83709E011ECBC1A4005C03D3 /* mss.c */,
83709E021ECBC1A4005C03D3 /* ps2_rxws.c */,
83709E031ECBC1A4005C03D3 /* ta_aac.c */,
83709E041ECBC1A4005C03D3 /* waa_wac_wad_wam.c */,
831BA60E1EAC61A500CF89B0 /* adx.c */,
831BA60F1EAC61A500CF89B0 /* ogl.c */,
831BA6101EAC61A500CF89B0 /* ps2_vds_vdm.c */,
831BA6111EAC61A500CF89B0 /* sgxd.c */,
831BA6121EAC61A500CF89B0 /* sxd.c */,
831BA6131EAC61A500CF89B0 /* ubi_raki.c */,
831BA6141EAC61A500CF89B0 /* vawx.c */,
831BA6151EAC61A500CF89B0 /* x360_cxs.c */,
831BA6171EAC61A500CF89B0 /* x360_pasx.c */,
83FF0EBB1E93282100C58054 /* wwise.c */,
83AB8C731E8072A100086084 /* nub_vag.c */,
83AB8C741E8072A100086084 /* x360_ast.c */,
83299FCE1E7660C7003A3242 /* bik.c */,
83299FCF1E7660C7003A3242 /* dsp_adx.c */,
8350C0591E071990009E0A93 /* ps2_svag_snk.c */,
8350C0541E071881009E0A93 /* xma.c */,
838BDB6D1D3B043C0022CA6F /* ffmpeg.c */,
8323894F1D2246C300482226 /* hca.c */,
83EDE5D61A70951A005F5D84 /* mca.c */,
83EDE5D71A70951A005F5D84 /* btsnd.c */,
834D3A6D19F47C98001C54F6 /* g1l.c */,
83BAFB6B19F45EB3005DAB60 /* bfstm.c */,
83A5F75E198DF021009AF94C /* bfwav.c */,
83F5F8821908D0A400C8E65F /* fsb5.c */,
836F6E2918BDC2180095E648 /* 2dx9.c */,
8349A9041FE6258100E26435 /* aax_streamfile.h */,
836F6E2A18BDC2180095E648 /* aax.c */,
836F6E2B18BDC2180095E648 /* acm.c */,
836F6E2C18BDC2180095E648 /* ads.c */,
8349A9021FE6258100E26435 /* adx_keys.h */,
831BA60E1EAC61A500CF89B0 /* adx.c */,
8349A9001FE6258000E26435 /* afc.c */,
836F6E2F18BDC2180095E648 /* agsc.c */,
836F6E3018BDC2180095E648 /* ahx.c */,
836F6E3118BDC2180095E648 /* aifc.c */,
8349A8F61FE6257E00E26435 /* aix_streamfile.h */,
836F6E3218BDC2180095E648 /* aix.c */,
836F6E3318BDC2180095E648 /* akb.c */,
836F6E3418BDC2180095E648 /* apple_caff.c */,
836F6E3518BDC2180095E648 /* ast.c */,
83A21F80201D8980000F04B9 /* atsl3.c */,
83A21F7C201D897F000F04B9 /* atx.c */,
83AA5D201F6E2F9B0020821C /* awc.c */,
836F6E3618BDC2180095E648 /* baf.c */,
8349A8F81FE6257E00E26435 /* bar_streamfile.h */,
8349A9051FE6258100E26435 /* bar.c */,
836F6E3718BDC2180095E648 /* bcstm.c */,
83BAFB6B19F45EB3005DAB60 /* bfstm.c */,
83A5F75E198DF021009AF94C /* bfwav.c */,
836F6E3818BDC2180095E648 /* bgw.c */,
83299FCE1E7660C7003A3242 /* bik.c */,
836F6E3918BDC2180095E648 /* bnsf.c */,
836F6E3A18BDC2180095E648 /* brstm.c */,
83EDE5D71A70951A005F5D84 /* btsnd.c */,
836F6E3B18BDC2180095E648 /* capdsp.c */,
836F6E3C18BDC2180095E648 /* Cstr.c */,
836F6E3D18BDC2180095E648 /* dc_asd.c */,
@@ -1342,43 +1299,66 @@
836F6E3F18BDC2180095E648 /* dc_idvi.c */,
836F6E4018BDC2180095E648 /* dc_kcey.c */,
836F6E4118BDC2180095E648 /* dc_str.c */,
8349A8EE1FE6257C00E26435 /* dec.c */,
836F6E4318BDC2180095E648 /* dmsg_segh.c */,
83299FCF1E7660C7003A3242 /* dsp_adx.c */,
836F6E4418BDC2180095E648 /* dsp_bdsp.c */,
836F6E4518BDC2180095E648 /* dsp_sth_str.c */,
8349A8FF1FE6258000E26435 /* ea_1snh.c */,
8349A8F71FE6257E00E26435 /* ea_eaac.c */,
830165981F256BD000CA0941 /* ea_schl_fixed.c */,
836F6E4618BDC2180095E648 /* ea_schl.c */,
836F6E4818BDC2180095E648 /* emff.c */,
836F6E4918BDC2180095E648 /* exakt_sc.c */,
836F6E4A18BDC2180095E648 /* excitebots.c */,
8349A8EF1FE6257C00E26435 /* ezw.c */,
838BDB6D1D3B043C0022CA6F /* ffmpeg.c */,
836F6E4B18BDC2180095E648 /* ffw.c */,
8349A8FD1FE6257F00E26435 /* flx.c */,
83A21F81201D8981000F04B9 /* fsb_encrypted.c */,
83A21F7E201D8980000F04B9 /* fsb_keys.h */,
836F6E4C18BDC2180095E648 /* fsb.c */,
83F5F8821908D0A400C8E65F /* fsb5.c */,
834D3A6D19F47C98001C54F6 /* g1l.c */,
836F6E4D18BDC2180095E648 /* gca.c */,
836F6E4E18BDC2180095E648 /* gcsw.c */,
836F6E4F18BDC2180095E648 /* genh.c */,
836F6E5118BDC2180095E648 /* gsp_gsb.c */,
83709DFF1ECBC1A4005C03D3 /* gtd.c */,
836F6E5218BDC2180095E648 /* halpst.c */,
83AA5D211F6E2F9C0020821C /* hca_keys.h */,
8323894F1D2246C300482226 /* hca.c */,
836F6E5318BDC2180095E648 /* his.c */,
836F6E5418BDC2180095E648 /* idsp.c */,
836F6E5518BDC2180095E648 /* ios_psnd.c */,
836F6E5618BDC2180095E648 /* ish_isd.c */,
836F6E5718BDC2180095E648 /* ivaud.c */,
836F6E5818BDC2180095E648 /* ivb.c */,
83A21F83201D8981000F04B9 /* kma9.c */,
836F6E5918BDC2180095E648 /* kraw.c */,
830EBE122004656E0023AA10 /* ktss.c */,
836F6E5A18BDC2180095E648 /* lsf.c */,
836F6E5C18BDC2180095E648 /* mattel_hyperscan.c */,
836F6E5D18BDC2180095E648 /* maxis_xa.c */,
83709E001ECBC1A4005C03D3 /* mc3.c */,
83EDE5D61A70951A005F5D84 /* mca.c */,
836F6E5E18BDC2180095E648 /* meta.h */,
836F6E5F18BDC2180095E648 /* mn_str.c */,
8349A9031FE6258100E26435 /* mogg.c */,
836F6E6018BDC2180095E648 /* mp4.c */,
83709E011ECBC1A4005C03D3 /* mss.c */,
836F6E6118BDC2180095E648 /* msvp.c */,
836F6E6218BDC2180095E648 /* mus_acm.c */,
836F6E6318BDC2180095E648 /* musc.c */,
836F6E6418BDC2180095E648 /* musx.c */,
836F6E6518BDC2180095E648 /* myspd.c */,
8349A9061FE6258100E26435 /* naac.c */,
836F6E6618BDC2180095E648 /* naomi_adpcm.c */,
836F6E6718BDC2180095E648 /* naomi_spsd.c */,
836F6E6818BDC2180095E648 /* nds_hwas.c */,
836F6E6918BDC2180095E648 /* nds_rrds.c */,
836F6E6A18BDC2180095E648 /* nds_sad.c */,
830165991F256BD000CA0941 /* nds_strm_ffta2.c */,
836F6E6B18BDC2180095E648 /* nds_strm.c */,
836F6E6C18BDC2180095E648 /* nds_swav.c */,
836F6E6D18BDC2180095E648 /* ngc_adpdtk.c */,
@@ -1397,16 +1377,27 @@
836F6E7A18BDC2180095E648 /* ngc_sck_dsp.c */,
836F6E7B18BDC2180095E648 /* ngc_ssm.c */,
836F6E7C18BDC2180095E648 /* ngc_tydsp.c */,
831BD11F1EEE1CF200198540 /* ngc_ulw.c */,
8349A8FA1FE6257E00E26435 /* ngc_vid1.c */,
836F6E7E18BDC2180095E648 /* ngc_ymf.c */,
836F6E7F18BDC2180095E648 /* ngca.c */,
83345A4D1F8AEB2800B2EAA4 /* nsw_opus.c */,
83AB8C731E8072A100086084 /* nub_vag.c */,
83345A4B1F8AEB2700B2EAA4 /* nub_xma.c */,
836F6E8118BDC2180095E648 /* nwa.c */,
836F6E8218BDC2180095E648 /* ogg_vorbis_file.c */,
83A21F7F201D8980000F04B9 /* ogg_vorbis.c */,
831BA60F1EAC61A500CF89B0 /* ogl.c */,
8349A8FB1FE6257F00E26435 /* omu.c */,
836F6E8318BDC2180095E648 /* otm.c */,
836F6E8418BDC2180095E648 /* p3d.c */,
8349A8FE1FE6257F00E26435 /* pc_adp_otns.c */,
836F6E8518BDC2180095E648 /* pc_adp.c */,
83345A4C1F8AEB2700B2EAA4 /* pc_al2.c */,
8349A8F01FE6257C00E26435 /* pc_ast.c */,
836F6E8618BDC2180095E648 /* pc_mxst.c */,
836F6E8718BDC2180095E648 /* pc_smp.c */,
836F6E8818BDC2180095E648 /* pc_snds.c */,
83CAB8DC1F0B0744001BC993 /* pc_xa30.c */,
836F6E8B18BDC2180095E648 /* pona.c */,
836F6E8C18BDC2180095E648 /* pos.c */,
836F6E8D18BDC2180095E648 /* ps2_2pfs.c */,
@@ -1446,12 +1437,13 @@
836F6EB018BDC2180095E648 /* ps2_mtaf.c */,
836F6EB118BDC2180095E648 /* ps2_npsf.c */,
836F6EB218BDC2180095E648 /* ps2_p2bt.c */,
8349A8F21FE6257D00E26435 /* ps2_pcm.c */,
836F6EB318BDC2180095E648 /* ps2_pnb.c */,
836F6EB418BDC2180095E648 /* ps2_psh.c */,
836F6EB518BDC2180095E648 /* ps2_psw.c */,
836F6EB618BDC2180095E648 /* ps2_rnd.c */,
836F6EB718BDC2180095E648 /* ps2_rstm.c */,
836F6EB818BDC2180095E648 /* rws.c */,
83709E021ECBC1A4005C03D3 /* ps2_rxws.c */,
836F6EBA18BDC2180095E648 /* ps2_sfs.c */,
836F6EBB18BDC2180095E648 /* ps2_sl3.c */,
836F6EBC18BDC2180095E648 /* ps2_smpl.c */,
@@ -1461,12 +1453,14 @@
836F6EC018BDC2190095E648 /* ps2_ster.c */,
836F6EC218BDC2190095E648 /* ps2_str.c */,
836F6EC318BDC2190095E648 /* ps2_strlr.c */,
8350C0591E071990009E0A93 /* ps2_svag_snk.c */,
836F6EC418BDC2190095E648 /* ps2_svag.c */,
836F6EC518BDC2190095E648 /* ps2_tec.c */,
836F6EC618BDC2190095E648 /* ps2_tk5.c */,
836F6EC718BDC2190095E648 /* ps2_vag.c */,
836F6EC818BDC2190095E648 /* ps2_vas.c */,
836F6EC918BDC2190095E648 /* ps2_vbk.c */,
831BA6101EAC61A500CF89B0 /* ps2_vds_vdm.c */,
836F6ECA18BDC2190095E648 /* ps2_vgs.c */,
836F6ECB18BDC2190095E648 /* ps2_vgv.c */,
836F6ECC18BDC2190095E648 /* ps2_vms.c */,
@@ -1475,12 +1469,14 @@
836F6ECF18BDC2190095E648 /* ps2_wad.c */,
836F6ED018BDC2190095E648 /* ps2_wb.c */,
836F6ED118BDC2190095E648 /* ps2_wmus.c */,
8349A8FC1FE6257F00E26435 /* ps2_xa2_rrp.c */,
836F6ED218BDC2190095E648 /* ps2_xa2.c */,
836F6ED318BDC2190095E648 /* ps2_xa30.c */,
836F6ED518BDC2190095E648 /* ps3_cps.c */,
836F6ED618BDC2190095E648 /* ps3_ivag.c */,
836F6ED718BDC2190095E648 /* ps3_klbs.c */,
836F6ED818BDC2190095E648 /* ps3_msf.c */,
8350270C1ED119D200C25929 /* ps3_mta2.c */,
836F6ED918BDC2190095E648 /* ps3_past.c */,
836F6EDD18BDC2190095E648 /* psx_cdxa.c */,
836F6EDE18BDC2190095E648 /* psx_fag.c */,
@@ -1493,29 +1489,48 @@
836F6EE518BDC2190095E648 /* rs03.c */,
836F6EE618BDC2190095E648 /* rsd.c */,
836F6EE718BDC2190095E648 /* rsf.c */,
836F6EB818BDC2180095E648 /* rws.c */,
836F6EE818BDC2190095E648 /* rwsd.c */,
836F6EE918BDC2190095E648 /* rwx.c */,
836F6EEA18BDC2190095E648 /* s14_sss.c */,
8349A8F11FE6257D00E26435 /* sab.c */,
836F6EEB18BDC2190095E648 /* sat_baka.c */,
836F6EEC18BDC2190095E648 /* sat_dvi.c */,
836F6EED18BDC2190095E648 /* sat_sap.c */,
8349A8F51FE6257D00E26435 /* scd_pcm.c */,
836F6EEE18BDC2190095E648 /* sd9.c */,
836F6EEF18BDC2190095E648 /* sdt.c */,
836F6EF018BDC2190095E648 /* seg.c */,
836F6EF118BDC2190095E648 /* sfl.c */,
831BA6111EAC61A500CF89B0 /* sgxd.c */,
839E21EA1F2EDB0500EE54D7 /* sk_aud.c */,
836F6EF218BDC2190095E648 /* sli.c */,
83A21F82201D8981000F04B9 /* sps_n1.c */,
836F6EF318BDC2190095E648 /* spt_spd.c */,
8349A8F31FE6257D00E26435 /* sqex_scd_streamfile.h */,
836F6EF418BDC2190095E648 /* sqex_scd.c */,
83A21F84201D8981000F04B9 /* sqex_sead.c */,
83AA5D231F6E2F9C0020821C /* stm.c */,
836F6EF618BDC2190095E648 /* str_asr.c */,
836F6EF718BDC2190095E648 /* str_snds.c */,
836F6EF818BDC2190095E648 /* stx.c */,
836F6EF918BDC2190095E648 /* svs.c */,
831BA6121EAC61A500CF89B0 /* sxd.c */,
83709E031ECBC1A4005C03D3 /* ta_aac.c */,
836F6EFA18BDC2190095E648 /* thp.c */,
836F6EFB18BDC2190095E648 /* tun.c */,
830165971F256BD000CA0941 /* txth.c */,
836F6EFC18BDC2190095E648 /* ubi_ckd.c */,
831BA6131EAC61A500CF89B0 /* ubi_raki.c */,
8349A8F41FE6257D00E26435 /* ubi_sb.c */,
831BA6141EAC61A500CF89B0 /* vawx.c */,
836F6EFD18BDC2190095E648 /* vgs.c */,
836F6EFE18BDC2190095E648 /* vs.c */,
8349A8F91FE6257E00E26435 /* vsf_tta.c */,
836F6EFF18BDC2190095E648 /* vsf.c */,
8349A9011FE6258000E26435 /* vxn.c */,
83709E041ECBC1A4005C03D3 /* waa_wac_wad_wam.c */,
83CAB8E11F0B0745001BC993 /* wii_04sw.c */,
836F6F0018BDC2190095E648 /* wii_bns.c */,
836F6F0118BDC2190095E648 /* wii_mus.c */,
836F6F0218BDC2190095E648 /* wii_ras.c */,
@@ -1526,15 +1541,24 @@
836F6F0718BDC2190095E648 /* wpd.c */,
836F6F0818BDC2190095E648 /* ws_aud.c */,
836F6F0918BDC2190095E648 /* wvs.c */,
83FF0EBB1E93282100C58054 /* wwise.c */,
83AB8C741E8072A100086084 /* x360_ast.c */,
831BA6151EAC61A500CF89B0 /* x360_cxs.c */,
831BA6171EAC61A500CF89B0 /* x360_pasx.c */,
836F6F0A18BDC2190095E648 /* x360_tra.c */,
833A7A2D1ED11961003EC53E /* xau.c */,
836F6F0B18BDC2190095E648 /* xbox_hlwav.c */,
836F6F0C18BDC2190095E648 /* xbox_ims.c */,
836F6F0E18BDC2190095E648 /* xbox_wavm.c */,
836F6F0F18BDC2190095E648 /* xbox_xmu.c */,
836F6F1018BDC2190095E648 /* xbox_xvas.c */,
836F6F1118BDC2190095E648 /* xbox_xwav.c */,
8350C0541E071881009E0A93 /* xma.c */,
830EBE112004656E0023AA10 /* xnb.c */,
836F6F1218BDC2190095E648 /* xss.c */,
83345A4E1F8AEB2800B2EAA4 /* xvag.c */,
836F6F1318BDC2190095E648 /* xwb.c */,
83A21F7D201D8980000F04B9 /* xwc.c */,
836F6F1418BDC2190095E648 /* ydsp.c */,
836F6F1518BDC2190095E648 /* zsd.c */,
836F6F1618BDC2190095E648 /* zwdsp.c */,
@@ -1580,6 +1604,7 @@
836F6F1F18BDC2190095E648 /* acm_decoder.h in Headers */,
836F6F3518BDC2190095E648 /* nwa_decoder.h in Headers */,
8349A91D1FE6258200E26435 /* aax_streamfile.h in Headers */,
83A21F87201D8981000F04B9 /* fsb_keys.h in Headers */,
8349A90F1FE6258200E26435 /* aix_streamfile.h in Headers */,
8349A9111FE6258200E26435 /* bar_streamfile.h in Headers */,
836F6F2718BDC2190095E648 /* g72x_state.h in Headers */,
@@ -1775,9 +1800,9 @@
83CAB8E31F0B0755001BC993 /* pc_xa30.c in Sources */,
83CAB8E21F0B0752001BC993 /* wii_04sw.c in Sources */,
8349A8DF1FE6251F00E26435 /* vorbis_custom_utils_vid1.c in Sources */,
83A21F8D201D8982000F04B9 /* sqex_sead.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 */,
@@ -1873,6 +1898,7 @@
836F6FEC18BDC2190095E648 /* ps2_mtaf.c in Sources */,
83D7318C1A749EEE00CA1366 /* g719_decoder.c in Sources */,
836F701118BDC2190095E648 /* ps3_cps.c in Sources */,
83A21F85201D8981000F04B9 /* atx.c in Sources */,
836F701418BDC2190095E648 /* ps3_msf.c in Sources */,
836F6F6518BDC2190095E648 /* 2dx9.c in Sources */,
830EBE102004655D0023AA10 /* atrac9_decoder.c in Sources */,
@@ -1997,6 +2023,7 @@
836F701518BDC2190095E648 /* ps3_past.c in Sources */,
836F6F7C18BDC2190095E648 /* dc_kcey.c in Sources */,
836F6FED18BDC2190095E648 /* ps2_npsf.c in Sources */,
83A21F8B201D8982000F04B9 /* sps_n1.c in Sources */,
836F6F9E18BDC2190095E648 /* mus_acm.c in Sources */,
83709E0E1ECBC1C3005C03D3 /* psv_decoder.c in Sources */,
831BA6191EAC61A500CF89B0 /* ogl.c in Sources */,
@@ -2033,6 +2060,7 @@
836F6F8918BDC2190095E648 /* gca.c in Sources */,
836F6F5718BDC2190095E648 /* str_snds_blocked.c in Sources */,
836F6FA418BDC2190095E648 /* nds_hwas.c in Sources */,
83A21F8A201D8982000F04B9 /* fsb_encrypted.c in Sources */,
836F6FD018BDC2190095E648 /* ps2_b1s.c in Sources */,
836F701218BDC2190095E648 /* ps3_ivag.c in Sources */,
83AA5D181F6E2F600020821C /* mpeg_custom_utils_awc.c in Sources */,
@@ -2052,6 +2080,7 @@
836F6F9518BDC2190095E648 /* kraw.c in Sources */,
836F6FB718BDC2190095E648 /* ngc_ssm.c in Sources */,
83709E051ECBC1A4005C03D3 /* gtd.c in Sources */,
83A21F86201D8981000F04B9 /* xwc.c in Sources */,
83AA5D1E1F6E2F800020821C /* blocked_awc.c in Sources */,
836F704A18BDC2190095E648 /* xbox_wavm.c in Sources */,
836F6F8618BDC2190095E648 /* excitebots.c in Sources */,
@@ -2080,9 +2109,9 @@
8349A9081FE6258200E26435 /* ezw.c in Sources */,
836F6FE118BDC2190095E648 /* ps2_jstm.c in Sources */,
836F6FD918BDC2190095E648 /* ps2_gcm.c in Sources */,
83A21F88201D8981000F04B9 /* ogg_vorbis.c in Sources */,
836F6F8E18BDC2190095E648 /* halpst.c in Sources */,
836F6FEE18BDC2190095E648 /* ps2_p2bt.c in Sources */,
836F6FBE18BDC2190095E648 /* ogg_vorbis_file.c in Sources */,
836F702618BDC2190095E648 /* s14_sss.c in Sources */,
836F6F4818BDC2190095E648 /* halpst_blocked.c in Sources */,
83AA5D1D1F6E2F800020821C /* blocked_vgs.c in Sources */,
@@ -2111,6 +2140,7 @@
836F6FBF18BDC2190095E648 /* otm.c in Sources */,
836F6FDD18BDC2190095E648 /* ps2_ikm.c in Sources */,
836F6FBD18BDC2190095E648 /* nwa.c in Sources */,
83A21F8C201D8982000F04B9 /* kma9.c in Sources */,
836F6FC418BDC2190095E648 /* pc_snds.c in Sources */,
836F704E18BDC2190095E648 /* xss.c in Sources */,
836F6FD118BDC2190095E648 /* ps2_bg00.c in Sources */,
@@ -2127,7 +2157,9 @@
836F703518BDC2190095E648 /* svs.c in Sources */,
836F6FA318BDC2190095E648 /* naomi_spsd.c in Sources */,
836F6F9D18BDC2190095E648 /* msvp.c in Sources */,
83A21F7B201D895B000F04B9 /* blocked_xvag.c in Sources */,
836F6FBA18BDC2190095E648 /* ngc_ymf.c in Sources */,
83A21F89201D8982000F04B9 /* atsl3.c in Sources */,
836F705018BDC2190095E648 /* ydsp.c in Sources */,
836F702718BDC2190095E648 /* sat_baka.c in Sources */,
83345A4A1F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c in Sources */,


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

@@ -119,7 +119,9 @@ void decode_atrac9(VGMSTREAM *vgmstream, sample * outbuf, int32_t samples_to_do,
/* postadjust */ //todo improve
switch(data->config.type) {
case ATRAC9_XVAG: /* skip other subsong blocks in XVAG */
case ATRAC9_XVAG:
case ATRAC9_KMA9:
/* skip other subsong blocks */
if (data->config.interleave_skip && ((stream->offset - stream->channel_start_offset) % data->config.interleave_skip == 0)) {
stream->offset += data->config.interleave_skip * (data->config.subsong_skip - 1);
}


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

@@ -222,7 +222,6 @@ 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;
@@ -291,7 +290,6 @@ 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;
@@ -309,7 +307,6 @@ 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;
@@ -806,9 +803,6 @@ void free_ffmpeg(ffmpeg_codec_data *data) {
close_streamfile(data->streamfile);
data->streamfile = NULL;
}
if (data->config.key) {
free(data->config.key);
}
free(data);
}



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

@@ -31,10 +31,6 @@ 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);


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

@@ -1,58 +0,0 @@
#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

+ 10
- 10
Frameworks/vgmstream/vgmstream/src/coding/vorbis_custom_utils_wwise.c View File

@@ -47,7 +47,7 @@ int vorbis_custom_setup_init_wwise(STREAMFILE *streamFile, off_t start_offset, v
size_t header_size, packet_size;
vorbis_custom_config cfg = data->config;
if (cfg.setup_type == HEADER_TRIAD) {
if (cfg.setup_type == WWV_HEADER_TRIAD) {
/* read 3 Wwise packets with triad (id/comment/setup), each with a Wwise header */
off_t offset = start_offset;
@@ -132,17 +132,17 @@ static int get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_
/* packet size doesn't include header size */
switch(header_type) {
case TYPE_8: /* size 4+4 */
case WWV_TYPE_8: /* size 4+4 */
*packet_size = (uint32_t)read_32bit(offset, streamFile);
*granulepos = read_32bit(offset+4, streamFile);
return 8;
case TYPE_6: /* size 4+2 */
case WWV_TYPE_6: /* size 4+2 */
*packet_size = (uint16_t)read_16bit(offset, streamFile);
*granulepos = read_32bit(offset+2, streamFile);
return 6;
case TYPE_2: /* size 2 */
case WWV_TYPE_2: /* size 2 */
*packet_size = (uint16_t)read_16bit(offset, streamFile);
*granulepos = 0; /* granule is an arbitrary unit so we could use offset instead; libvorbis has no actually need it actually */
return 2;
@@ -306,7 +306,7 @@ static int ww2ogg_generate_vorbis_packet(vgm_bitstream * ow, vgm_bitstream * iw,
//VGM_ASSERT(granule < 0, "Wwise Vorbis: negative granule %i @ 0x%lx\n", granule, offset);
if (data->config.packet_type == MODIFIED) {
if (data->config.packet_type == WWV_MODIFIED) {
/* rebuild first bits of packet type and window info (for the i-MDCT) */
uint32_t packet_type = 0, mode_number = 0, remainder = 0;
@@ -423,13 +423,13 @@ static int ww2ogg_generate_vorbis_setup(vgm_bitstream * ow, vgm_bitstream * iw,
w_bits(ow, 8, codebook_count_less1);
codebook_count = codebook_count_less1 + 1;
if (data->config.setup_type == FULL_SETUP) {
if (data->config.setup_type == WWV_FULL_SETUP) {
/* rebuild Wwise codebooks: untouched */
for (i = 0; i < codebook_count; i++) {
if(!ww2ogg_codebook_library_copy(ow, iw)) goto fail;
}
}
else if (data->config.setup_type == INLINE_CODEBOOKS) {
else if (data->config.setup_type == WWV_INLINE_CODEBOOKS) {
/* rebuild Wwise codebooks: inline in simplified format */
for (i = 0; i < codebook_count; i++) {
if(!ww2ogg_codebook_library_rebuild(ow, iw, 0, streamFile)) goto fail;
@@ -456,7 +456,7 @@ static int ww2ogg_generate_vorbis_setup(vgm_bitstream * ow, vgm_bitstream * iw,
w_bits(ow, 16, dummy_time_value);
if (data->config.setup_type == FULL_SETUP) {
if (data->config.setup_type == WWV_FULL_SETUP) {
/* rest of setup is untouched, copy bits */
uint32_t bitly = 0;
uint32_t total_bits_read = iw->b_off;
@@ -1174,11 +1174,11 @@ static int load_wvc_array(uint8_t * buf, size_t bufsize, uint32_t codebook_id, w
const wvc_info * wvc_list;
switch (setup_type) {
case EXTERNAL_CODEBOOKS:
case WWV_EXTERNAL_CODEBOOKS:
wvc_list = wvc_list_standard;
list_length = sizeof(wvc_list_standard) / sizeof(wvc_info);
break;
case AOTUV603_CODEBOOKS:
case WWV_AOTUV603_CODEBOOKS:
wvc_list = wvc_list_aotuv603;
list_length = sizeof(wvc_list_standard) / sizeof(wvc_info);
break;


+ 27
- 14
Frameworks/vgmstream/vgmstream/src/formats.c View File

@@ -17,7 +17,7 @@ static const char* extension_list[] = {
"aaap",
"aax",
//"ac3", //FFmpeg, not parsed //common?
"ace", //fake, for tri-Ace's formats
"ace", //fake, for tri-Ace's formats (to be removed)
"acm",
"adm",
"adp",
@@ -33,7 +33,7 @@ static const char* extension_list[] = {
"aix",
"akb",
"al2",
"amts", //fake extension (to be removed)
"amts", //fake extension/header id for .stm (to be removed)
"ao", //txth/reserved [Cloudphobia (PC)]
"as4",
"asd",
@@ -43,6 +43,8 @@ static const char* extension_list[] = {
"ast",
"at3",
"at9",
"atsl3",
"atx",
"aud",
"aus",
"awc",
@@ -138,7 +140,7 @@ static const char* extension_list[] = {
"iab",
"iadp",
"idsp",
"idvi", //fake extension (to be removed)
"idvi", //fake extension for .pcm (to be removed)
"ikm",
"ild",
"int",
@@ -153,9 +155,10 @@ static const char* extension_list[] = {
"jstm",
"kces",
"kcey", //fake extension (to be removed)
"kcey", //fake extension/header id (to be removed)
"khv",
"kovs",
"km9",
"kovs", //.kvs header id
"kraw",
"ktss",
"kvs",
@@ -172,6 +175,7 @@ static const char* extension_list[] = {
"lstm", //fake extension, for STMs
"lwav", //fake extension, for WAVs
"mab",
"matx",
"mc3",
"mca",
@@ -205,8 +209,9 @@ static const char* extension_list[] = {
"naac",
"ndp",
"ngca",
"nop",
"nps",
"npsf", //fake extension (to be removed)
"npsf", //fake extension/header id for .nps (to be removed)
"nus3bank",
"nwa",
@@ -226,7 +231,7 @@ static const char* extension_list[] = {
"pnb",
"pona",
"pos",
"ps2stm", //fake extension (to be removed)
"ps2stm", //fake extension for .stm (to be removed)
"psh",
"psnd",
"psw",
@@ -261,6 +266,7 @@ static const char* extension_list[] = {
"sb5",
"sb6",
"sb7",
"sbin",
"sc",
"scd",
"sck",
@@ -282,6 +288,7 @@ static const char* extension_list[] = {
"snd",
"snds",
"sng",
"sngw",
"snr",
"sns",
"snu",
@@ -374,6 +381,7 @@ static const char* extension_list[] = {
"xvas",
"xwav",
"xwb",
"xwc",
"xwm", //FFmpeg, not parsed (XWMA)
"xwma", //FFmpeg, not parsed (XWMA)
"xws",
@@ -471,7 +479,7 @@ static const coding_info coding_info_list[] = {
{coding_APPLE_IMA4, "Apple Quicktime 4-bit IMA ADPCM"},
{coding_SNDS_IMA, "Heavy Iron .snds 4-bit IMA ADPCM"},
{coding_OTNS_IMA, "Omikron: The Nomad Soul 4-bit IMA ADPCM"},
{coding_FSB_IMA, "FSB multichannel 4-bit IMA ADPCM"},
{coding_FSB_IMA, "FSB 4-bit IMA ADPCM"},
{coding_WWISE_IMA, "Audiokinetic Wwise 4-bit IMA ADPCM"},
{coding_REF_IMA, "Reflections 4-bit IMA ADPCM"},
{coding_AWC_IMA, "Rockstar AWC 4-bit IMA ADPCM"},
@@ -574,6 +582,7 @@ static const layout_info layout_info_list[] = {
{layout_blocked_awc, "blocked (AWC)"},
{layout_blocked_vgs, "blocked (VGS)"},
{layout_blocked_vawx, "blocked (VAWX)"},
{layout_blocked_xvag_subsong, "blocked (XVAG subsong)"},
#ifdef VGM_USE_VORBIS
{layout_ogg_vorbis, "Ogg"},
#endif
@@ -933,16 +942,20 @@ static const meta_info meta_info_list[] = {
{meta_NGC_VID1, "Neversoft VID1 header"},
{meta_PC_FLX, "Ultima IX .FLX header"},
{meta_MOGG, "Harmonix Music Systems MOGG Vorbis"},
#ifdef VGM_USE_VORBIS
{meta_OGG_VORBIS, "Ogg Vorbis"},
{meta_OGG_SLI, "Ogg Vorbis with .sli (start,length) for looping"},
{meta_OGG_SLI2, "Ogg Vorbis with .sli (from,to) for looping"},
{meta_OGG_SFL, "Ogg Vorbis with SFPL for looping"},
{meta_OGG_UM3, "Ogg Vorbis, Ultramarine3 'encryption'"},
{meta_OGG_KOVS, "Ogg Vorbis, KOVS header"},
{meta_OGG_PSYCH, "Ogg Vorbis, Psychic Software obfuscation"},
#endif
{meta_OGG_UM3, "Ogg Vorbis (Ultramarine3)"},
{meta_OGG_KOVS, "Ogg Vorbis (KOVS header)"},
{meta_OGG_PSYCHIC, "Ogg Vorbis (Psychic Software)"},
{meta_OGG_SNGW, "Ogg Vorbis (Capcom)"},
{meta_OGG_ISD, "Ogg Vorbis (ISD)"},
{meta_KMA9, "Koei Tecmo KMA9 header"},
{meta_XWC, "Starbreeze XWC header"},
{meta_SQEX_SAB, "Square-Enix SAB header"},
{meta_SQEX_MAB, "Square-Enix MAB header"},
#ifdef VGM_USE_MP4V2
{meta_MP4, "AAC header"},
#endif


+ 3
- 0
Frameworks/vgmstream/vgmstream/src/layout/blocked.c View File

@@ -164,6 +164,9 @@ void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM *
case layout_blocked_vawx:
block_update_vawx(vgmstream->next_block_offset,vgmstream);
break;
case layout_blocked_xvag_subsong:
block_update_xvag_subsong(vgmstream->next_block_offset,vgmstream);
break;
default:
break;
}


+ 5
- 1
Frameworks/vgmstream/vgmstream/src/layout/blocked_ea_schl.c View File

@@ -95,6 +95,7 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
/* id, size, samples, hists-per-channel, stereo/interleaved data */
case coding_EA_XA:
//case coding_EA_XA_V2: /* handled in default */
case coding_EA_XA_int:
for (i = 0; i < vgmstream->channels; i++) {
int is_interleaved = vgmstream->coding_type == coding_EA_XA_int;
@@ -106,7 +107,9 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
/* the block can have padding so find the channel size from num_samples */
interleave = is_interleaved ? (block_samples / 28 * 0x0f) : 0;
vgmstream->ch[i].offset = block_offset + 0x0c + vgmstream->channels*0x04 + i*interleave;
/* NOT channels*0x04, as seen in Superbike 2000 (PC) EA-XA v1 mono vids */
vgmstream->ch[i].offset = block_offset + 0x0c + 2*0x04 + i*interleave;
}
break;
@@ -146,6 +149,7 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
for (i = 0; i < vgmstream->channels; i++) {
off_t channel_start = read_32bit(block_offset + 0x0C + (0x04*i),streamFile);
vgmstream->ch[i].offset = block_offset + 0x0C + (0x04*vgmstream->channels) + channel_start;
VGM_LOG("ch=%x, off=%lx\n", i, vgmstream->ch[i].offset);
}
/* read ADPCM history before each channel if needed (not actually read in sx.exe) */


+ 19
- 0
Frameworks/vgmstream/vgmstream/src/layout/blocked_xvag.c View File

@@ -0,0 +1,19 @@
#include "layout.h"
#include "../coding/coding.h"
#include "../vgmstream.h"
/* XVAG with subsongs layers, interleaves chunks of each subsong (a hack to support them) */
void block_update_xvag_subsong(off_t block_offset, VGMSTREAM * vgmstream) {
int i;
size_t channel_size = 0x10;
/* set offsets */
for (i = 0; i < vgmstream->channels; i++) {
vgmstream->ch[i].offset = block_offset + channel_size*i;
}
//vgmstream->current_block_size = ; /* fixed */
vgmstream->current_block_offset = block_offset;
vgmstream->next_block_offset = block_offset + vgmstream->full_block_size;
}

+ 1
- 0
Frameworks/vgmstream/vgmstream/src/layout/layout.h View File

@@ -66,6 +66,7 @@ void block_update_ea_sns(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_awc(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_vgs(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_vawx(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_xvag_subsong(off_t block_offset, VGMSTREAM * vgmstream);

/* other layouts */
void render_vgmstream_interleave(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);


+ 0
- 4
Frameworks/vgmstream/vgmstream/src/meta/aax_streamfile.h View File

@@ -72,10 +72,6 @@ static STREAMFILE *open_aax_with_STREAMFILE(STREAMFILE *file,off_t start_offset,
streamfile->sf.get_realname = (void*)get_name_aax;
streamfile->sf.open = (void*)open_aax_impl;
streamfile->sf.close = (void*)close_aax;
#ifdef PROFILE_STREAMFILE
streamfile->sf.get_bytes_read = NULL;
streamfile->sf.get_error_count = NULL;
#endif
streamfile->real_file = file;
streamfile->start_physical_offset = start_offset;


+ 1
- 1
Frameworks/vgmstream/vgmstream/src/meta/adx.c View File

@@ -249,7 +249,7 @@ static int find_key(STREAMFILE *file, uint8_t type, uint16_t *xor_start, uint16_
{
uint8_t keybuf[6];

if ( read_key_file(keybuf, 6, file) ) {
if (read_key_file(keybuf, 6, file) == 6) {
*xor_start = get_16bitBE(keybuf+0);
*xor_mult = get_16bitBE(keybuf+2);
*xor_add = get_16bitBE(keybuf+4);


+ 3
- 0
Frameworks/vgmstream/vgmstream/src/meta/adx_keys.h View File

@@ -176,6 +176,9 @@ static const adxkey_info adxkey8_list[] = {
/* Storm Lover Natsu Koi!! (2011-08-04)(Vridge)(D3 Publisher)[PSP] */
{0x4133,0x5a01,0x5723, NULL,0}, // ?
/* Shounen Onmyouji: Tsubasa yo Ima, Sora e Kaere [PS2] */
{0x55d9,0x46d3,0x5b01, "SONMYOJI",0},
};
static const adxkey_info adxkey9_list[] = {


+ 1
- 1
Frameworks/vgmstream/vgmstream/src/meta/ahx.c View File

@@ -56,7 +56,7 @@ VGMSTREAM * init_vgmstream_ahx(STREAMFILE *streamFile) {

if (cfg.encryption) {
uint8_t keybuf[6];
if (read_key_file(keybuf, 6, streamFile)) {
if (read_key_file(keybuf, 6, streamFile) == 6) {
cfg.cri_key1 = get_16bitBE(keybuf+0);
cfg.cri_key2 = get_16bitBE(keybuf+2);
cfg.cri_key3 = get_16bitBE(keybuf+4);


+ 0
- 4
Frameworks/vgmstream/vgmstream/src/meta/aix_streamfile.h View File

@@ -151,10 +151,6 @@ static STREAMFILE *open_aix_impl(AIXSTREAMFILE *streamfile,const char * const fi
streamfile->sf.get_realname = (void*)get_name_aix;
streamfile->sf.open = (void*)open_aix_impl;
streamfile->sf.close = (void*)close_aix;
#ifdef PROFILE_STREAMFILE
streamfile->sf.get_bytes_read = NULL;
streamfile->sf.get_error_count = NULL;
#endif
streamfile->real_file = file;
streamfile->current_physical_offset = start_offset;


+ 76
- 0
Frameworks/vgmstream/vgmstream/src/meta/atsl3.c View File

@@ -0,0 +1,76 @@
#include "meta.h"
#include "../coding/coding.h"
static STREAMFILE* setup_atsl3_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size);
/* .ATSL3 - Koei Tecmo container of multiple .AT3 [One Piece Pirate Warriors (PS3)] */
VGMSTREAM * init_vgmstream_atsl3(STREAMFILE *streamFile) {
VGMSTREAM *vgmstream = NULL;
STREAMFILE *temp_streamFile = NULL;
int total_subsongs, target_subsong = streamFile->stream_index;
off_t subfile_offset;
size_t subfile_size, header_size, entry_size;
/* check extensions */
if ( !check_extensions(streamFile,"atsl3"))
goto fail;
if (read_32bitBE(0x00,streamFile) != 0x4154534C) /* "ATSL" */
goto fail;
/* main header (LE) */
header_size = read_32bitLE(0x04,streamFile);
/* 0x08/0c: flags?, 0x10: some size? */
total_subsongs = read_32bitLE(0x14,streamFile);
entry_size = read_32bitLE(0x18,streamFile);
/* 0x1c: null, 0x20: subheader size, 0x24/28: null */
if (target_subsong == 0) target_subsong = 1;
if (target_subsong > total_subsongs || total_subsongs <= 0) goto fail;
/* entry header (BE) */
/* 0x00: id */
subfile_offset = read_32bitBE(header_size + (target_subsong-1)*entry_size + 0x04,streamFile);
subfile_size = read_32bitBE(header_size + (target_subsong-1)*entry_size + 0x08,streamFile);
/* 0x08+: sample rate/num_samples/loop_start/etc, matching subfile header */
/* some kind of seek/switch table follows */
temp_streamFile = setup_atsl3_streamfile(streamFile, subfile_offset,subfile_size);
if (!temp_streamFile) goto fail;
/* init the VGMSTREAM */
vgmstream = init_vgmstream_riff(temp_streamFile);
if (!vgmstream) goto fail;
vgmstream->num_streams = total_subsongs;
close_streamfile(temp_streamFile);
return vgmstream;
fail:
close_streamfile(temp_streamFile);
close_vgmstream(vgmstream);
return NULL;
}
static STREAMFILE* setup_atsl3_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size) {
STREAMFILE *temp_streamFile = NULL, *new_streamFile = NULL;
/* setup subfile */
new_streamFile = open_wrap_streamfile(streamFile);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
new_streamFile = open_clamp_streamfile(temp_streamFile, subfile_offset,subfile_size);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
new_streamFile = open_fakename_streamfile(temp_streamFile, NULL,"at3");
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
return temp_streamFile;
fail:
close_streamfile(temp_streamFile);
return NULL;
}

+ 109
- 0
Frameworks/vgmstream/vgmstream/src/meta/atx.c View File

@@ -0,0 +1,109 @@
#include "meta.h"
#include "../coding/coding.h"
#define ATX_MAX_SEGMENTS 2
static STREAMFILE* setup_atx_streamfile(STREAMFILE *streamFile);
/* .ATX - Media.Vision's segmented RIFF AT3 wrapper [Senjo no Valkyria 3 (PSP), Shining Blade (PSP)] */
VGMSTREAM * init_vgmstream_atx(STREAMFILE *streamFile) {
VGMSTREAM *vgmstream = NULL;
STREAMFILE *temp_streamFile = NULL;
/* check extensions */
if ( !check_extensions(streamFile,"atx"))
goto fail;
if (read_32bitBE(0x00,streamFile) != 0x41504133) /* "APA3" */
goto fail;
/* .ATX is made of subfile segments, handled by the streamFile.
* Each segment has a header/footer, and part of the whole data
* (i.e. ATRAC3 data ends in a subfile and continues in the next) */
temp_streamFile = setup_atx_streamfile(streamFile);
if (!temp_streamFile) goto fail;
vgmstream = init_vgmstream_riff(temp_streamFile);
if (!vgmstream) goto fail;
close_streamfile(temp_streamFile);
return vgmstream;
fail:
close_streamfile(temp_streamFile);
close_vgmstream(vgmstream);
return NULL;
}
static STREAMFILE* setup_atx_streamfile(STREAMFILE *streamFile) {
STREAMFILE *temp_streamFile = NULL, *new_streamFile = NULL;
STREAMFILE *segment_streamFiles[ATX_MAX_SEGMENTS] = {0};
char filename[PATH_LIMIT];
size_t filename_len;
int i, num_segments = 0;
size_t riff_size;
VGM_LOG("1\n");
if (read_16bitLE(0x1c,streamFile) != 0) goto fail; /* this must be first segment */
if (read_16bitLE(0x1e,streamFile) < 1 || read_16bitLE(0x1e,streamFile) > ATX_MAX_SEGMENTS) goto fail;
num_segments = read_16bitLE(0x1e,streamFile);
/* expected segment name: X_XXX_XXX_0n.ATX, starting from n=1 */
get_streamfile_name(streamFile, filename,PATH_LIMIT);
filename_len = strlen(filename);
if (filename_len < 7 || filename[filename_len - 5] != '1') goto fail;
/* setup segments (could avoid reopening first segment but meh) */
for (i = 0; i < num_segments; i++) {
off_t subfile_offset;
size_t subfile_size;
VGM_LOG("loop\n");
filename[filename_len - 5] = ('0'+i+1); /* ghetto digit conversion */
new_streamFile = open_stream_name(streamFile, filename);
if (!new_streamFile) goto fail;
segment_streamFiles[i] = new_streamFile;
if (read_32bitBE(0x00,segment_streamFiles[i]) != 0x41504133) /* "APA3" */
goto fail;
/* parse block/segment header (other Media.Vision's files use it too) */
subfile_offset = read_32bitLE(0x08,segment_streamFiles[i]); /* header size */
subfile_size = read_32bitLE(0x14,segment_streamFiles[i]); /* can be 0 in other containers */
VGM_LOG("subfile: %lx, %x\n", subfile_offset, subfile_size);
if (read_16bitLE(0x1c,segment_streamFiles[i]) != i)
goto fail; /* segment sequence */
/* 0x04: block size (should match subfile_size in .ATX) */
/* 0x0c: flags? also in other files, 0x10/18: null, 0x1e: segments */
/* clamp to ignore header/footer during next reads */
new_streamFile = open_clamp_streamfile(segment_streamFiles[i], subfile_offset,subfile_size);
if (!new_streamFile) goto fail;
segment_streamFiles[i] = new_streamFile;
}
/* setup with all segments and clamp further using riff_size (last segment has padding) */
riff_size = read_32bitLE(read_32bitLE(0x08,streamFile) + 0x04,streamFile) + 0x08;
new_streamFile = open_multifile_streamfile(segment_streamFiles, num_segments);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
new_streamFile = open_clamp_streamfile(temp_streamFile, 0,riff_size);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
new_streamFile = open_fakename_streamfile(temp_streamFile, NULL, "at3");
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
return temp_streamFile;
fail:
if (!temp_streamFile) {
for (i = 0; i < num_segments; i++)
close_streamfile(segment_streamFiles[i]);
} else {
close_streamfile(temp_streamFile); /* closes all segments */
}
return NULL;
}

+ 10
- 9
Frameworks/vgmstream/vgmstream/src/meta/awc.c View File

@@ -7,7 +7,7 @@ typedef struct {
int is_encrypted;
int is_music;
int total_streams;
int total_subsongs;
int channel_count;
int sample_rate;
@@ -47,7 +47,8 @@ VGMSTREAM * init_vgmstream_awc(STREAMFILE *streamFile) {
vgmstream->sample_rate = awc.sample_rate;
vgmstream->num_samples = awc.num_samples;
vgmstream->num_streams = awc.total_streams;
vgmstream->num_streams = awc.total_subsongs;
vgmstream->stream_size = awc.stream_size;
vgmstream->meta_type = meta_AWC;
@@ -113,7 +114,7 @@ static int parse_awc_header(STREAMFILE* streamFile, awc_header* awc) {
int i, ch, entries;
uint32_t flags, info_header, tag_count = 0, tags_skip = 0;
off_t off;
int target_stream = streamFile->stream_index;
int target_subsong = streamFile->stream_index;
memset(awc,0,sizeof(awc_header));
@@ -161,13 +162,13 @@ static int parse_awc_header(STREAMFILE* streamFile, awc_header* awc) {
* Music seems layered (N-1/2 stereo pairs), maybe set with events? */
awc->is_music = (read_32bit(off + 0x00,streamFile) & 0x1FFFFFFF) == 0x00000000;
if (awc->is_music) { /* all streams except id 0 is a channel */
awc->total_streams = 1;
target_stream = 1; /* we only need id 0, though channels may have its own tags/chunks */
awc->total_subsongs = 1;
target_subsong = 1; /* we only need id 0, though channels may have its own tags/chunks */
}
else { /* each stream is a single sound */
awc->total_streams = entries;
if (target_stream == 0) target_stream = 1;
if (target_stream < 0 || target_stream > awc->total_streams || awc->total_streams < 1) goto fail;
awc->total_subsongs = entries;
if (target_subsong == 0) target_subsong = 1;
if (target_subsong < 0 || target_subsong > awc->total_subsongs || awc->total_subsongs < 1) goto fail;
}
@@ -176,7 +177,7 @@ static int parse_awc_header(STREAMFILE* streamFile, awc_header* awc) {
info_header = read_32bit(off + 0x04*i, streamFile);
tag_count = (info_header >> 29) & 0x7; /* 3b */
//id = (info_header >> 0) & 0x1FFFFFFF; /* 29b */
if (target_stream-1 == i)
if (target_subsong-1 == i)
break;
tags_skip += tag_count; /* tags to skip to reach target's tags, in the next header */
}


+ 0
- 13
Frameworks/vgmstream/vgmstream/src/meta/bar_streamfile.h View File

@@ -62,15 +62,6 @@ static void close_bar(BARSTREAMFILE *streamFile) {
return;
}
#ifdef PROFILE_STREAMFILE
size_t get_bytes_read_bar(BARSTREAMFILE *streamFile) {
return streamFile->real_file->get_bytes_read(streamFile->real_file);
}
int (*get_error_count)(BARSTREAMFILE *streamFile) {
return streamFile->real_file->get_error_count(streamFile->real_file);
}
#endif
/*static*/ STREAMFILE *wrap_bar_STREAMFILE(STREAMFILE *file) {
BARSTREAMFILE *streamfile = malloc(sizeof(BARSTREAMFILE));
@@ -87,10 +78,6 @@ int (*get_error_count)(BARSTREAMFILE *streamFile) {
streamfile->sf.get_realname = (void*)get_realname_bar;
streamfile->sf.open = (void*)open_bar;
streamfile->sf.close = (void*)close_bar;
#ifdef PROFILE_STREAMFILE
streamfile->sf.get_bytes_read = get_bytes_read_bar;
streamfile->sf.get_error_count = get_error_count_bar;
#endif
streamfile->real_file = file;


+ 79
- 24
Frameworks/vgmstream/vgmstream/src/meta/bgw.c View File

@@ -1,9 +1,14 @@
#include "meta.h"
#include "../coding/coding.h"


static STREAMFILE* setup_bgw_atrac3_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, size_t frame_size, int channels);


/* BGW - from Final Fantasy XI (PC) music files */
VGMSTREAM * init_vgmstream_bgw(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
STREAMFILE *temp_streamFile = NULL;
uint32_t codec, file_size, block_size, sample_rate, block_align;
int32_t loop_start;
off_t start_offset;
@@ -32,18 +37,15 @@ VGMSTREAM * init_vgmstream_bgw(STREAMFILE *streamFile) {
channel_count = read_8bit(0x2e,streamFile);
block_align = read_8bit(0x2f,streamFile);


/* check file size with header value */
if (file_size != get_streamfile_size(streamFile))
goto fail;

loop_flag = (loop_start > 0);

/* build the VGMSTREAM */
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail;

/* fill in the vital statistics */
vgmstream->meta_type = meta_FFXI_BGW;
vgmstream->sample_rate = sample_rate;

@@ -65,7 +67,7 @@ VGMSTREAM * init_vgmstream_bgw(STREAMFILE *streamFile) {
case 3: { /* ATRAC3 (encrypted) */
uint8_t buf[0x100];
int bytes, joint_stereo, skip_samples;
ffmpeg_custom_config cfg;
size_t data_size = file_size - start_offset;

vgmstream->num_samples = block_size; /* atrac3_bytes_to_samples gives the same value */
if (loop_flag) {
@@ -77,18 +79,18 @@ VGMSTREAM * init_vgmstream_bgw(STREAMFILE *streamFile) {
joint_stereo = 0;
skip_samples = 0;

bytes = ffmpeg_make_riff_atrac3(buf, 0x100, vgmstream->num_samples, file_size - start_offset, vgmstream->channels, vgmstream->sample_rate, block_align, joint_stereo, skip_samples);
bytes = ffmpeg_make_riff_atrac3(buf, 0x100, vgmstream->num_samples, data_size, vgmstream->channels, vgmstream->sample_rate, block_align, joint_stereo, skip_samples);
if (bytes <= 0) goto fail;

memset(&cfg, 0, sizeof(ffmpeg_custom_config));
cfg.type = FFMPEG_BGW_ATRAC3;
cfg.channels = vgmstream->channels;
temp_streamFile = setup_bgw_atrac3_streamfile(streamFile, start_offset,data_size, 0xC0,channel_count);
if (!temp_streamFile) goto fail;

vgmstream->codec_data = init_ffmpeg_config(streamFile, buf,bytes, start_offset,file_size - start_offset, &cfg);
vgmstream->codec_data = init_ffmpeg_header_offset(temp_streamFile, buf,bytes, 0,data_size);
if (!vgmstream->codec_data) goto fail;

vgmstream->coding_type = coding_FFmpeg;
vgmstream->layout_type = layout_none;

close_streamfile(temp_streamFile);
break;
}
#endif
@@ -98,17 +100,17 @@ VGMSTREAM * init_vgmstream_bgw(STREAMFILE *streamFile) {
}


/* open the file for reading */
if ( !vgmstream_open_stream(vgmstream, streamFile, start_offset) )
goto fail;

return vgmstream;

fail:
close_streamfile(temp_streamFile);
close_vgmstream(vgmstream);
return NULL;
}


/* SPW (SEWave) - from PlayOnline viewer for Final Fantasy XI (PC) */
VGMSTREAM * init_vgmstream_spw(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
@@ -118,8 +120,8 @@ VGMSTREAM * init_vgmstream_spw(STREAMFILE *streamFile) {

int channel_count, loop_flag = 0;

/* check extensions */
if ( !check_extensions(streamFile, "spw") )
/* check extensions */
if ( !check_extensions(streamFile, "spw") )
goto fail;

/* check header */
@@ -127,10 +129,6 @@ VGMSTREAM * init_vgmstream_spw(STREAMFILE *streamFile) {
read_32bitBE(4,streamFile) != 0x76650000) /* "ve\0\0" */
goto fail;

/* check file size with header value */
if (read_32bitLE(0x8,streamFile) != get_streamfile_size(streamFile))
goto fail;

file_size = read_32bitLE(0x08,streamFile);
codec = read_32bitLE(0x0c,streamFile);
/*file_id = read_32bitLE(0x10,streamFile);*/
@@ -144,17 +142,15 @@ VGMSTREAM * init_vgmstream_spw(STREAMFILE *streamFile) {
block_align = read_8bit(0x2b,streamFile);
/*0x2c: unk (0x01 when PCM, 0x10 when VAG?) */

/* check file size with header value */
if (file_size != get_streamfile_size(streamFile))
goto fail;

loop_flag = (loop_start > 0);

/* build the VGMSTREAM */
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail;

/* fill in the vital statistics */
vgmstream->meta_type = meta_FFXI_SPW;
vgmstream->sample_rate = sample_rate;

@@ -171,7 +167,7 @@ VGMSTREAM * init_vgmstream_spw(STREAMFILE *streamFile) {
}
break;
case 1: /* PCM */
vgmstream->coding_type = coding_PCM16LE;
vgmstream->layout_type = layout_interleave;
@@ -182,8 +178,9 @@ VGMSTREAM * init_vgmstream_spw(STREAMFILE *streamFile) {
vgmstream->loop_start_sample = (loop_start-1);
vgmstream->loop_end_sample = vgmstream->num_samples;
}
break;

default:
goto fail;
}
@@ -199,3 +196,61 @@ fail:
close_vgmstream(vgmstream);
return NULL;
}


#define BGW_KEY_MAX (0xC0*2)

typedef struct {
uint8_t key[BGW_KEY_MAX];
size_t key_size;
} bgw_decryption_data;

/* Encrypted ATRAC3 info from Moogle Toolbox (https://sourceforge.net/projects/mogbox/) */
static size_t bgw_decryption_read(STREAMFILE *streamfile, uint8_t *dest, off_t offset, size_t length, bgw_decryption_data* data) {
size_t bytes_read;
int i;

bytes_read = streamfile->read(streamfile, dest, offset, length);

/* decrypt data (xor) */
for (i = 0; i < bytes_read; i++) {
dest[i] ^= data->key[(offset + i) % data->key_size];
}

return bytes_read;
}

static STREAMFILE* setup_bgw_atrac3_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, size_t frame_size, int channels) {
STREAMFILE *temp_streamFile = NULL, *new_streamFile = NULL;
bgw_decryption_data io_data = {0};
size_t io_data_size = sizeof(bgw_decryption_data);
int ch;

/* setup decryption with key (first frame + modified channel header) */
if (frame_size*channels == 0 || frame_size*channels > BGW_KEY_MAX) goto fail;

io_data.key_size = read_streamfile(io_data.key, subfile_offset, frame_size*channels, streamFile);
for (ch = 0; ch < channels; ch++) {
uint32_t xor = get_32bitBE(io_data.key + frame_size*ch);
put_32bitBE(io_data.key + frame_size*ch, xor ^ 0xA0024E9F);
}

/* setup subfile */
new_streamFile = open_wrap_streamfile(streamFile);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;

new_streamFile = open_clamp_streamfile(temp_streamFile, subfile_offset,subfile_size);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;

new_streamFile = open_io_streamfile(temp_streamFile, &io_data,io_data_size, bgw_decryption_read);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;

return temp_streamFile;

fail:
close_streamfile(temp_streamFile);
return NULL;
}

+ 23
- 18
Frameworks/vgmstream/vgmstream/src/meta/bik.c View File

@@ -2,13 +2,14 @@
#include "../coding/coding.h"
#include "../util.h"
static int bink_get_info(STREAMFILE *streamFile, int * out_total_streams, int * out_channel_count, int * out_sample_rate, int * out_num_samples);
static int bink_get_info(STREAMFILE *streamFile, int * out_total_streams, size_t *out_stream_size, int * out_channel_count, int * out_sample_rate, int * out_num_samples);
/* BINK 1/2 - RAD Game Tools movies (audio/video format) */
VGMSTREAM * init_vgmstream_bik(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
int channel_count = 0, loop_flag = 0, sample_rate = 0, num_samples = 0, total_streams = 0;
int stream_index = streamFile->stream_index;
int channel_count = 0, loop_flag = 0, sample_rate = 0, num_samples = 0;
int total_subsongs = 0, stream_index = streamFile->stream_index;
size_t stream_size;
/* check extension, case insensitive (bika = manually demuxed audio) */
@@ -19,7 +20,7 @@ VGMSTREAM * init_vgmstream_bik(STREAMFILE *streamFile) {
(read_32bitBE(0x00,streamFile) & 0xffffff00) != 0x4B423200 ) goto fail;
/* find target stream info and samples */
if (!bink_get_info(streamFile, &total_streams, &channel_count, &sample_rate, &num_samples))
if (!bink_get_info(streamFile, &total_subsongs, &stream_size, &channel_count, &sample_rate, &num_samples))
goto fail;
/* build the VGMSTREAM */
@@ -29,7 +30,8 @@ VGMSTREAM * init_vgmstream_bik(STREAMFILE *streamFile) {
vgmstream->layout_type = layout_none;
vgmstream->sample_rate = sample_rate;
vgmstream->num_samples = num_samples;
vgmstream->num_streams = total_streams;
vgmstream->num_streams = total_subsongs;
vgmstream->stream_size = stream_size;
vgmstream->meta_type = meta_BINK;
#ifdef VGM_USE_FFMPEG
@@ -58,12 +60,13 @@ fail:
* as they are not in the main header. The header for BINK1 and 2 is the same.
* (a ~3 min movie needs ~6000-7000 frames = fseeks, should be fast enough)
*/
static int bink_get_info(STREAMFILE *streamFile, int * out_total_streams, int * out_channel_count, int * out_sample_rate, int * out_num_samples) {
static int bink_get_info(STREAMFILE *streamFile, int * out_total_subsongs, size_t * out_stream_size, int * out_channel_count, int * out_sample_rate, int * out_num_samples) {
uint32_t *offsets = NULL;
uint32_t num_frames, num_samples_b = 0;
off_t cur_offset;
int i, j, sample_rate, channel_count;
int total_streams, target_stream = streamFile->stream_index;
int total_subsongs, target_subsong = streamFile->stream_index;
size_t stream_size = 0;
size_t filesize = get_streamfile_size(streamFile);
uint32_t signature = (read_32bitBE(0x00,streamFile) & 0xffffff00);
@@ -76,20 +79,20 @@ static int bink_get_info(STREAMFILE *streamFile, int * out_total_streams, int *
if (num_frames == 0 || num_frames > 0x100000) goto fail; /* something must be off (avoids big allocs below) */
/* multichannel/multilanguage audio is usually N streams of stereo/mono, no way to know channel layout */
total_streams = read_32bitLE(0x28,streamFile);
if (target_stream == 0) target_stream = 1;
if (target_stream < 0 || target_stream > total_streams || total_streams < 1 || total_streams > 255) goto fail;
total_subsongs = read_32bitLE(0x28,streamFile);
if (target_subsong == 0) target_subsong = 1;
if (target_subsong < 0 || target_subsong > total_subsongs || total_subsongs < 1 || total_subsongs > 255) goto fail;
/* find stream info and position in offset table */
cur_offset = 0x2c;
if ((signature == 0x42494B00 && (revision == 0x6b)) || /* k */
(signature == 0x4B423200 && (revision == 0x69 || revision == 0x6a || revision == 0x6b))) /* i,j,k */
cur_offset += 0x04; /* unknown v2 header field */
cur_offset += 0x04*total_streams; /* skip streams max packet bytes */
sample_rate = (uint16_t)read_16bitLE(cur_offset+0x04*(target_stream-1)+0x00,streamFile);
channel_count = (uint16_t)read_16bitLE(cur_offset+0x04*(target_stream-1)+0x02,streamFile) & 0x2000 ? 2 : 1; /* stereo flag */
cur_offset += 0x04*total_streams; /* skip streams info */
cur_offset += 0x04*total_streams; /* skip streams ids */
cur_offset += 0x04*total_subsongs; /* skip streams max packet bytes */
sample_rate = (uint16_t)read_16bitLE(cur_offset+0x04*(target_subsong-1)+0x00,streamFile);
channel_count = (uint16_t)read_16bitLE(cur_offset+0x04*(target_subsong-1)+0x02,streamFile) & 0x2000 ? 2 : 1; /* stereo flag */
cur_offset += 0x04*total_subsongs; /* skip streams info */
cur_offset += 0x04*total_subsongs; /* skip streams ids */
/* read frame offsets in a buffer, to avoid fseeking to the table back and forth */
@@ -111,10 +114,11 @@ static int bink_get_info(STREAMFILE *streamFile, int * out_total_streams, int *
cur_offset = offsets[i];
/* read audio packet headers per stream */
for (j=0; j < total_streams; j++) {
for (j=0; j < total_subsongs; j++) {
uint32_t ap_size = read_32bitLE(cur_offset+0x00,streamFile); /* not counting this int */
if (j == target_stream-1) {
if (j == target_subsong-1) {
stream_size += 0x04 + ap_size;
if (ap_size > 0)
num_samples_b += read_32bitLE(cur_offset+0x04,streamFile); /* decoded samples in bytes */
break; /* next frame */
@@ -128,7 +132,8 @@ static int bink_get_info(STREAMFILE *streamFile, int * out_total_streams, int *
free(offsets);
if (out_total_streams) *out_total_streams = total_streams;
if (out_total_subsongs) *out_total_subsongs = total_subsongs;
if (out_stream_size) *out_stream_size = stream_size;
if (out_sample_rate) *out_sample_rate = sample_rate;
if (out_channel_count) *out_channel_count = channel_count;
//todo returns a few more samples (~48) than binkconv.exe?


+ 12
- 7
Frameworks/vgmstream/vgmstream/src/meta/flx.c View File

@@ -7,7 +7,8 @@ VGMSTREAM * init_vgmstream_flx(STREAMFILE *streamFile) {
off_t start_offset, stream_offset = 0;
size_t data_size;
int loop_flag, channel_count, codec;
int total_streams = 0, target_stream = streamFile->stream_index;
int total_subsongs = 0, target_subsong = streamFile->stream_index;
size_t stream_size = 0;
/* check extensions (.flx: name of archive, files inside don't have extensions) */
@@ -24,23 +25,26 @@ VGMSTREAM * init_vgmstream_flx(STREAMFILE *streamFile) {
|| read_32bitLE(0x58,streamFile) != get_streamfile_size(streamFile))
goto fail;
if (target_stream == 0) target_stream = 1;
if (target_subsong == 0) target_subsong = 1;
for (i = 0; i < entries; i++) {
off_t entry_offset = read_32bitLE(offset + 0x00, streamFile);
/* 0x04: stream size */
size_t entry_size = read_32bitLE(offset + 0x04, streamFile);
offset += 0x08;
if (entry_offset != 0x00)
total_streams++; /* many entries are empty */
if (total_streams == target_stream && stream_offset == 0)
total_subsongs++; /* many entries are empty */
if (total_subsongs == target_subsong && stream_offset == 0) {
stream_offset = entry_offset; /* found but let's keep adding total_streams */
stream_size = entry_size;
}
}
if (target_stream < 0 || target_stream > total_streams || total_streams < 1) goto fail;
if (target_subsong < 0 || target_subsong > total_subsongs || total_subsongs < 1) goto fail;
if (stream_offset == 0x00) goto fail;
}
else {
stream_offset = 0x00;
stream_size = get_streamfile_size(streamFile);
}
if (read_32bitLE(stream_offset + 0x30,streamFile) != 0x10)
@@ -57,7 +61,8 @@ VGMSTREAM * init_vgmstream_flx(STREAMFILE *streamFile) {
if (!vgmstream) goto fail;
vgmstream->sample_rate = read_32bitLE(stream_offset + 0x2c,streamFile);
vgmstream->num_streams = total_streams;
vgmstream->num_streams = total_subsongs;
vgmstream->stream_size = stream_size;
vgmstream->meta_type = meta_PC_FLX;
switch(codec) {


+ 191
- 163
Frameworks/vgmstream/vgmstream/src/meta/fsb.c View File

@@ -1,9 +1,6 @@
#include "meta.h"
#include "../coding/coding.h"
#define FAKE_RIFF_BUFFER_SIZE 100
static VGMSTREAM * init_vgmstream_fsb_offset(STREAMFILE *streamFile, off_t offset);
/* ************************************************************************************************************
* FSB defines, copied from the public spec (https://www.fmod.org/questions/question/forum-4928/)
@@ -65,9 +62,7 @@ static VGMSTREAM * init_vgmstream_fsb_offset(STREAMFILE *streamFile, off_t offse
#define FSOUND_CHANNELMODE_MASK (FSOUND_CHANNELMODE_ALLMONO | FSOUND_CHANNELMODE_ALLSTEREO | FSOUND_CHANNELMODE_PROTOOLS)
#define FSOUND_CHANNELMODE_DEFAULT 0x00000000 /* Determine channel assignment automatically from channel count. */
#define FSOUND_CHANNELMODE_RESERVED 0x00000C00
#define FSOUND_NORMAL (FSOUND_16BITS | FSOUND_SIGNED | FSOUND_MONO)
#define FSB_SAMPLE_DATA_ALIGN 32
@@ -75,23 +70,22 @@ static VGMSTREAM * init_vgmstream_fsb_offset(STREAMFILE *streamFile, off_t offse
typedef struct {
/* main header */
uint32_t id;
int32_t numsamples; /* number of samples(streams) in the file */
uint32_t shdrsize; /* size in bytes of all of the sample headers including extended information */
uint32_t datasize; /* size in bytes of compressed sample data */
/* main header: FSB 3/3.1/4 */
uint32_t version; /* extended fsb version */
uint32_t flags; /* flags that apply to all samples(streams) in the fsb */
int32_t total_subsongs;
uint32_t sample_header_size; /* all of the sample headers including extended information */
uint32_t data_size;
uint32_t version; /* extended fsb version (in FSB 3/3.1/4) */
uint32_t flags; /* flags common to all streams (in FSB 3/3.1/4)*/
/* sample header */
uint32_t lengthsamples;
uint32_t lengthcompressedbytes;
uint32_t loopstart;
uint32_t loopend;
uint32_t num_samples;
uint32_t stream_size;
uint32_t loop_start;
uint32_t loop_end;
uint32_t mode;
int32_t deffreq;
uint16_t numchannels;
int32_t sample_rate;
uint16_t channels;
/* extra */
uint32_t hdrsize;
uint32_t shdrsize_min;
uint32_t base_header_size;
uint32_t sample_header_min;
meta_t meta_type;
off_t name_offset;
@@ -102,294 +96,328 @@ typedef struct {
/* FSB4 */
VGMSTREAM * init_vgmstream_fsb(STREAMFILE *streamFile) {
return init_vgmstream_fsb_offset(streamFile, 0x0);
}
/* FSB4 with "\0WAV" Header, found in Deadly Creatures (Wii)
* 16 byte header which holds the filesize
* (unsure if this is from a proper rip) */
VGMSTREAM * init_vgmstream_fsb4_wav(STREAMFILE *streamFile) {
if (read_32bitBE(0x00,streamFile) != 0x00574156) /* "\0WAV" */
return NULL;
return init_vgmstream_fsb_offset(streamFile, 0x10);
}
VGMSTREAM * init_vgmstream_fsb_offset(STREAMFILE *streamFile, off_t offset) {
VGMSTREAM * vgmstream = NULL;
off_t start_offset;
size_t custom_data_offset;
int loop_flag = 0;
int target_stream = streamFile->stream_index;
int target_subsong = streamFile->stream_index;
fsb_header fsb = {0};
fsb_header fsbh;
/* check extensions (.bnk = Hard Corps Uprising PS3) */
if ( !check_extensions(streamFile, "fsb,wii,bnk") )
if ( !check_extensions(streamFile, "fsb,bnk") )
goto fail;
/* check header */
fsbh.id = read_32bitBE(offset+0x00,streamFile);
if (fsbh.id == 0x46534231) { /* "FSB1" (somewhat different from other fsbs) */
fsbh.meta_type = meta_FSB1;
fsbh.hdrsize = 0x10;
fsbh.shdrsize_min = 0x40;
fsb.id = read_32bitBE(0x00,streamFile);
if (fsb.id == 0x46534231) { /* "FSB1" (somewhat different from other fsbs) */
fsb.meta_type = meta_FSB1;
fsb.base_header_size = 0x10;
fsb.sample_header_min = 0x40;
/* main header */
fsbh.numsamples = read_32bitLE(offset+0x04,streamFile);
fsbh.datasize = read_32bitLE(offset+0x08,streamFile);
fsbh.shdrsize = 0x40;
fsbh.version = 0;
fsbh.flags = 0;
fsb.total_subsongs = read_32bitLE(0x04,streamFile);
fsb.data_size = read_32bitLE(0x08,streamFile);
fsb.sample_header_size = 0x40;
fsb.version = 0;
fsb.flags = 0;
if (fsbh.numsamples > 1) goto fail;
if (fsb.total_subsongs > 1) goto fail;
/* sample header (first stream only, not sure if there are multi-FSB1) */
{