Updated VGMStream to r1050-1289-g35cd14fa.
parent
ae22f79bad
commit
66c22b8b74
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -11,7 +11,63 @@
|
|||
8301659A1F256BD000CA0941 /* txth.c in Sources */ = {isa = PBXBuildFile; fileRef = 830165971F256BD000CA0941 /* txth.c */; };
|
||||
8301659B1F256BD000CA0941 /* ea_schl_fixed.c in Sources */ = {isa = PBXBuildFile; fileRef = 830165981F256BD000CA0941 /* ea_schl_fixed.c */; };
|
||||
8301659C1F256BD000CA0941 /* nds_strm_ffta2.c in Sources */ = {isa = PBXBuildFile; fileRef = 830165991F256BD000CA0941 /* nds_strm_ffta2.c */; };
|
||||
830165A21F256BF400CA0941 /* hwas_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 830165A11F256BF400CA0941 /* hwas_blocked.c */; };
|
||||
8306B08420984518000302D4 /* at3plus_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08120984517000302D4 /* at3plus_decoder.c */; };
|
||||
8306B08520984518000302D4 /* yamaha_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08220984517000302D4 /* yamaha_decoder.c */; };
|
||||
8306B08620984518000302D4 /* fadpcm_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08320984517000302D4 /* fadpcm_decoder.c */; };
|
||||
8306B0A220984552000302D4 /* blocked_bdsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0872098454C000302D4 /* blocked_bdsp.c */; };
|
||||
8306B0A320984552000302D4 /* blocked_ast.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0882098454C000302D4 /* blocked_ast.c */; };
|
||||
8306B0A420984552000302D4 /* segmented.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0892098454D000302D4 /* segmented.c */; };
|
||||
8306B0A520984552000302D4 /* blocked_ea_wve_au00.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08A2098454D000302D4 /* blocked_ea_wve_au00.c */; };
|
||||
8306B0A620984552000302D4 /* blocked_ea_wve_ad10.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08B2098454D000302D4 /* blocked_ea_wve_ad10.c */; };
|
||||
8306B0A720984552000302D4 /* blocked_xvas.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08C2098454D000302D4 /* blocked_xvas.c */; };
|
||||
8306B0A820984552000302D4 /* blocked_ps2_iab.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08D2098454D000302D4 /* blocked_ps2_iab.c */; };
|
||||
8306B0A920984552000302D4 /* blocked_adm.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08E2098454E000302D4 /* blocked_adm.c */; };
|
||||
8306B0AA20984552000302D4 /* blocked_sthd.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B08F2098454E000302D4 /* blocked_sthd.c */; };
|
||||
8306B0AB20984552000302D4 /* layered.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0902098454E000302D4 /* layered.c */; };
|
||||
8306B0AC20984552000302D4 /* blocked_xa.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0912098454E000302D4 /* blocked_xa.c */; };
|
||||
8306B0AD20984552000302D4 /* blocked_caf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0922098454E000302D4 /* blocked_caf.c */; };
|
||||
8306B0AE20984552000302D4 /* blocked_filp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0932098454F000302D4 /* blocked_filp.c */; };
|
||||
8306B0AF20984552000302D4 /* blocked_rws.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0942098454F000302D4 /* blocked_rws.c */; };
|
||||
8306B0B020984552000302D4 /* blocked_ps2_strlr.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0952098454F000302D4 /* blocked_ps2_strlr.c */; };
|
||||
8306B0B120984552000302D4 /* blocked_halpst.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0962098454F000302D4 /* blocked_halpst.c */; };
|
||||
8306B0B220984552000302D4 /* blocked_mxch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0972098454F000302D4 /* blocked_mxch.c */; };
|
||||
8306B0B320984552000302D4 /* blocked_thp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B09820984550000302D4 /* blocked_thp.c */; };
|
||||
8306B0B420984552000302D4 /* blocked_tra.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B09920984550000302D4 /* blocked_tra.c */; };
|
||||
8306B0B520984552000302D4 /* blocked_emff.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B09A20984550000302D4 /* blocked_emff.c */; };
|
||||
8306B0B620984552000302D4 /* blocked_hwas.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B09B20984550000302D4 /* blocked_hwas.c */; };
|
||||
8306B0B720984552000302D4 /* blocked_str_snds.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B09C20984550000302D4 /* blocked_str_snds.c */; };
|
||||
8306B0B820984552000302D4 /* blocked_ws_aud.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B09D20984551000302D4 /* blocked_ws_aud.c */; };
|
||||
8306B0B920984552000302D4 /* blocked_matx.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B09E20984551000302D4 /* blocked_matx.c */; };
|
||||
8306B0BA20984552000302D4 /* blocked_wsi.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B09F20984551000302D4 /* blocked_wsi.c */; };
|
||||
8306B0BB20984552000302D4 /* blocked_gsb.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0A020984551000302D4 /* blocked_gsb.c */; };
|
||||
8306B0BC20984552000302D4 /* blocked_vs.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0A120984551000302D4 /* blocked_vs.c */; };
|
||||
8306B0D820984590000302D4 /* ea_eaac_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8306B0BD2098458B000302D4 /* ea_eaac_streamfile.h */; };
|
||||
8306B0D920984590000302D4 /* ngc_str_cauldron.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0BE2098458C000302D4 /* ngc_str_cauldron.c */; };
|
||||
8306B0DA20984590000302D4 /* ea_wve_au00.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0BF2098458C000302D4 /* ea_wve_au00.c */; };
|
||||
8306B0DB20984590000302D4 /* nxap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0C02098458C000302D4 /* nxap.c */; };
|
||||
8306B0DC20984590000302D4 /* sthd.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0C12098458C000302D4 /* sthd.c */; };
|
||||
8306B0DD20984590000302D4 /* waf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0C22098458C000302D4 /* waf.c */; };
|
||||
8306B0DE20984590000302D4 /* awc_xma_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8306B0C32098458C000302D4 /* awc_xma_streamfile.h */; };
|
||||
8306B0DF20984590000302D4 /* ea_wve_ad10.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0C42098458D000302D4 /* ea_wve_ad10.c */; };
|
||||
8306B0E020984590000302D4 /* ppst_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8306B0C52098458D000302D4 /* ppst_streamfile.h */; };
|
||||
8306B0E120984590000302D4 /* ubi_lyn_ogg_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8306B0C62098458D000302D4 /* ubi_lyn_ogg_streamfile.h */; };
|
||||
8306B0E220984590000302D4 /* smv.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0C72098458D000302D4 /* smv.c */; };
|
||||
8306B0E320984590000302D4 /* aax_utf.h in Headers */ = {isa = PBXBuildFile; fileRef = 8306B0C82098458D000302D4 /* aax_utf.h */; };
|
||||
8306B0E420984590000302D4 /* wave.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0C92098458E000302D4 /* wave.c */; };
|
||||
8306B0E520984590000302D4 /* ubi_lyn.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0CA2098458E000302D4 /* ubi_lyn.c */; };
|
||||
8306B0E620984590000302D4 /* msb_msh.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0CB2098458E000302D4 /* msb_msh.c */; };
|
||||
8306B0E720984590000302D4 /* opus_ppp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0CC2098458E000302D4 /* opus_ppp.c */; };
|
||||
8306B0E820984590000302D4 /* opus_interleave_streamfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8306B0CD2098458E000302D4 /* opus_interleave_streamfile.h */; };
|
||||
8306B0E920984590000302D4 /* opus.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0CE2098458E000302D4 /* opus.c */; };
|
||||
8306B0EA20984590000302D4 /* caf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0CF2098458F000302D4 /* caf.c */; };
|
||||
8306B0EB20984590000302D4 /* wave_segmented.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0D02098458F000302D4 /* wave_segmented.c */; };
|
||||
8306B0EC20984590000302D4 /* pcm_sre.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0D12098458F000302D4 /* pcm_sre.c */; };
|
||||
8306B0ED20984590000302D4 /* txtp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0D22098458F000302D4 /* txtp.c */; };
|
||||
8306B0EE20984590000302D4 /* smc_smh.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0D32098458F000302D4 /* smc_smh.c */; };
|
||||
8306B0EF20984590000302D4 /* ubi_bao.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0D420984590000302D4 /* ubi_bao.c */; };
|
||||
8306B0F020984590000302D4 /* atsl.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0D520984590000302D4 /* atsl.c */; };
|
||||
8306B0F120984590000302D4 /* ppst.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0D620984590000302D4 /* ppst.c */; };
|
||||
8306B0F220984590000302D4 /* ubi_jade.c in Sources */ = {isa = PBXBuildFile; fileRef = 8306B0D720984590000302D4 /* ubi_jade.c */; };
|
||||
830EBE102004655D0023AA10 /* atrac9_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 830EBE0F2004655D0023AA10 /* atrac9_decoder.c */; };
|
||||
830EBE132004656E0023AA10 /* xnb.c in Sources */ = {isa = PBXBuildFile; fileRef = 830EBE112004656E0023AA10 /* xnb.c */; };
|
||||
830EBE142004656E0023AA10 /* ktss.c in Sources */ = {isa = PBXBuildFile; fileRef = 830EBE122004656E0023AA10 /* ktss.c */; };
|
||||
|
@ -39,7 +95,6 @@
|
|||
83345A4A1F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c in Sources */ = {isa = PBXBuildFile; fileRef = 83345A491F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c */; };
|
||||
83345A4F1F8AEB2800B2EAA4 /* nub_xma.c in Sources */ = {isa = PBXBuildFile; fileRef = 83345A4B1F8AEB2700B2EAA4 /* nub_xma.c */; };
|
||||
83345A501F8AEB2800B2EAA4 /* pc_al2.c in Sources */ = {isa = PBXBuildFile; fileRef = 83345A4C1F8AEB2700B2EAA4 /* pc_al2.c */; };
|
||||
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 */; };
|
||||
|
@ -72,7 +127,6 @@
|
|||
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 */; };
|
||||
|
@ -84,8 +138,6 @@
|
|||
836F6F1E18BDC2190095E648 /* acm_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DE018BDC2180095E648 /* acm_decoder.c */; };
|
||||
836F6F1F18BDC2190095E648 /* acm_decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 836F6DE118BDC2180095E648 /* acm_decoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
836F6F2018BDC2190095E648 /* adx_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DE218BDC2180095E648 /* adx_decoder.c */; };
|
||||
836F6F2118BDC2190095E648 /* aica_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DE318BDC2180095E648 /* aica_decoder.c */; };
|
||||
836F6F2218BDC2190095E648 /* at3_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DE418BDC2180095E648 /* at3_decoder.c */; };
|
||||
836F6F2318BDC2190095E648 /* coding.h in Headers */ = {isa = PBXBuildFile; fileRef = 836F6DE518BDC2180095E648 /* coding.h */; };
|
||||
836F6F2518BDC2190095E648 /* g721_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DE718BDC2180095E648 /* g721_decoder.c */; };
|
||||
836F6F2618BDC2190095E648 /* g7221_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DE818BDC2180095E648 /* g7221_decoder.c */; };
|
||||
|
@ -110,34 +162,11 @@
|
|||
836F6F3A18BDC2190095E648 /* sdx2_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DFC18BDC2180095E648 /* sdx2_decoder.c */; };
|
||||
836F6F3B18BDC2190095E648 /* ws_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DFD18BDC2180095E648 /* ws_decoder.c */; };
|
||||
836F6F3C18BDC2190095E648 /* xa_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6DFE18BDC2180095E648 /* xa_decoder.c */; };
|
||||
836F6F3D18BDC2190095E648 /* aax_layout.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0018BDC2180095E648 /* aax_layout.c */; };
|
||||
836F6F3E18BDC2190095E648 /* aix_layout.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0118BDC2180095E648 /* aix_layout.c */; };
|
||||
836F6F3F18BDC2190095E648 /* ast_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E0218BDC2180095E648 /* ast_blocked.c */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
836F6F5118BDC2190095E648 /* nolayout.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1418BDC2180095E648 /* nolayout.c */; };
|
||||
836F6F5218BDC2190095E648 /* ps2_adm_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1518BDC2180095E648 /* ps2_adm_blocked.c */; };
|
||||
836F6F5318BDC2190095E648 /* ps2_iab_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1618BDC2180095E648 /* ps2_iab_blocked.c */; };
|
||||
836F6F5418BDC2190095E648 /* ps2_strlr_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1718BDC2180095E648 /* ps2_strlr_blocked.c */; };
|
||||
836F6F5618BDC2190095E648 /* scd_int_layout.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1918BDC2180095E648 /* scd_int_layout.c */; };
|
||||
836F6F5718BDC2190095E648 /* str_snds_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1A18BDC2180095E648 /* str_snds_blocked.c */; };
|
||||
836F6F5818BDC2190095E648 /* thp_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1B18BDC2180095E648 /* thp_blocked.c */; };
|
||||
836F6F5918BDC2190095E648 /* tra_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1C18BDC2180095E648 /* tra_blocked.c */; };
|
||||
836F6F5A18BDC2190095E648 /* vs_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1D18BDC2180095E648 /* vs_blocked.c */; };
|
||||
836F6F5B18BDC2190095E648 /* ws_aud_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1E18BDC2180095E648 /* ws_aud_blocked.c */; };
|
||||
836F6F5C18BDC2190095E648 /* wsi_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E1F18BDC2180095E648 /* wsi_blocked.c */; };
|
||||
836F6F5D18BDC2190095E648 /* xa_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2018BDC2180095E648 /* xa_blocked.c */; };
|
||||
836F6F5E18BDC2190095E648 /* xvas_block.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2118BDC2180095E648 /* xvas_block.c */; };
|
||||
836F6F6518BDC2190095E648 /* 2dx9.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2918BDC2180095E648 /* 2dx9.c */; };
|
||||
836F6F6618BDC2190095E648 /* aax.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2A18BDC2180095E648 /* aax.c */; };
|
||||
836F6F6718BDC2190095E648 /* acm.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E2B18BDC2180095E648 /* acm.c */; };
|
||||
|
@ -202,8 +231,6 @@
|
|||
836F6FA818BDC2190095E648 /* nds_swav.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E6C18BDC2180095E648 /* nds_swav.c */; };
|
||||
836F6FA918BDC2190095E648 /* ngc_adpdtk.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E6D18BDC2180095E648 /* ngc_adpdtk.c */; };
|
||||
836F6FAA18BDC2190095E648 /* ngc_bh2pcm.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E6E18BDC2180095E648 /* ngc_bh2pcm.c */; };
|
||||
836F6FAB18BDC2190095E648 /* ngc_bo2.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E6F18BDC2180095E648 /* ngc_bo2.c */; };
|
||||
836F6FAC18BDC2190095E648 /* ngc_caf.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E7018BDC2180095E648 /* ngc_caf.c */; };
|
||||
836F6FAD18BDC2190095E648 /* ngc_dsp_konami.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E7118BDC2180095E648 /* ngc_dsp_konami.c */; };
|
||||
836F6FAE18BDC2190095E648 /* ngc_dsp_mpds.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E7218BDC2180095E648 /* ngc_dsp_mpds.c */; };
|
||||
836F6FAF18BDC2190095E648 /* ngc_dsp_std.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6E7318BDC2180095E648 /* ngc_dsp_std.c */; };
|
||||
|
@ -265,7 +292,6 @@
|
|||
836F6FEE18BDC2190095E648 /* ps2_p2bt.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EB218BDC2180095E648 /* ps2_p2bt.c */; };
|
||||
836F6FEF18BDC2190095E648 /* ps2_pnb.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EB318BDC2180095E648 /* ps2_pnb.c */; };
|
||||
836F6FF018BDC2190095E648 /* ps2_psh.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EB418BDC2180095E648 /* ps2_psh.c */; };
|
||||
836F6FF118BDC2190095E648 /* ps2_psw.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EB518BDC2180095E648 /* ps2_psw.c */; };
|
||||
836F6FF218BDC2190095E648 /* ps2_rnd.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EB618BDC2180095E648 /* ps2_rnd.c */; };
|
||||
836F6FF318BDC2190095E648 /* ps2_rstm.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EB718BDC2180095E648 /* ps2_rstm.c */; };
|
||||
836F6FF418BDC2190095E648 /* rws.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6EB818BDC2180095E648 /* rws.c */; };
|
||||
|
@ -348,7 +374,6 @@
|
|||
836F704A18BDC2190095E648 /* xbox_wavm.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6F0E18BDC2190095E648 /* xbox_wavm.c */; };
|
||||
836F704B18BDC2190095E648 /* xbox_xmu.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6F0F18BDC2190095E648 /* xbox_xmu.c */; };
|
||||
836F704C18BDC2190095E648 /* xbox_xvas.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6F1018BDC2190095E648 /* xbox_xvas.c */; };
|
||||
836F704D18BDC2190095E648 /* xbox_xwav.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6F1118BDC2190095E648 /* xbox_xwav.c */; };
|
||||
836F704E18BDC2190095E648 /* xss.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6F1218BDC2190095E648 /* xss.c */; };
|
||||
836F704F18BDC2190095E648 /* xwb.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6F1318BDC2190095E648 /* xwb.c */; };
|
||||
836F705018BDC2190095E648 /* ydsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 836F6F1418BDC2190095E648 /* ydsp.c */; };
|
||||
|
@ -366,7 +391,6 @@
|
|||
83709E071ECBC1A4005C03D3 /* mss.c in Sources */ = {isa = PBXBuildFile; fileRef = 83709E011ECBC1A4005C03D3 /* mss.c */; };
|
||||
83709E081ECBC1A4005C03D3 /* ps2_rxws.c in Sources */ = {isa = PBXBuildFile; fileRef = 83709E021ECBC1A4005C03D3 /* ps2_rxws.c */; };
|
||||
83709E091ECBC1A4005C03D3 /* ta_aac.c in Sources */ = {isa = PBXBuildFile; fileRef = 83709E031ECBC1A4005C03D3 /* ta_aac.c */; };
|
||||
83709E0A1ECBC1A4005C03D3 /* waa_wac_wad_wam.c in Sources */ = {isa = PBXBuildFile; fileRef = 83709E041ECBC1A4005C03D3 /* waa_wac_wad_wam.c */; };
|
||||
83709E0D1ECBC1C3005C03D3 /* mc3_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 83709E0B1ECBC1C3005C03D3 /* mc3_decoder.c */; };
|
||||
83709E0E1ECBC1C3005C03D3 /* psv_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 83709E0C1ECBC1C3005C03D3 /* psv_decoder.c */; };
|
||||
8374EE3E1F787AB600033E90 /* ffmpeg_decoder_utils_ea_xma.c in Sources */ = {isa = PBXBuildFile; fileRef = 8374EE361F787AB500033E90 /* ffmpeg_decoder_utils_ea_xma.c */; };
|
||||
|
@ -388,7 +412,6 @@
|
|||
838BDB7D1D3B1FCC0022CA6F /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 838BDB7C1D3B1FCC0022CA6F /* CoreVideo.framework */; };
|
||||
838BDB7F1D3B1FD10022CA6F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 838BDB7E1D3B1FD10022CA6F /* Cocoa.framework */; };
|
||||
839B54521EEE1D9600048A2D /* ngc_ulw.c in Sources */ = {isa = PBXBuildFile; fileRef = 831BD11F1EEE1CF200198540 /* ngc_ulw.c */; };
|
||||
839B54571EEE1DA000048A2D /* rws_blocked.c in Sources */ = {isa = PBXBuildFile; fileRef = 831BD1201EEE1D2A00198540 /* rws_blocked.c */; };
|
||||
839E21E01F2EDAF100EE54D7 /* vorbis_custom_data_fsb.h in Headers */ = {isa = PBXBuildFile; fileRef = 839E21D61F2EDAF000EE54D7 /* vorbis_custom_data_fsb.h */; };
|
||||
839E21E11F2EDAF100EE54D7 /* vorbis_custom_decoder.c in Sources */ = {isa = PBXBuildFile; fileRef = 839E21D71F2EDAF000EE54D7 /* vorbis_custom_decoder.c */; };
|
||||
839E21E21F2EDAF100EE54D7 /* vorbis_custom_utils_wwise.c in Sources */ = {isa = PBXBuildFile; fileRef = 839E21D81F2EDAF000EE54D7 /* vorbis_custom_utils_wwise.c */; };
|
||||
|
@ -405,7 +428,6 @@
|
|||
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 */; };
|
||||
|
@ -572,7 +594,63 @@
|
|||
830165971F256BD000CA0941 /* txth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = txth.c; sourceTree = "<group>"; };
|
||||
830165981F256BD000CA0941 /* ea_schl_fixed.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_schl_fixed.c; sourceTree = "<group>"; };
|
||||
830165991F256BD000CA0941 /* nds_strm_ffta2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nds_strm_ffta2.c; sourceTree = "<group>"; };
|
||||
830165A11F256BF400CA0941 /* hwas_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hwas_blocked.c; sourceTree = "<group>"; };
|
||||
8306B08120984517000302D4 /* at3plus_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = at3plus_decoder.c; sourceTree = "<group>"; };
|
||||
8306B08220984517000302D4 /* yamaha_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yamaha_decoder.c; sourceTree = "<group>"; };
|
||||
8306B08320984517000302D4 /* fadpcm_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fadpcm_decoder.c; sourceTree = "<group>"; };
|
||||
8306B0872098454C000302D4 /* blocked_bdsp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_bdsp.c; sourceTree = "<group>"; };
|
||||
8306B0882098454C000302D4 /* blocked_ast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ast.c; sourceTree = "<group>"; };
|
||||
8306B0892098454D000302D4 /* segmented.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = segmented.c; sourceTree = "<group>"; };
|
||||
8306B08A2098454D000302D4 /* blocked_ea_wve_au00.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ea_wve_au00.c; sourceTree = "<group>"; };
|
||||
8306B08B2098454D000302D4 /* blocked_ea_wve_ad10.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ea_wve_ad10.c; sourceTree = "<group>"; };
|
||||
8306B08C2098454D000302D4 /* blocked_xvas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_xvas.c; sourceTree = "<group>"; };
|
||||
8306B08D2098454D000302D4 /* blocked_ps2_iab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ps2_iab.c; sourceTree = "<group>"; };
|
||||
8306B08E2098454E000302D4 /* blocked_adm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_adm.c; sourceTree = "<group>"; };
|
||||
8306B08F2098454E000302D4 /* blocked_sthd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_sthd.c; sourceTree = "<group>"; };
|
||||
8306B0902098454E000302D4 /* layered.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = layered.c; sourceTree = "<group>"; };
|
||||
8306B0912098454E000302D4 /* blocked_xa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_xa.c; sourceTree = "<group>"; };
|
||||
8306B0922098454E000302D4 /* blocked_caf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_caf.c; sourceTree = "<group>"; };
|
||||
8306B0932098454F000302D4 /* blocked_filp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_filp.c; sourceTree = "<group>"; };
|
||||
8306B0942098454F000302D4 /* blocked_rws.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_rws.c; sourceTree = "<group>"; };
|
||||
8306B0952098454F000302D4 /* blocked_ps2_strlr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ps2_strlr.c; sourceTree = "<group>"; };
|
||||
8306B0962098454F000302D4 /* blocked_halpst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_halpst.c; sourceTree = "<group>"; };
|
||||
8306B0972098454F000302D4 /* blocked_mxch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_mxch.c; sourceTree = "<group>"; };
|
||||
8306B09820984550000302D4 /* blocked_thp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_thp.c; sourceTree = "<group>"; };
|
||||
8306B09920984550000302D4 /* blocked_tra.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_tra.c; sourceTree = "<group>"; };
|
||||
8306B09A20984550000302D4 /* blocked_emff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_emff.c; sourceTree = "<group>"; };
|
||||
8306B09B20984550000302D4 /* blocked_hwas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_hwas.c; sourceTree = "<group>"; };
|
||||
8306B09C20984550000302D4 /* blocked_str_snds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_str_snds.c; sourceTree = "<group>"; };
|
||||
8306B09D20984551000302D4 /* blocked_ws_aud.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_ws_aud.c; sourceTree = "<group>"; };
|
||||
8306B09E20984551000302D4 /* blocked_matx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_matx.c; sourceTree = "<group>"; };
|
||||
8306B09F20984551000302D4 /* blocked_wsi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_wsi.c; sourceTree = "<group>"; };
|
||||
8306B0A020984551000302D4 /* blocked_gsb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_gsb.c; sourceTree = "<group>"; };
|
||||
8306B0A120984551000302D4 /* blocked_vs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocked_vs.c; sourceTree = "<group>"; };
|
||||
8306B0BD2098458B000302D4 /* ea_eaac_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ea_eaac_streamfile.h; sourceTree = "<group>"; };
|
||||
8306B0BE2098458C000302D4 /* ngc_str_cauldron.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_str_cauldron.c; sourceTree = "<group>"; };
|
||||
8306B0BF2098458C000302D4 /* ea_wve_au00.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_wve_au00.c; sourceTree = "<group>"; };
|
||||
8306B0C02098458C000302D4 /* nxap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nxap.c; sourceTree = "<group>"; };
|
||||
8306B0C12098458C000302D4 /* sthd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sthd.c; sourceTree = "<group>"; };
|
||||
8306B0C22098458C000302D4 /* waf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = waf.c; sourceTree = "<group>"; };
|
||||
8306B0C32098458C000302D4 /* awc_xma_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = awc_xma_streamfile.h; sourceTree = "<group>"; };
|
||||
8306B0C42098458D000302D4 /* ea_wve_ad10.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ea_wve_ad10.c; sourceTree = "<group>"; };
|
||||
8306B0C52098458D000302D4 /* ppst_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ppst_streamfile.h; sourceTree = "<group>"; };
|
||||
8306B0C62098458D000302D4 /* ubi_lyn_ogg_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ubi_lyn_ogg_streamfile.h; sourceTree = "<group>"; };
|
||||
8306B0C72098458D000302D4 /* smv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = smv.c; sourceTree = "<group>"; };
|
||||
8306B0C82098458D000302D4 /* aax_utf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aax_utf.h; sourceTree = "<group>"; };
|
||||
8306B0C92098458E000302D4 /* wave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wave.c; sourceTree = "<group>"; };
|
||||
8306B0CA2098458E000302D4 /* ubi_lyn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ubi_lyn.c; sourceTree = "<group>"; };
|
||||
8306B0CB2098458E000302D4 /* msb_msh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = msb_msh.c; sourceTree = "<group>"; };
|
||||
8306B0CC2098458E000302D4 /* opus_ppp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = opus_ppp.c; sourceTree = "<group>"; };
|
||||
8306B0CD2098458E000302D4 /* opus_interleave_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opus_interleave_streamfile.h; sourceTree = "<group>"; };
|
||||
8306B0CE2098458E000302D4 /* opus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = opus.c; sourceTree = "<group>"; };
|
||||
8306B0CF2098458F000302D4 /* caf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = caf.c; sourceTree = "<group>"; };
|
||||
8306B0D02098458F000302D4 /* wave_segmented.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wave_segmented.c; sourceTree = "<group>"; };
|
||||
8306B0D12098458F000302D4 /* pcm_sre.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcm_sre.c; sourceTree = "<group>"; };
|
||||
8306B0D22098458F000302D4 /* txtp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = txtp.c; sourceTree = "<group>"; };
|
||||
8306B0D32098458F000302D4 /* smc_smh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = smc_smh.c; sourceTree = "<group>"; };
|
||||
8306B0D420984590000302D4 /* ubi_bao.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ubi_bao.c; sourceTree = "<group>"; };
|
||||
8306B0D520984590000302D4 /* atsl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atsl.c; sourceTree = "<group>"; };
|
||||
8306B0D620984590000302D4 /* ppst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ppst.c; sourceTree = "<group>"; };
|
||||
8306B0D720984590000302D4 /* ubi_jade.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ubi_jade.c; sourceTree = "<group>"; };
|
||||
830EBD9220045F190023AA10 /* libatrac9.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libatrac9.xcodeproj; path = ../libatrac9/libatrac9.xcodeproj; sourceTree = "<group>"; };
|
||||
830EBE0F2004655D0023AA10 /* atrac9_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atrac9_decoder.c; sourceTree = "<group>"; };
|
||||
830EBE112004656E0023AA10 /* xnb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xnb.c; sourceTree = "<group>"; };
|
||||
|
@ -589,7 +667,6 @@
|
|||
831BA6171EAC61A500CF89B0 /* x360_pasx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = x360_pasx.c; sourceTree = "<group>"; };
|
||||
831BA6221EAC61CB00CF89B0 /* coding_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = coding_utils.c; sourceTree = "<group>"; };
|
||||
831BD11F1EEE1CF200198540 /* ngc_ulw.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ngc_ulw.c; sourceTree = "<group>"; };
|
||||
831BD1201EEE1D2A00198540 /* rws_blocked.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = rws_blocked.c; sourceTree = "<group>"; };
|
||||
832389481D22419B00482226 /* clHCA.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = clHCA.c; sourceTree = "<group>"; };
|
||||
832389491D22419B00482226 /* clHCA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clHCA.h; sourceTree = "<group>"; };
|
||||
8323894F1D2246C300482226 /* hca.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hca.c; sourceTree = "<group>"; };
|
||||
|
@ -599,7 +676,6 @@
|
|||
83345A491F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffmpeg_decoder_utils_switch_opus.c; sourceTree = "<group>"; };
|
||||
83345A4B1F8AEB2700B2EAA4 /* nub_xma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nub_xma.c; sourceTree = "<group>"; };
|
||||
83345A4C1F8AEB2700B2EAA4 /* pc_al2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pc_al2.c; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
|
@ -632,7 +708,6 @@
|
|||
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>"; };
|
||||
|
@ -646,8 +721,6 @@
|
|||
836F6DE018BDC2180095E648 /* acm_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = acm_decoder.c; sourceTree = "<group>"; };
|
||||
836F6DE118BDC2180095E648 /* acm_decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acm_decoder.h; sourceTree = "<group>"; };
|
||||
836F6DE218BDC2180095E648 /* adx_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = adx_decoder.c; sourceTree = "<group>"; };
|
||||
836F6DE318BDC2180095E648 /* aica_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aica_decoder.c; sourceTree = "<group>"; };
|
||||
836F6DE418BDC2180095E648 /* at3_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = at3_decoder.c; sourceTree = "<group>"; };
|
||||
836F6DE518BDC2180095E648 /* coding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coding.h; sourceTree = "<group>"; };
|
||||
836F6DE718BDC2180095E648 /* g721_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = g721_decoder.c; sourceTree = "<group>"; };
|
||||
836F6DE818BDC2180095E648 /* g7221_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = g7221_decoder.c; sourceTree = "<group>"; };
|
||||
|
@ -672,34 +745,11 @@
|
|||
836F6DFC18BDC2180095E648 /* sdx2_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sdx2_decoder.c; sourceTree = "<group>"; };
|
||||
836F6DFD18BDC2180095E648 /* ws_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ws_decoder.c; sourceTree = "<group>"; };
|
||||
836F6DFE18BDC2180095E648 /* xa_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xa_decoder.c; sourceTree = "<group>"; };
|
||||
836F6E0018BDC2180095E648 /* aax_layout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aax_layout.c; sourceTree = "<group>"; };
|
||||
836F6E0118BDC2180095E648 /* aix_layout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aix_layout.c; sourceTree = "<group>"; };
|
||||
836F6E0218BDC2180095E648 /* ast_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ast_blocked.c; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
836F6E1418BDC2180095E648 /* nolayout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nolayout.c; sourceTree = "<group>"; };
|
||||
836F6E1518BDC2180095E648 /* ps2_adm_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_adm_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E1618BDC2180095E648 /* ps2_iab_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_iab_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E1718BDC2180095E648 /* ps2_strlr_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_strlr_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E1918BDC2180095E648 /* scd_int_layout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scd_int_layout.c; sourceTree = "<group>"; };
|
||||
836F6E1A18BDC2180095E648 /* str_snds_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = str_snds_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E1B18BDC2180095E648 /* thp_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = thp_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E1C18BDC2180095E648 /* tra_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tra_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E1D18BDC2180095E648 /* vs_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vs_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E1E18BDC2180095E648 /* ws_aud_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ws_aud_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E1F18BDC2180095E648 /* wsi_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wsi_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E2018BDC2180095E648 /* xa_blocked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xa_blocked.c; sourceTree = "<group>"; };
|
||||
836F6E2118BDC2180095E648 /* xvas_block.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xvas_block.c; sourceTree = "<group>"; };
|
||||
836F6E2918BDC2180095E648 /* 2dx9.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = 2dx9.c; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
|
@ -764,8 +814,6 @@
|
|||
836F6E6C18BDC2180095E648 /* nds_swav.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nds_swav.c; sourceTree = "<group>"; };
|
||||
836F6E6D18BDC2180095E648 /* ngc_adpdtk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_adpdtk.c; sourceTree = "<group>"; };
|
||||
836F6E6E18BDC2180095E648 /* ngc_bh2pcm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_bh2pcm.c; sourceTree = "<group>"; };
|
||||
836F6E6F18BDC2180095E648 /* ngc_bo2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_bo2.c; sourceTree = "<group>"; };
|
||||
836F6E7018BDC2180095E648 /* ngc_caf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_caf.c; sourceTree = "<group>"; };
|
||||
836F6E7118BDC2180095E648 /* ngc_dsp_konami.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_dsp_konami.c; sourceTree = "<group>"; };
|
||||
836F6E7218BDC2180095E648 /* ngc_dsp_mpds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_dsp_mpds.c; sourceTree = "<group>"; };
|
||||
836F6E7318BDC2180095E648 /* ngc_dsp_std.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ngc_dsp_std.c; sourceTree = "<group>"; };
|
||||
|
@ -827,7 +875,6 @@
|
|||
836F6EB218BDC2180095E648 /* ps2_p2bt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_p2bt.c; sourceTree = "<group>"; };
|
||||
836F6EB318BDC2180095E648 /* ps2_pnb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_pnb.c; sourceTree = "<group>"; };
|
||||
836F6EB418BDC2180095E648 /* ps2_psh.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_psh.c; sourceTree = "<group>"; };
|
||||
836F6EB518BDC2180095E648 /* ps2_psw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_psw.c; sourceTree = "<group>"; };
|
||||
836F6EB618BDC2180095E648 /* ps2_rnd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_rnd.c; sourceTree = "<group>"; };
|
||||
836F6EB718BDC2180095E648 /* ps2_rstm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_rstm.c; sourceTree = "<group>"; };
|
||||
836F6EB818BDC2180095E648 /* rws.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rws.c; sourceTree = "<group>"; };
|
||||
|
@ -910,7 +957,6 @@
|
|||
836F6F0E18BDC2190095E648 /* xbox_wavm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xbox_wavm.c; sourceTree = "<group>"; };
|
||||
836F6F0F18BDC2190095E648 /* xbox_xmu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xbox_xmu.c; sourceTree = "<group>"; };
|
||||
836F6F1018BDC2190095E648 /* xbox_xvas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xbox_xvas.c; sourceTree = "<group>"; };
|
||||
836F6F1118BDC2190095E648 /* xbox_xwav.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xbox_xwav.c; sourceTree = "<group>"; };
|
||||
836F6F1218BDC2190095E648 /* xss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xss.c; sourceTree = "<group>"; };
|
||||
836F6F1318BDC2190095E648 /* xwb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xwb.c; sourceTree = "<group>"; };
|
||||
836F6F1418BDC2190095E648 /* ydsp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ydsp.c; sourceTree = "<group>"; };
|
||||
|
@ -928,7 +974,6 @@
|
|||
83709E011ECBC1A4005C03D3 /* mss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mss.c; sourceTree = "<group>"; };
|
||||
83709E021ECBC1A4005C03D3 /* ps2_rxws.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ps2_rxws.c; sourceTree = "<group>"; };
|
||||
83709E031ECBC1A4005C03D3 /* ta_aac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ta_aac.c; sourceTree = "<group>"; };
|
||||
83709E041ECBC1A4005C03D3 /* waa_wac_wad_wam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = waa_wac_wad_wam.c; sourceTree = "<group>"; };
|
||||
83709E0B1ECBC1C3005C03D3 /* mc3_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mc3_decoder.c; sourceTree = "<group>"; };
|
||||
83709E0C1ECBC1C3005C03D3 /* psv_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psv_decoder.c; sourceTree = "<group>"; };
|
||||
8374EE361F787AB500033E90 /* ffmpeg_decoder_utils_ea_xma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffmpeg_decoder_utils_ea_xma.c; sourceTree = "<group>"; };
|
||||
|
@ -965,7 +1010,6 @@
|
|||
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>"; };
|
||||
|
@ -1153,14 +1197,14 @@
|
|||
836F6DE018BDC2180095E648 /* acm_decoder.c */,
|
||||
836F6DE118BDC2180095E648 /* acm_decoder.h */,
|
||||
836F6DE218BDC2180095E648 /* adx_decoder.c */,
|
||||
836F6DE318BDC2180095E648 /* aica_decoder.c */,
|
||||
836F6DE418BDC2180095E648 /* at3_decoder.c */,
|
||||
8306B08120984517000302D4 /* at3plus_decoder.c */,
|
||||
830EBE0F2004655D0023AA10 /* atrac9_decoder.c */,
|
||||
831BA6221EAC61CB00CF89B0 /* coding_utils.c */,
|
||||
836F6DE518BDC2180095E648 /* coding.h */,
|
||||
8349A8DE1FE6251F00E26435 /* ea_mt_decoder.c */,
|
||||
83AA5D0E1F6E2F5F0020821C /* ea_xa_decoder.c */,
|
||||
83AA5D151F6E2F600020821C /* ea_xas_decoder.c */,
|
||||
8306B08320984517000302D4 /* fadpcm_decoder.c */,
|
||||
8374EE361F787AB500033E90 /* ffmpeg_decoder_utils_ea_xma.c */,
|
||||
83345A491F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c */,
|
||||
8374EE3D1F787AB600033E90 /* ffmpeg_decoder_utils.c */,
|
||||
|
@ -1208,6 +1252,7 @@
|
|||
839E21D81F2EDAF000EE54D7 /* vorbis_custom_utils_wwise.c */,
|
||||
836F6DFD18BDC2180095E648 /* ws_decoder.c */,
|
||||
836F6DFE18BDC2180095E648 /* xa_decoder.c */,
|
||||
8306B08220984517000302D4 /* yamaha_decoder.c */,
|
||||
);
|
||||
path = coding;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1215,46 +1260,48 @@
|
|||
836F6DFF18BDC2180095E648 /* layout */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
836F6E0018BDC2180095E648 /* aax_layout.c */,
|
||||
836F6E0118BDC2180095E648 /* aix_layout.c */,
|
||||
836F6E0218BDC2180095E648 /* ast_blocked.c */,
|
||||
836F6E0318BDC2180095E648 /* bdsp_blocked.c */,
|
||||
8306B08E2098454E000302D4 /* blocked_adm.c */,
|
||||
8306B0882098454C000302D4 /* blocked_ast.c */,
|
||||
83AA5D1B1F6E2F7F0020821C /* blocked_awc.c */,
|
||||
8306B0872098454C000302D4 /* blocked_bdsp.c */,
|
||||
8306B0922098454E000302D4 /* blocked_caf.c */,
|
||||
8349A8E21FE6253800E26435 /* blocked_dec.c */,
|
||||
8349A8E31FE6253800E26435 /* blocked_ea_1snh.c */,
|
||||
8349A8E41FE6253800E26435 /* blocked_ea_schl.c */,
|
||||
8349A8E71FE6253900E26435 /* blocked_ea_sns.c */,
|
||||
83EED5D5203A8BD7008BEB45 /* blocked_ea_swvr.c */,
|
||||
8306B08B2098454D000302D4 /* blocked_ea_wve_ad10.c */,
|
||||
8306B08A2098454D000302D4 /* blocked_ea_wve_au00.c */,
|
||||
8306B09A20984550000302D4 /* blocked_emff.c */,
|
||||
8306B0932098454F000302D4 /* blocked_filp.c */,
|
||||
8306B0A020984551000302D4 /* blocked_gsb.c */,
|
||||
8306B0962098454F000302D4 /* blocked_halpst.c */,
|
||||
8306B09B20984550000302D4 /* blocked_hwas.c */,
|
||||
8349A8E51FE6253800E26435 /* blocked_ivaud.c */,
|
||||
8306B09E20984551000302D4 /* blocked_matx.c */,
|
||||
8306B0972098454F000302D4 /* blocked_mxch.c */,
|
||||
8306B08D2098454D000302D4 /* blocked_ps2_iab.c */,
|
||||
8306B0952098454F000302D4 /* blocked_ps2_strlr.c */,
|
||||
8306B0942098454F000302D4 /* blocked_rws.c */,
|
||||
8306B08F2098454E000302D4 /* blocked_sthd.c */,
|
||||
8306B09C20984550000302D4 /* blocked_str_snds.c */,
|
||||
8306B09820984550000302D4 /* blocked_thp.c */,
|
||||
8306B09920984550000302D4 /* blocked_tra.c */,
|
||||
8349A8E61FE6253900E26435 /* blocked_vawx.c */,
|
||||
83AA5D1A1F6E2F7F0020821C /* blocked_vgs.c */,
|
||||
8306B0A120984551000302D4 /* blocked_vs.c */,
|
||||
8306B09D20984551000302D4 /* blocked_ws_aud.c */,
|
||||
8306B09F20984551000302D4 /* blocked_wsi.c */,
|
||||
8306B0912098454E000302D4 /* blocked_xa.c */,
|
||||
83A21F7A201D895B000F04B9 /* blocked_xvag.c */,
|
||||
8306B08C2098454D000302D4 /* blocked_xvas.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 */,
|
||||
8306B0902098454E000302D4 /* layered.c */,
|
||||
836F6E1018BDC2180095E648 /* layout.h */,
|
||||
836F6E1218BDC2180095E648 /* mus_acm_layout.c */,
|
||||
836F6E1318BDC2180095E648 /* mxch_blocked.c */,
|
||||
836F6E1418BDC2180095E648 /* nolayout.c */,
|
||||
836F6E1518BDC2180095E648 /* ps2_adm_blocked.c */,
|
||||
836F6E1618BDC2180095E648 /* ps2_iab_blocked.c */,
|
||||
836F6E1718BDC2180095E648 /* ps2_strlr_blocked.c */,
|
||||
831BD1201EEE1D2A00198540 /* rws_blocked.c */,
|
||||
836F6E1918BDC2180095E648 /* scd_int_layout.c */,
|
||||
836F6E1A18BDC2180095E648 /* str_snds_blocked.c */,
|
||||
836F6E1B18BDC2180095E648 /* thp_blocked.c */,
|
||||
836F6E1C18BDC2180095E648 /* tra_blocked.c */,
|
||||
836F6E1D18BDC2180095E648 /* vs_blocked.c */,
|
||||
836F6E1E18BDC2180095E648 /* ws_aud_blocked.c */,
|
||||
836F6E1F18BDC2180095E648 /* wsi_blocked.c */,
|
||||
836F6E2018BDC2180095E648 /* xa_blocked.c */,
|
||||
836F6E2118BDC2180095E648 /* xvas_block.c */,
|
||||
8306B0892098454D000302D4 /* segmented.c */,
|
||||
);
|
||||
path = layout;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1263,7 +1310,7 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
836F6E2918BDC2180095E648 /* 2dx9.c */,
|
||||
8349A9041FE6258100E26435 /* aax_streamfile.h */,
|
||||
8306B0C82098458D000302D4 /* aax_utf.h */,
|
||||
836F6E2A18BDC2180095E648 /* aax.c */,
|
||||
836F6E2B18BDC2180095E648 /* acm.c */,
|
||||
836F6E2C18BDC2180095E648 /* ads.c */,
|
||||
|
@ -1278,9 +1325,10 @@
|
|||
836F6E3318BDC2180095E648 /* akb.c */,
|
||||
836F6E3418BDC2180095E648 /* apple_caff.c */,
|
||||
836F6E3518BDC2180095E648 /* ast.c */,
|
||||
83A21F80201D8980000F04B9 /* atsl3.c */,
|
||||
8306B0D520984590000302D4 /* atsl.c */,
|
||||
83A21F7C201D897F000F04B9 /* atx.c */,
|
||||
83EED5D2203A8BC7008BEB45 /* aus.c */,
|
||||
8306B0C32098458C000302D4 /* awc_xma_streamfile.h */,
|
||||
83AA5D201F6E2F9B0020821C /* awc.c */,
|
||||
836F6E3618BDC2180095E648 /* baf.c */,
|
||||
8349A8F81FE6257E00E26435 /* bar_streamfile.h */,
|
||||
|
@ -1293,6 +1341,7 @@
|
|||
836F6E3918BDC2180095E648 /* bnsf.c */,
|
||||
836F6E3A18BDC2180095E648 /* brstm.c */,
|
||||
83EDE5D71A70951A005F5D84 /* btsnd.c */,
|
||||
8306B0CF2098458F000302D4 /* caf.c */,
|
||||
836F6E3B18BDC2180095E648 /* capdsp.c */,
|
||||
836F6E3C18BDC2180095E648 /* Cstr.c */,
|
||||
836F6E3D18BDC2180095E648 /* dc_asd.c */,
|
||||
|
@ -1306,10 +1355,13 @@
|
|||
836F6E4418BDC2180095E648 /* dsp_bdsp.c */,
|
||||
836F6E4518BDC2180095E648 /* dsp_sth_str.c */,
|
||||
8349A8FF1FE6258000E26435 /* ea_1snh.c */,
|
||||
8306B0BD2098458B000302D4 /* ea_eaac_streamfile.h */,
|
||||
8349A8F71FE6257E00E26435 /* ea_eaac.c */,
|
||||
830165981F256BD000CA0941 /* ea_schl_fixed.c */,
|
||||
836F6E4618BDC2180095E648 /* ea_schl.c */,
|
||||
83EED5D1203A8BC7008BEB45 /* ea_swvr.c */,
|
||||
8306B0C42098458D000302D4 /* ea_wve_ad10.c */,
|
||||
8306B0BF2098458C000302D4 /* ea_wve_au00.c */,
|
||||
836F6E4818BDC2180095E648 /* emff.c */,
|
||||
836F6E4918BDC2180095E648 /* exakt_sc.c */,
|
||||
836F6E4A18BDC2180095E648 /* excitebots.c */,
|
||||
|
@ -1348,6 +1400,7 @@
|
|||
836F6E5F18BDC2180095E648 /* mn_str.c */,
|
||||
8349A9031FE6258100E26435 /* mogg.c */,
|
||||
836F6E6018BDC2180095E648 /* mp4.c */,
|
||||
8306B0CB2098458E000302D4 /* msb_msh.c */,
|
||||
83709E011ECBC1A4005C03D3 /* mss.c */,
|
||||
836F6E6118BDC2180095E648 /* msvp.c */,
|
||||
836F6E6218BDC2180095E648 /* mus_acm.c */,
|
||||
|
@ -1365,8 +1418,6 @@
|
|||
836F6E6C18BDC2180095E648 /* nds_swav.c */,
|
||||
836F6E6D18BDC2180095E648 /* ngc_adpdtk.c */,
|
||||
836F6E6E18BDC2180095E648 /* ngc_bh2pcm.c */,
|
||||
836F6E6F18BDC2180095E648 /* ngc_bo2.c */,
|
||||
836F6E7018BDC2180095E648 /* ngc_caf.c */,
|
||||
836F6E7118BDC2180095E648 /* ngc_dsp_konami.c */,
|
||||
836F6E7218BDC2180095E648 /* ngc_dsp_mpds.c */,
|
||||
836F6E7318BDC2180095E648 /* ngc_dsp_std.c */,
|
||||
|
@ -1378,18 +1429,22 @@
|
|||
836F6E7918BDC2180095E648 /* ngc_pdt.c */,
|
||||
836F6E7A18BDC2180095E648 /* ngc_sck_dsp.c */,
|
||||
836F6E7B18BDC2180095E648 /* ngc_ssm.c */,
|
||||
8306B0BE2098458C000302D4 /* ngc_str_cauldron.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 */,
|
||||
8306B0C02098458C000302D4 /* nxap.c */,
|
||||
83A21F7F201D8980000F04B9 /* ogg_vorbis.c */,
|
||||
831BA60F1EAC61A500CF89B0 /* ogl.c */,
|
||||
8349A8FB1FE6257F00E26435 /* omu.c */,
|
||||
8306B0CD2098458E000302D4 /* opus_interleave_streamfile.h */,
|
||||
8306B0CC2098458E000302D4 /* opus_ppp.c */,
|
||||
8306B0CE2098458E000302D4 /* opus.c */,
|
||||
836F6E8318BDC2180095E648 /* otm.c */,
|
||||
836F6E8418BDC2180095E648 /* p3d.c */,
|
||||
8349A8FE1FE6257F00E26435 /* pc_adp_otns.c */,
|
||||
|
@ -1400,8 +1455,11 @@
|
|||
836F6E8718BDC2180095E648 /* pc_smp.c */,
|
||||
836F6E8818BDC2180095E648 /* pc_snds.c */,
|
||||
83CAB8DC1F0B0744001BC993 /* pc_xa30.c */,
|
||||
8306B0D12098458F000302D4 /* pcm_sre.c */,
|
||||
836F6E8B18BDC2180095E648 /* pona.c */,
|
||||
836F6E8C18BDC2180095E648 /* pos.c */,
|
||||
8306B0C52098458D000302D4 /* ppst_streamfile.h */,
|
||||
8306B0D620984590000302D4 /* ppst.c */,
|
||||
836F6E8D18BDC2180095E648 /* ps2_2pfs.c */,
|
||||
836F6E8E18BDC2180095E648 /* ps2_adm.c */,
|
||||
836F6E8F18BDC2180095E648 /* ps2_ads.c */,
|
||||
|
@ -1441,7 +1499,6 @@
|
|||
8349A8F21FE6257D00E26435 /* ps2_pcm.c */,
|
||||
836F6EB318BDC2180095E648 /* ps2_pnb.c */,
|
||||
836F6EB418BDC2180095E648 /* ps2_psh.c */,
|
||||
836F6EB518BDC2180095E648 /* ps2_psw.c */,
|
||||
836F6EB618BDC2180095E648 /* ps2_rnd.c */,
|
||||
836F6EB718BDC2180095E648 /* ps2_rstm.c */,
|
||||
83709E021ECBC1A4005C03D3 /* ps2_rxws.c */,
|
||||
|
@ -1505,11 +1562,14 @@
|
|||
831BA6111EAC61A500CF89B0 /* sgxd.c */,
|
||||
839E21EA1F2EDB0500EE54D7 /* sk_aud.c */,
|
||||
836F6EF218BDC2190095E648 /* sli.c */,
|
||||
8306B0D32098458F000302D4 /* smc_smh.c */,
|
||||
8306B0C72098458D000302D4 /* smv.c */,
|
||||
83A21F82201D8981000F04B9 /* sps_n1.c */,
|
||||
836F6EF318BDC2190095E648 /* spt_spd.c */,
|
||||
8349A8F31FE6257D00E26435 /* sqex_scd_streamfile.h */,
|
||||
836F6EF418BDC2190095E648 /* sqex_scd.c */,
|
||||
83A21F84201D8981000F04B9 /* sqex_sead.c */,
|
||||
8306B0C12098458C000302D4 /* sthd.c */,
|
||||
83AA5D231F6E2F9C0020821C /* stm.c */,
|
||||
836F6EF618BDC2190095E648 /* str_asr.c */,
|
||||
836F6EF718BDC2190095E648 /* str_snds.c */,
|
||||
|
@ -1520,7 +1580,12 @@
|
|||
836F6EFA18BDC2190095E648 /* thp.c */,
|
||||
836F6EFB18BDC2190095E648 /* tun.c */,
|
||||
830165971F256BD000CA0941 /* txth.c */,
|
||||
8306B0D22098458F000302D4 /* txtp.c */,
|
||||
8306B0D420984590000302D4 /* ubi_bao.c */,
|
||||
836F6EFC18BDC2190095E648 /* ubi_ckd.c */,
|
||||
8306B0D720984590000302D4 /* ubi_jade.c */,
|
||||
8306B0C62098458D000302D4 /* ubi_lyn_ogg_streamfile.h */,
|
||||
8306B0CA2098458E000302D4 /* ubi_lyn.c */,
|
||||
831BA6131EAC61A500CF89B0 /* ubi_raki.c */,
|
||||
8349A8F41FE6257D00E26435 /* ubi_sb.c */,
|
||||
831BA6141EAC61A500CF89B0 /* vawx.c */,
|
||||
|
@ -1529,7 +1594,9 @@
|
|||
8349A8F91FE6257E00E26435 /* vsf_tta.c */,
|
||||
836F6EFF18BDC2190095E648 /* vsf.c */,
|
||||
8349A9011FE6258000E26435 /* vxn.c */,
|
||||
83709E041ECBC1A4005C03D3 /* waa_wac_wad_wam.c */,
|
||||
8306B0C22098458C000302D4 /* waf.c */,
|
||||
8306B0D02098458F000302D4 /* wave_segmented.c */,
|
||||
8306B0C92098458E000302D4 /* wave.c */,
|
||||
83CAB8E11F0B0745001BC993 /* wii_04sw.c */,
|
||||
836F6F0018BDC2190095E648 /* wii_bns.c */,
|
||||
836F6F0118BDC2190095E648 /* wii_mus.c */,
|
||||
|
@ -1552,7 +1619,6 @@
|
|||
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 */,
|
||||
|
@ -1603,11 +1669,11 @@
|
|||
836F705518BDC2190095E648 /* streamtypes.h in Headers */,
|
||||
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 */,
|
||||
8306B0E020984590000302D4 /* ppst_streamfile.h in Headers */,
|
||||
839E21E01F2EDAF100EE54D7 /* vorbis_custom_data_fsb.h in Headers */,
|
||||
836F705418BDC2190095E648 /* streamfile.h in Headers */,
|
||||
8374EE401F787AB600033E90 /* ffmpeg_decoder_utils.h in Headers */,
|
||||
|
@ -1615,11 +1681,16 @@
|
|||
8323894B1D22419B00482226 /* clHCA.h in Headers */,
|
||||
839E21E81F2EDAF100EE54D7 /* mpeg_decoder.h in Headers */,
|
||||
839E21E51F2EDAF100EE54D7 /* vorbis_custom_decoder.h in Headers */,
|
||||
8306B0E320984590000302D4 /* aax_utf.h in Headers */,
|
||||
8306B0E120984590000302D4 /* ubi_lyn_ogg_streamfile.h in Headers */,
|
||||
836F705918BDC2190095E648 /* vgmstream.h in Headers */,
|
||||
8306B0DE20984590000302D4 /* awc_xma_streamfile.h in Headers */,
|
||||
839E21E61F2EDAF100EE54D7 /* vorbis_custom_data_wwise.h in Headers */,
|
||||
48C2650F1A5D420800A0A3D6 /* vorbisfile.h in Headers */,
|
||||
836F705718BDC2190095E648 /* util.h in Headers */,
|
||||
836F6F9A18BDC2190095E648 /* meta.h in Headers */,
|
||||
8306B0D820984590000302D4 /* ea_eaac_streamfile.h in Headers */,
|
||||
8306B0E820984590000302D4 /* opus_interleave_streamfile.h in Headers */,
|
||||
8349A90C1FE6258200E26435 /* sqex_scd_streamfile.h in Headers */,
|
||||
8349A91B1FE6258200E26435 /* adx_keys.h in Headers */,
|
||||
836F6F4D18BDC2190095E648 /* layout.h in Headers */,
|
||||
|
@ -1787,12 +1858,14 @@
|
|||
files = (
|
||||
839E21E21F2EDAF100EE54D7 /* vorbis_custom_utils_wwise.c in Sources */,
|
||||
83E56BA51F2EE3520026BC60 /* vorbis_custom_utils_ogl.c in Sources */,
|
||||
8306B0B020984552000302D4 /* blocked_ps2_strlr.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 */,
|
||||
839E21E71F2EDAF100EE54D7 /* mpeg_custom_utils.c in Sources */,
|
||||
839E21E31F2EDAF100EE54D7 /* mpeg_custom_utils_ahx.c in Sources */,
|
||||
8306B0AF20984552000302D4 /* blocked_rws.c in Sources */,
|
||||
839E21EB1F2EDB0600EE54D7 /* sk_aud.c in Sources */,
|
||||
8301659A1F256BD000CA0941 /* txth.c in Sources */,
|
||||
8301659B1F256BD000CA0941 /* ea_schl_fixed.c in Sources */,
|
||||
|
@ -1801,16 +1874,14 @@
|
|||
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 */,
|
||||
83EED5D3203A8BC7008BEB45 /* ea_swvr.c in Sources */,
|
||||
839B54521EEE1D9600048A2D /* ngc_ulw.c in Sources */,
|
||||
8306B0EE20984590000302D4 /* smc_smh.c in Sources */,
|
||||
836F6FAD18BDC2190095E648 /* ngc_dsp_konami.c in Sources */,
|
||||
836F6FF818BDC2190095E648 /* ps2_smpl.c in Sources */,
|
||||
836F6F8118BDC2190095E648 /* dsp_sth_str.c in Sources */,
|
||||
836F6F5E18BDC2190095E648 /* xvas_block.c in Sources */,
|
||||
836F703818BDC2190095E648 /* ubi_ckd.c in Sources */,
|
||||
836F705318BDC2190095E648 /* streamfile.c in Sources */,
|
||||
836F6F5C18BDC2190095E648 /* wsi_blocked.c in Sources */,
|
||||
836F6F7418BDC2190095E648 /* bgw.c in Sources */,
|
||||
836F6F7218BDC2190095E648 /* baf.c in Sources */,
|
||||
83F5F8831908D0A400C8E65F /* fsb5.c in Sources */,
|
||||
|
@ -1825,7 +1896,7 @@
|
|||
836F6F2F18BDC2190095E648 /* mtaf_decoder.c in Sources */,
|
||||
83AA5D161F6E2F600020821C /* ea_xa_decoder.c in Sources */,
|
||||
836F6F9B18BDC2190095E648 /* mn_str.c in Sources */,
|
||||
836F6F5918BDC2190095E648 /* tra_blocked.c in Sources */,
|
||||
8306B0EB20984590000302D4 /* wave_segmented.c in Sources */,
|
||||
836F6F9F18BDC2190095E648 /* musc.c in Sources */,
|
||||
8349A9121FE6258200E26435 /* vsf_tta.c in Sources */,
|
||||
836F6FCA18BDC2190095E648 /* ps2_adm.c in Sources */,
|
||||
|
@ -1837,26 +1908,30 @@
|
|||
836F700018BDC2190095E648 /* ps2_svag.c in Sources */,
|
||||
836F6FB618BDC2190095E648 /* ngc_sck_dsp.c in Sources */,
|
||||
836F6F2818BDC2190095E648 /* ima_decoder.c in Sources */,
|
||||
8306B0DD20984590000302D4 /* waf.c in Sources */,
|
||||
8306B0B320984552000302D4 /* blocked_thp.c in Sources */,
|
||||
836F702318BDC2190095E648 /* rsf.c in Sources */,
|
||||
83299FD01E7660C7003A3242 /* bik.c in Sources */,
|
||||
836F6F3318BDC2190095E648 /* ngc_dtk_decoder.c in Sources */,
|
||||
8306B0EF20984590000302D4 /* ubi_bao.c in Sources */,
|
||||
836F6FBB18BDC2190095E648 /* ngca.c in Sources */,
|
||||
8306B0E220984590000302D4 /* smv.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 */,
|
||||
836F6FF118BDC2190095E648 /* ps2_psw.c in Sources */,
|
||||
836F6F8D18BDC2190095E648 /* gsp_gsb.c in Sources */,
|
||||
836F704518BDC2190095E648 /* wvs.c in Sources */,
|
||||
836F6F2218BDC2190095E648 /* at3_decoder.c in Sources */,
|
||||
83EDE5D91A70951A005F5D84 /* btsnd.c in Sources */,
|
||||
8306B0E420984590000302D4 /* wave.c in Sources */,
|
||||
836F6FFC18BDC2190095E648 /* ps2_ster.c in Sources */,
|
||||
8349A9171FE6258200E26435 /* pc_adp_otns.c in Sources */,
|
||||
836F701E18BDC2190095E648 /* redspark.c in Sources */,
|
||||
8306B0ED20984590000302D4 /* txtp.c in Sources */,
|
||||
836F6FA018BDC2190095E648 /* musx.c in Sources */,
|
||||
836F705818BDC2190095E648 /* vgmstream.c in Sources */,
|
||||
8349A90A1FE6258200E26435 /* sab.c in Sources */,
|
||||
836F6F6818BDC2190095E648 /* ads.c in Sources */,
|
||||
8306B08620984518000302D4 /* fadpcm_decoder.c in Sources */,
|
||||
83AB8C761E8072A100086084 /* x360_ast.c in Sources */,
|
||||
836F6F8B18BDC2190095E648 /* genh.c in Sources */,
|
||||
8349A8EA1FE6253900E26435 /* blocked_ea_schl.c in Sources */,
|
||||
|
@ -1866,6 +1941,7 @@
|
|||
836F703C18BDC2190095E648 /* wii_bns.c in Sources */,
|
||||
830EBE132004656E0023AA10 /* xnb.c in Sources */,
|
||||
835027131ED119E000C25929 /* mta2_decoder.c in Sources */,
|
||||
8306B0DB20984590000302D4 /* nxap.c in Sources */,
|
||||
836F6FA718BDC2190095E648 /* nds_strm.c in Sources */,
|
||||
8349A91A1FE6258200E26435 /* vxn.c in Sources */,
|
||||
8349A8EB1FE6253900E26435 /* blocked_ivaud.c in Sources */,
|
||||
|
@ -1875,43 +1951,44 @@
|
|||
8349A9141FE6258200E26435 /* omu.c in Sources */,
|
||||
836F6FE418BDC2190095E648 /* ps2_leg.c in Sources */,
|
||||
836F705618BDC2190095E648 /* util.c in Sources */,
|
||||
8306B0A820984552000302D4 /* blocked_ps2_iab.c in Sources */,
|
||||
8306B0EA20984590000302D4 /* caf.c in Sources */,
|
||||
836F703618BDC2190095E648 /* thp.c in Sources */,
|
||||
836F6F7818BDC2190095E648 /* Cstr.c in Sources */,
|
||||
836F6F1E18BDC2190095E648 /* acm_decoder.c in Sources */,
|
||||
836F6FD818BDC2190095E648 /* ps2_gbts.c in Sources */,
|
||||
83709E0A1ECBC1A4005C03D3 /* waa_wac_wad_wam.c in Sources */,
|
||||
836F6F7A18BDC2190095E648 /* dc_dcsw_dcs.c in Sources */,
|
||||
836F6F5318BDC2190095E648 /* ps2_iab_blocked.c in Sources */,
|
||||
831BA61A1EAC61A500CF89B0 /* ps2_vds_vdm.c in Sources */,
|
||||
836F6FF218BDC2190095E648 /* ps2_rnd.c in Sources */,
|
||||
83709E0D1ECBC1C3005C03D3 /* mc3_decoder.c in Sources */,
|
||||
836F6FA818BDC2190095E648 /* nds_swav.c in Sources */,
|
||||
836F6F3F18BDC2190095E648 /* ast_blocked.c in Sources */,
|
||||
8374EE411F787AB600033E90 /* ffmpeg_decoder_utils.c in Sources */,
|
||||
8306B0D920984590000302D4 /* ngc_str_cauldron.c in Sources */,
|
||||
833A7A2E1ED11961003EC53E /* xau.c in Sources */,
|
||||
836F6F5018BDC2190095E648 /* mxch_blocked.c in Sources */,
|
||||
836F6FB518BDC2190095E648 /* ngc_pdt.c in Sources */,
|
||||
836F6F4F18BDC2190095E648 /* mus_acm_layout.c in Sources */,
|
||||
836F6F4218BDC2190095E648 /* caf_blocked.c in Sources */,
|
||||
836F6F6C18BDC2190095E648 /* ahx.c in Sources */,
|
||||
83AB8C751E8072A100086084 /* nub_vag.c in Sources */,
|
||||
836F702D18BDC2190095E648 /* sfl.c in Sources */,
|
||||
836F6FEC18BDC2190095E648 /* ps2_mtaf.c in Sources */,
|
||||
83D7318C1A749EEE00CA1366 /* g719_decoder.c in Sources */,
|
||||
836F701118BDC2190095E648 /* ps3_cps.c in Sources */,
|
||||
8306B0DA20984590000302D4 /* ea_wve_au00.c in Sources */,
|
||||
83A21F85201D8981000F04B9 /* atx.c in Sources */,
|
||||
8306B0E720984590000302D4 /* opus_ppp.c in Sources */,
|
||||
836F701418BDC2190095E648 /* ps3_msf.c in Sources */,
|
||||
836F6F6518BDC2190095E648 /* 2dx9.c in Sources */,
|
||||
830EBE102004655D0023AA10 /* atrac9_decoder.c in Sources */,
|
||||
836F700818BDC2190095E648 /* ps2_vms.c in Sources */,
|
||||
836F702418BDC2190095E648 /* rwsd.c in Sources */,
|
||||
830EBE142004656E0023AA10 /* ktss.c in Sources */,
|
||||
836F6F5618BDC2190095E648 /* scd_int_layout.c in Sources */,
|
||||
836F6F6618BDC2190095E648 /* aax.c in Sources */,
|
||||
836F6FD618BDC2190095E648 /* ps2_exst.c in Sources */,
|
||||
8306B0BC20984552000302D4 /* blocked_vs.c in Sources */,
|
||||
836F6F6718BDC2190095E648 /* acm.c in Sources */,
|
||||
8306B0DF20984590000302D4 /* ea_wve_ad10.c in Sources */,
|
||||
836F6F8A18BDC2190095E648 /* gcsw.c in Sources */,
|
||||
836F6F9C18BDC2190095E648 /* mp4.c in Sources */,
|
||||
8306B0A720984552000302D4 /* blocked_xvas.c in Sources */,
|
||||
8349A9101FE6258200E26435 /* ea_eaac.c in Sources */,
|
||||
836F700F18BDC2190095E648 /* ps2_xa30.c in Sources */,
|
||||
8349A8ED1FE6253900E26435 /* blocked_ea_sns.c in Sources */,
|
||||
|
@ -1923,6 +2000,7 @@
|
|||
83709E071ECBC1A4005C03D3 /* mss.c in Sources */,
|
||||
836F6F8F18BDC2190095E648 /* his.c in Sources */,
|
||||
836F6FE218BDC2190095E648 /* ps2_kces.c in Sources */,
|
||||
8306B08520984518000302D4 /* yamaha_decoder.c in Sources */,
|
||||
836F6FEF18BDC2190095E648 /* ps2_pnb.c in Sources */,
|
||||
836F6FCB18BDC2190095E648 /* ps2_ads.c in Sources */,
|
||||
836F6FD318BDC2190095E648 /* ps2_ccc.c in Sources */,
|
||||
|
@ -1930,7 +2008,9 @@
|
|||
83345A521F8AEB2800B2EAA4 /* xvag.c in Sources */,
|
||||
836F704C18BDC2190095E648 /* xbox_xvas.c in Sources */,
|
||||
836F6F3918BDC2190095E648 /* SASSC_decoder.c in Sources */,
|
||||
8306B0A920984552000302D4 /* blocked_adm.c in Sources */,
|
||||
836F703A18BDC2190095E648 /* vs.c in Sources */,
|
||||
8306B0F220984590000302D4 /* ubi_jade.c in Sources */,
|
||||
836F6FF918BDC2190095E648 /* ps2_snd.c in Sources */,
|
||||
836F6F9018BDC2190095E648 /* idsp.c in Sources */,
|
||||
836F6F2918BDC2190095E648 /* l5_555_decoder.c in Sources */,
|
||||
|
@ -1940,7 +2020,6 @@
|
|||
836F6FC118BDC2190095E648 /* pc_adp.c in Sources */,
|
||||
836F701A18BDC2190095E648 /* psx_fag.c in Sources */,
|
||||
836F703B18BDC2190095E648 /* vsf.c in Sources */,
|
||||
836F6F3D18BDC2190095E648 /* aax_layout.c in Sources */,
|
||||
836F6F8218BDC2190095E648 /* ea_schl.c in Sources */,
|
||||
836F700A18BDC2190095E648 /* ps2_vpk.c in Sources */,
|
||||
836F6F7318BDC2190095E648 /* bcstm.c in Sources */,
|
||||
|
@ -1951,32 +2030,34 @@
|
|||
836F6F3218BDC2190095E648 /* ngc_dsp_decoder.c in Sources */,
|
||||
836F704218BDC2190095E648 /* wii_sts.c in Sources */,
|
||||
836F703918BDC2190095E648 /* vgs.c in Sources */,
|
||||
830165A21F256BF400CA0941 /* hwas_blocked.c in Sources */,
|
||||
836F6F2C18BDC2190095E648 /* mp4_aac_decoder.c in Sources */,
|
||||
836F701F18BDC2190095E648 /* riff.c in Sources */,
|
||||
83AA5D191F6E2F600020821C /* ea_xas_decoder.c in Sources */,
|
||||
836F6F9318BDC2190095E648 /* ivaud.c in Sources */,
|
||||
836F6F8518BDC2190095E648 /* exakt_sc.c in Sources */,
|
||||
836F6FA618BDC2190095E648 /* nds_sad.c in Sources */,
|
||||
8306B0F120984590000302D4 /* ppst.c in Sources */,
|
||||
836F702B18BDC2190095E648 /* sdt.c in Sources */,
|
||||
836F6FDA18BDC2190095E648 /* ps2_hgc1.c in Sources */,
|
||||
836F702C18BDC2190095E648 /* seg.c in Sources */,
|
||||
836F700918BDC2190095E648 /* ps2_voi.c in Sources */,
|
||||
836F6F3E18BDC2190095E648 /* aix_layout.c in Sources */,
|
||||
836F6FE018BDC2190095E648 /* ps2_joe.c in Sources */,
|
||||
8306B0A220984552000302D4 /* blocked_bdsp.c in Sources */,
|
||||
836F700118BDC2190095E648 /* ps2_tec.c in Sources */,
|
||||
836F6F4718BDC2190095E648 /* gsb_blocked.c in Sources */,
|
||||
836F703018BDC2190095E648 /* sqex_scd.c in Sources */,
|
||||
8306B0A320984552000302D4 /* blocked_ast.c in Sources */,
|
||||
836F6FD518BDC2190095E648 /* ps2_enth.c in Sources */,
|
||||
8306B0DC20984590000302D4 /* sthd.c in Sources */,
|
||||
836F6FAE18BDC2190095E648 /* ngc_dsp_mpds.c in Sources */,
|
||||
836F705218BDC2190095E648 /* zwdsp.c in Sources */,
|
||||
836F6FFB18BDC2190095E648 /* ps2_sps.c in Sources */,
|
||||
836F6FFF18BDC2190095E648 /* ps2_strlr.c in Sources */,
|
||||
836F6F2018BDC2190095E648 /* adx_decoder.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 */,
|
||||
8306B0BA20984552000302D4 /* blocked_wsi.c in Sources */,
|
||||
83BAFB6C19F45EB3005DAB60 /* bfstm.c in Sources */,
|
||||
836F704418BDC2190095E648 /* ws_aud.c in Sources */,
|
||||
83709E081ECBC1A4005C03D3 /* ps2_rxws.c in Sources */,
|
||||
|
@ -1990,36 +2071,35 @@
|
|||
836F6F7118BDC2190095E648 /* ast.c in Sources */,
|
||||
836F6FE318BDC2190095E648 /* ps2_khv.c in Sources */,
|
||||
836F701318BDC2190095E648 /* ps3_klbs.c in Sources */,
|
||||
836F6F5818BDC2190095E648 /* thp_blocked.c in Sources */,
|
||||
836F6F6B18BDC2190095E648 /* agsc.c in Sources */,
|
||||
836F6FF018BDC2190095E648 /* ps2_psh.c in Sources */,
|
||||
836F700E18BDC2190095E648 /* ps2_xa2.c in Sources */,
|
||||
836F6FF718BDC2190095E648 /* ps2_sl3.c in Sources */,
|
||||
836F6F3118BDC2190095E648 /* ngc_afc_decoder.c in Sources */,
|
||||
836F6FE718BDC2190095E648 /* ps2_mib.c in Sources */,
|
||||
836F6FAB18BDC2190095E648 /* ngc_bo2.c in Sources */,
|
||||
836F6F9918BDC2190095E648 /* maxis_xa.c in Sources */,
|
||||
836F702118BDC2190095E648 /* rs03.c in Sources */,
|
||||
836F6F8418BDC2190095E648 /* emff.c in Sources */,
|
||||
836F704118BDC2190095E648 /* wii_str.c in Sources */,
|
||||
836F6F8818BDC2190095E648 /* fsb.c in Sources */,
|
||||
836F6F4618BDC2190095E648 /* filp_blocked.c in Sources */,
|
||||
836F6FE518BDC2190095E648 /* ps2_lpcm.c in Sources */,
|
||||
836F6FB318BDC2190095E648 /* ngc_lps.c in Sources */,
|
||||
836F6FC018BDC2190095E648 /* p3d.c in Sources */,
|
||||
836F6FC718BDC2190095E648 /* pona.c in Sources */,
|
||||
8306B0B820984552000302D4 /* blocked_ws_aud.c in Sources */,
|
||||
836F6FE618BDC2190095E648 /* ps2_mcg.c in Sources */,
|
||||
836F6F5118BDC2190095E648 /* nolayout.c in Sources */,
|
||||
83AA5D241F6E2F9C0020821C /* awc.c in Sources */,
|
||||
8349A8E91FE6253900E26435 /* blocked_ea_1snh.c in Sources */,
|
||||
8306B0E620984590000302D4 /* msb_msh.c in Sources */,
|
||||
836F702918BDC2190095E648 /* sat_sap.c in Sources */,
|
||||
836F6F3718BDC2190095E648 /* pcm_decoder.c in Sources */,
|
||||
831BA6281EAC61CB00CF89B0 /* coding_utils.c in Sources */,
|
||||
836F6F5B18BDC2190095E648 /* ws_aud_blocked.c in Sources */,
|
||||
836F700218BDC2190095E648 /* ps2_tk5.c in Sources */,
|
||||
83AA5D271F6E2F9C0020821C /* stm.c in Sources */,
|
||||
831BA61D1EAC61A500CF89B0 /* ubi_raki.c in Sources */,
|
||||
836F703F18BDC2190095E648 /* wii_smp.c in Sources */,
|
||||
8306B0A520984552000302D4 /* blocked_ea_wve_au00.c in Sources */,
|
||||
836F6FB818BDC2190095E648 /* ngc_tydsp.c in Sources */,
|
||||
836F701518BDC2190095E648 /* ps3_past.c in Sources */,
|
||||
836F6F7C18BDC2190095E648 /* dc_kcey.c in Sources */,
|
||||
|
@ -2035,6 +2115,7 @@
|
|||
836F6FFE18BDC2190095E648 /* ps2_str.c in Sources */,
|
||||
836F6F4A18BDC2190095E648 /* interleave.c in Sources */,
|
||||
83EDE5D81A70951A005F5D84 /* mca.c in Sources */,
|
||||
8306B0AE20984552000302D4 /* blocked_filp.c in Sources */,
|
||||
831BA61B1EAC61A500CF89B0 /* sgxd.c in Sources */,
|
||||
838BDB6C1D3AFAB10022CA6F /* ffmpeg_decoder.c in Sources */,
|
||||
8349A8E11FE6251F00E26435 /* ea_mt_decoder.c in Sources */,
|
||||
|
@ -2047,24 +2128,25 @@
|
|||
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 */,
|
||||
836F6F8018BDC2190095E648 /* dsp_bdsp.c in Sources */,
|
||||
836F6F9618BDC2190095E648 /* lsf.c in Sources */,
|
||||
8306B0AB20984552000302D4 /* layered.c in Sources */,
|
||||
8374EE3E1F787AB600033E90 /* ffmpeg_decoder_utils_ea_xma.c in Sources */,
|
||||
83345A511F8AEB2800B2EAA4 /* nsw_opus.c in Sources */,
|
||||
8306B0EC20984590000302D4 /* pcm_sre.c in Sources */,
|
||||
836F6FC818BDC2190095E648 /* pos.c in Sources */,
|
||||
8350C05A1E071990009E0A93 /* ps2_svag_snk.c in Sources */,
|
||||
836F6F8918BDC2190095E648 /* gca.c in Sources */,
|
||||
836F6F5718BDC2190095E648 /* str_snds_blocked.c in Sources */,
|
||||
836F6FA418BDC2190095E648 /* nds_hwas.c in Sources */,
|
||||
83A21F8A201D8982000F04B9 /* fsb_encrypted.c in Sources */,
|
||||
8306B0B120984552000302D4 /* blocked_halpst.c in Sources */,
|
||||
836F6FD018BDC2190095E648 /* ps2_b1s.c in Sources */,
|
||||
836F701218BDC2190095E648 /* ps3_ivag.c in Sources */,
|
||||
83AA5D181F6E2F600020821C /* mpeg_custom_utils_awc.c in Sources */,
|
||||
8306B0BB20984552000302D4 /* blocked_gsb.c in Sources */,
|
||||
836F6F7718BDC2190095E648 /* capdsp.c in Sources */,
|
||||
836F6FB018BDC2190095E648 /* ngc_dsp_ygo.c in Sources */,
|
||||
836F703318BDC2190095E648 /* str_snds.c in Sources */,
|
||||
|
@ -2077,13 +2159,18 @@
|
|||
836F6FB418BDC2190095E648 /* ngc_nst_dsp.c in Sources */,
|
||||
836F6FDB18BDC2190095E648 /* ps2_hsf.c in Sources */,
|
||||
836F6FF618BDC2190095E648 /* ps2_sfs.c in Sources */,
|
||||
8306B08420984518000302D4 /* at3plus_decoder.c in Sources */,
|
||||
8349A90E1FE6258200E26435 /* scd_pcm.c in Sources */,
|
||||
836F6F9518BDC2190095E648 /* kraw.c in Sources */,
|
||||
836F6FB718BDC2190095E648 /* ngc_ssm.c in Sources */,
|
||||
8306B0E920984590000302D4 /* opus.c in Sources */,
|
||||
83709E051ECBC1A4005C03D3 /* gtd.c in Sources */,
|
||||
8306B0A420984552000302D4 /* segmented.c in Sources */,
|
||||
83A21F86201D8981000F04B9 /* xwc.c in Sources */,
|
||||
8306B0A620984552000302D4 /* blocked_ea_wve_ad10.c in Sources */,
|
||||
83AA5D1E1F6E2F800020821C /* blocked_awc.c in Sources */,
|
||||
836F704A18BDC2190095E648 /* xbox_wavm.c in Sources */,
|
||||
8306B0B220984552000302D4 /* blocked_mxch.c in Sources */,
|
||||
836F6F8618BDC2190095E648 /* excitebots.c in Sources */,
|
||||
836F6FF418BDC2190095E648 /* rws.c in Sources */,
|
||||
836F6F2518BDC2190095E648 /* g721_decoder.c in Sources */,
|
||||
|
@ -2092,19 +2179,17 @@
|
|||
83709E091ECBC1A4005C03D3 /* ta_aac.c in Sources */,
|
||||
836F6F9118BDC2190095E648 /* ios_psnd.c in Sources */,
|
||||
836F700618BDC2190095E648 /* ps2_vgs.c in Sources */,
|
||||
836F6F2118BDC2190095E648 /* aica_decoder.c in Sources */,
|
||||
836F700318BDC2190095E648 /* ps2_vag.c in Sources */,
|
||||
836F6FAA18BDC2190095E648 /* ngc_bh2pcm.c in Sources */,
|
||||
831BA6211EAC61A500CF89B0 /* x360_pasx.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 */,
|
||||
8306B0B620984552000302D4 /* blocked_hwas.c in Sources */,
|
||||
836F6FC218BDC2190095E648 /* pc_mxst.c in Sources */,
|
||||
836F6FC918BDC2190095E648 /* ps2_2pfs.c in Sources */,
|
||||
836F704818BDC2190095E648 /* xbox_ims.c in Sources */,
|
||||
836F6F4918BDC2190095E648 /* ims_block.c in Sources */,
|
||||
836F6F7518BDC2190095E648 /* bnsf.c in Sources */,
|
||||
836F704318BDC2190095E648 /* wpd.c in Sources */,
|
||||
8349A9081FE6258200E26435 /* ezw.c in Sources */,
|
||||
|
@ -2114,7 +2199,6 @@
|
|||
836F6F8E18BDC2190095E648 /* halpst.c in Sources */,
|
||||
836F6FEE18BDC2190095E648 /* ps2_p2bt.c in Sources */,
|
||||
836F702618BDC2190095E648 /* s14_sss.c in Sources */,
|
||||
836F6F4818BDC2190095E648 /* halpst_blocked.c in Sources */,
|
||||
83AA5D1D1F6E2F800020821C /* blocked_vgs.c in Sources */,
|
||||
8323894A1D22419B00482226 /* clHCA.c in Sources */,
|
||||
836F702E18BDC2190095E648 /* sli.c in Sources */,
|
||||
|
@ -2125,20 +2209,24 @@
|
|||
836F6F3618BDC2190095E648 /* ogg_vorbis_decoder.c in Sources */,
|
||||
836F704718BDC2190095E648 /* xbox_hlwav.c in Sources */,
|
||||
83345A4F1F8AEB2800B2EAA4 /* nub_xma.c in Sources */,
|
||||
8306B0E520984590000302D4 /* ubi_lyn.c in Sources */,
|
||||
836F6F7618BDC2190095E648 /* brstm.c in Sources */,
|
||||
836F700718BDC2190095E648 /* ps2_vgv.c in Sources */,
|
||||
836F704F18BDC2190095E648 /* xwb.c in Sources */,
|
||||
8306B0AD20984552000302D4 /* blocked_caf.c in Sources */,
|
||||
8306B0AA20984552000302D4 /* blocked_sthd.c in Sources */,
|
||||
8350270D1ED119D200C25929 /* ps3_mta2.c in Sources */,
|
||||
836F6FE918BDC2190095E648 /* ps2_mihb.c in Sources */,
|
||||
836F6FA918BDC2190095E648 /* ngc_adpdtk.c in Sources */,
|
||||
836F6FDC18BDC2190095E648 /* ps2_iab.c in Sources */,
|
||||
836F6FAC18BDC2190095E648 /* ngc_caf.c in Sources */,
|
||||
836F6F3818BDC2190095E648 /* psx_decoder.c in Sources */,
|
||||
836F6F2D18BDC2190095E648 /* mpeg_decoder.c in Sources */,
|
||||
836F6F2618BDC2190095E648 /* g7221_decoder.c in Sources */,
|
||||
836F6FA218BDC2190095E648 /* naomi_adpcm.c in Sources */,
|
||||
836F6FBF18BDC2190095E648 /* otm.c in Sources */,
|
||||
8306B0B420984552000302D4 /* blocked_tra.c in Sources */,
|
||||
836F6FDD18BDC2190095E648 /* ps2_ikm.c in Sources */,
|
||||
8306B0B520984552000302D4 /* blocked_emff.c in Sources */,
|
||||
836F6FBD18BDC2190095E648 /* nwa.c in Sources */,
|
||||
83A21F8C201D8982000F04B9 /* kma9.c in Sources */,
|
||||
836F6FC418BDC2190095E648 /* pc_snds.c in Sources */,
|
||||
|
@ -2146,9 +2234,7 @@
|
|||
836F6FD118BDC2190095E648 /* ps2_bg00.c in Sources */,
|
||||
836F6F4118BDC2190095E648 /* blocked.c in Sources */,
|
||||
836F6F3B18BDC2190095E648 /* ws_decoder.c in Sources */,
|
||||
836F6F4518BDC2190095E648 /* emff_blocked.c in Sources */,
|
||||
838BDB6E1D3B043C0022CA6F /* ffmpeg.c in Sources */,
|
||||
836F6F5D18BDC2190095E648 /* xa_blocked.c in Sources */,
|
||||
836F6F3418BDC2190095E648 /* nwa_decoder.c in Sources */,
|
||||
836F6F2E18BDC2190095E648 /* msadpcm_decoder.c in Sources */,
|
||||
836F6F9218BDC2190095E648 /* ish_isd.c in Sources */,
|
||||
|
@ -2157,18 +2243,20 @@
|
|||
836F703518BDC2190095E648 /* svs.c in Sources */,
|
||||
836F6FA318BDC2190095E648 /* naomi_spsd.c in Sources */,
|
||||
836F6F9D18BDC2190095E648 /* msvp.c in Sources */,
|
||||
8306B0B920984552000302D4 /* blocked_matx.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 */,
|
||||
8306B0B720984552000302D4 /* blocked_str_snds.c in Sources */,
|
||||
836F702718BDC2190095E648 /* sat_baka.c in Sources */,
|
||||
83345A4A1F8AEAF900B2EAA4 /* ffmpeg_decoder_utils_switch_opus.c in Sources */,
|
||||
836F704B18BDC2190095E648 /* xbox_xmu.c in Sources */,
|
||||
832389501D2246C300482226 /* hca.c in Sources */,
|
||||
836F701B18BDC2190095E648 /* psx_gms.c in Sources */,
|
||||
8306B0F020984590000302D4 /* atsl.c in Sources */,
|
||||
836F700518BDC2190095E648 /* ps2_vbk.c in Sources */,
|
||||
836F6FDF18BDC2190095E648 /* ps2_int.c in Sources */,
|
||||
836F704D18BDC2190095E648 /* xbox_xwav.c in Sources */,
|
||||
8306B0AC20984552000302D4 /* blocked_xa.c in Sources */,
|
||||
836F6F7B18BDC2190095E648 /* dc_idvi.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
|
@ -817,23 +817,65 @@ void acm_reset(ACMStream *acm)
|
|||
memset(acm->wrapbuf, 0, acm->wrapbuf_len * sizeof(int));
|
||||
}
|
||||
|
||||
/* interface to vgmstream */
|
||||
void decode_acm(ACMStream * acm, sample * outbuf,
|
||||
int32_t samples_to_do, int channelspacing) {
|
||||
|
||||
/***********************************************
|
||||
* interface to vgmstream
|
||||
***********************************************/
|
||||
|
||||
acm_codec_data *init_acm(STREAMFILE *streamFile) {
|
||||
acm_codec_data* data = NULL;
|
||||
ACMStream *acm_stream = NULL;
|
||||
char filename[PATH_LIMIT];
|
||||
|
||||
data = calloc(1,sizeof(acm_codec_data));
|
||||
if (!data) goto fail;
|
||||
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (acm_open_decoder(&acm_stream,streamFile,filename) != ACM_OK)
|
||||
goto fail;
|
||||
|
||||
data->file = acm_stream;
|
||||
|
||||
return data;
|
||||
|
||||
fail:
|
||||
free_acm(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void decode_acm(acm_codec_data *data, sample * outbuf, int32_t samples_to_do, int channelspacing) {
|
||||
ACMStream * acm = data->file;
|
||||
int32_t samples_read = 0;
|
||||
|
||||
while (samples_read < samples_to_do) {
|
||||
int32_t bytes_read_just_now;
|
||||
bytes_read_just_now =
|
||||
acm_read(acm,(char*)(
|
||||
outbuf+samples_read*channelspacing),
|
||||
(samples_to_do-samples_read)*sizeof(sample)*
|
||||
channelspacing,0,2,1);
|
||||
int32_t bytes_read_just_now = acm_read(
|
||||
acm,
|
||||
(char*)(outbuf+samples_read*channelspacing),
|
||||
(samples_to_do-samples_read)*sizeof(sample)*channelspacing,
|
||||
0,2,1);
|
||||
|
||||
if (bytes_read_just_now > 0) {
|
||||
samples_read +=
|
||||
bytes_read_just_now/sizeof(sample)/channelspacing;
|
||||
samples_read += bytes_read_just_now/sizeof(sample)/channelspacing;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void reset_acm(VGMSTREAM *vgmstream) {
|
||||
acm_codec_data *data = vgmstream->codec_data;
|
||||
|
||||
if (data && data->file) {
|
||||
acm_reset(data->file);
|
||||
}
|
||||
}
|
||||
|
||||
void free_acm(acm_codec_data *data) {
|
||||
if (data) {
|
||||
if (data->file) {
|
||||
acm_close(data->file);
|
||||
}
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
#include "../util.h"
|
||||
#include "coding.h"
|
||||
|
||||
/* fixed point (.8) amount to scale the current step size by */
|
||||
/* part of the same series as used in MS ADPCM "ADPCMTable" */
|
||||
static const unsigned int scale_step[16] =
|
||||
{
|
||||
230, 230, 230, 230, 307, 409, 512, 614,
|
||||
230, 230, 230, 230, 307, 409, 512, 614
|
||||
};
|
||||
|
||||
/* expand an unsigned four bit delta to a wider signed range */
|
||||
static const int scale_delta[16] =
|
||||
{
|
||||
1, 3, 5, 7, 9, 11, 13, 15,
|
||||
-1, -3, -5, -7, -9,-11,-13,-15
|
||||
};
|
||||
|
||||
/* Yamaha AICA ADPCM (as seen in Dreamcast) */
|
||||
|
||||
void decode_aica(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i;
|
||||
int32_t sample_count;
|
||||
int32_t hist1 = stream->adpcm_history1_16;
|
||||
uint32_t step_size = stream->adpcm_step_index;
|
||||
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
int sample_nibble =
|
||||
(
|
||||
(unsigned)read_8bit(stream->offset+i/2,stream->streamfile) >>
|
||||
(i&1?4:0)
|
||||
)&0xf;
|
||||
|
||||
int32_t sample_delta = (int32_t)step_size * scale_delta[sample_nibble];
|
||||
int32_t new_sample;
|
||||
|
||||
new_sample = hist1 + sample_delta/8;
|
||||
|
||||
outbuf[sample_count] = clamp16(new_sample);
|
||||
|
||||
hist1 = outbuf[sample_count];
|
||||
|
||||
step_size = (step_size * scale_step[sample_nibble])/0x100;
|
||||
if (step_size < 0x7f) step_size = 0x7f;
|
||||
if (step_size > 0x6000) step_size = 0x6000;
|
||||
}
|
||||
|
||||
stream->adpcm_history1_16 = hist1;
|
||||
stream->adpcm_step_index = step_size;
|
||||
}
|
|
@ -51,6 +51,7 @@ void decode_at3plus(VGMSTREAM * vgmstream, sample * outbuf, int channelspacing,
|
|||
|
||||
void reset_at3plus(VGMSTREAM *vgmstream) {
|
||||
maiatrac3plus_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
if (data->handle)
|
||||
Atrac3plusDecoder_closeContext(data->handle);
|
||||
|
@ -62,6 +63,8 @@ void seek_at3plus(VGMSTREAM *vgmstream, int32_t num_sample) {
|
|||
int blocks_to_skip = num_sample / 2048;
|
||||
int samples_to_discard = num_sample % 2048;
|
||||
maiatrac3plus_codec_data *data = (maiatrac3plus_codec_data *)(vgmstream->codec_data);
|
||||
if (!data) return;
|
||||
|
||||
vgmstream->loop_ch[0].offset =
|
||||
vgmstream->loop_ch[0].channel_start_offset +
|
||||
vgmstream->interleave_block_size * blocks_to_skip;
|
|
@ -152,6 +152,7 @@ decode_fail:
|
|||
|
||||
void reset_atrac9(VGMSTREAM *vgmstream) {
|
||||
atrac9_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
if (!data->handle)
|
||||
goto fail;
|
||||
|
@ -184,6 +185,7 @@ fail:
|
|||
|
||||
void seek_atrac9(VGMSTREAM *vgmstream, int32_t num_sample) {
|
||||
atrac9_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
reset_atrac9(vgmstream);
|
||||
|
||||
|
@ -196,8 +198,7 @@ void seek_atrac9(VGMSTREAM *vgmstream, int32_t num_sample) {
|
|||
}
|
||||
|
||||
void free_atrac9(atrac9_codec_data *data) {
|
||||
if (!data)
|
||||
return;
|
||||
if (!data) return;
|
||||
|
||||
if (data->handle) Atrac9ReleaseHandle(data->handle);
|
||||
free(data->data_buffer);
|
||||
|
|
|
@ -17,8 +17,9 @@ void g72x_init_state(struct g72x_state *state_ptr);
|
|||
/* ima_decoder */
|
||||
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(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel);
|
||||
void decode_xbox_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
|
||||
void decode_xbox_ima_mch(VGMSTREAMCHANNEL * 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_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);
|
||||
|
@ -36,6 +37,7 @@ size_t ima_bytes_to_samples(size_t bytes, int channels);
|
|||
size_t ms_ima_bytes_to_samples(size_t bytes, int block_align, int channels);
|
||||
size_t xbox_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);
|
||||
size_t apple_ima4_bytes_to_samples(size_t bytes, int channels);
|
||||
|
||||
/* ngc_dsp_decoder */
|
||||
void decode_ngc_dsp(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
|
@ -57,7 +59,6 @@ void decode_ngc_afc(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspaci
|
|||
|
||||
/* pcm_decoder */
|
||||
void decode_pcm16LE(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
void decode_pcm16LE_XOR_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
void decode_pcm16BE(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
void decode_pcm16_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int big_endian);
|
||||
void decode_pcm8(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
|
@ -74,10 +75,10 @@ size_t pcm_bytes_to_samples(size_t bytes, int channels, int bits_per_sample);
|
|||
/* psx_decoder */
|
||||
void decode_psx(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
void decode_psx_badflags(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
void decode_psx_bmdx(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
void decode_psx_configurable(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int frame_size);
|
||||
void decode_hevag(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
size_t ps_bytes_to_samples(size_t bytes, int channels);
|
||||
size_t ps_cfg_bytes_to_samples(size_t bytes, size_t frame_size, int channels);
|
||||
|
||||
/* xa_decoder */
|
||||
void decode_xa(VGMSTREAM * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
|
||||
|
@ -102,7 +103,10 @@ void decode_cbd2_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspac
|
|||
void decode_ws(VGMSTREAM * vgmstream, int channel, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
|
||||
/* acm_decoder */
|
||||
void decode_acm(ACMStream * acm, sample * outbuf, int32_t samples_to_do, int channelspacing);
|
||||
acm_codec_data *init_acm();
|
||||
void decode_acm(acm_codec_data *data, sample * outbuf, int32_t samples_to_do, int channelspacing);
|
||||
void reset_acm(VGMSTREAM *vgmstream);
|
||||
void free_acm(acm_codec_data *data);
|
||||
|
||||
/* nwa_decoder */
|
||||
void decode_nwa(NWAData *nwa, sample *outbuf, int32_t samples_to_do);
|
||||
|
@ -112,8 +116,12 @@ void decode_msadpcm_stereo(VGMSTREAM * vgmstream, sample * outbuf, int32_t first
|
|||
void decode_msadpcm_mono(VGMSTREAM * vgmstream, sample * outbuf, int32_t first_sample, int32_t samples_to_do);
|
||||
long msadpcm_bytes_to_samples(long bytes, int block_size, int channels);
|
||||
|
||||
/* aica_decoder */
|
||||
void decode_aica(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
/* yamaha_decoder */
|
||||
void decode_aica(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo);
|
||||
void decode_yamaha(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel);
|
||||
void decode_yamaha_nxap(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
size_t aica_bytes_to_samples(size_t bytes, int channels);
|
||||
size_t yamaha_bytes_to_samples(size_t bytes, int channels);
|
||||
|
||||
/* nds_procyon_decoder */
|
||||
void decode_nds_procyon(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
|
@ -136,6 +144,9 @@ 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);
|
||||
|
||||
/* fadpcm_decoder */
|
||||
void decode_fadpcm(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||
|
||||
/* 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);
|
||||
|
|
|
@ -297,15 +297,9 @@ fail:
|
|||
int ffmpeg_make_riff_xma2_from_xma2_chunk(uint8_t * buf, size_t buf_size, off_t xma2_offset, size_t xma2_size, size_t data_size, STREAMFILE *streamFile) {
|
||||
uint8_t chunk[0x100];
|
||||
size_t riff_size;
|
||||
size_t xma2_final_size = xma2_size;
|
||||
int xma2_chunk_version = read_8bit(xma2_offset,streamFile);
|
||||
|
||||
/* FFmpeg can't parse v3 "XMA2" chunks so we'll have to extend (8 bytes in the middle) */
|
||||
if (xma2_chunk_version == 3)
|
||||
xma2_final_size += 0x8;
|
||||
riff_size = 4+4+ 4 + 4+4+xma2_final_size + 4+4;
|
||||
|
||||
if (buf_size < riff_size || xma2_final_size > 0x100)
|
||||
riff_size = 4+4+ 4 + 4+4+xma2_size + 4+4;
|
||||
if (buf_size < riff_size || xma2_size > 0x100)
|
||||
goto fail;
|
||||
if (read_streamfile(chunk,xma2_offset,xma2_size, streamFile) != xma2_size)
|
||||
goto fail;
|
||||
|
@ -316,20 +310,11 @@ int ffmpeg_make_riff_xma2_from_xma2_chunk(uint8_t * buf, size_t buf_size, off_t
|
|||
memcpy(buf+0x08, "WAVE", 4);
|
||||
|
||||
memcpy(buf+0x0c, "XMA2", 4);
|
||||
put_32bitLE(buf+0x10, xma2_final_size);
|
||||
if (xma2_chunk_version == 3) {
|
||||
/* old XMA2 v3: change to v4 (extra 8 bytes in the middle); always BE */
|
||||
put_8bit (buf+0x14 + 0x00, 4); /* v4 */
|
||||
memcpy (buf+0x14 + 0x01, chunk+1, 0xF); /* first v3 part (fixed) */
|
||||
put_32bitBE(buf+0x14 + 0x10, 0x000010D6); /* extra v4 BE: "EncodeOptions" (not used by FFmpeg) */
|
||||
put_32bitBE(buf+0x14 + 0x14, 0); /* extra v4 BE: "PsuedoBytesPerSec" (not used by FFmpeg) */
|
||||
memcpy (buf+0x14 + 0x18, chunk+0x10, xma2_size - 0x10); /* second v3 part (variable size) */
|
||||
} else {
|
||||
memcpy(buf+0x14, chunk, xma2_size);
|
||||
}
|
||||
put_32bitLE(buf+0x10, xma2_size);
|
||||
memcpy(buf+0x14, chunk, xma2_size);
|
||||
|
||||
memcpy(buf+0x14+xma2_final_size, "data", 4);
|
||||
put_32bitLE(buf+0x14+xma2_final_size+4, data_size); /* data size */
|
||||
memcpy(buf+0x14+xma2_size, "data", 4);
|
||||
put_32bitLE(buf+0x14+xma2_size+4, data_size); /* data size */
|
||||
|
||||
return riff_size;
|
||||
|
||||
|
@ -436,20 +421,19 @@ fail:
|
|||
static void ms_audio_get_samples(ms_sample_data * msd, STREAMFILE *streamFile, int start_packet, int channels_per_packet, int bytes_per_packet, int samples_per_frame, int samples_per_subframe, int bits_frame_size) {
|
||||
int frames = 0, samples = 0, loop_start_frame = 0, loop_end_frame = 0, start_skip = 0, end_skip = 0;
|
||||
|
||||
uint32_t first_frame_b, packet_skip_count = 0, frame_size_b, packet_size_b, header_size_b;
|
||||
uint64_t offset_b, packet_offset_b, frame_offset_b;
|
||||
size_t size;
|
||||
size_t first_frame_b, packet_skip_count = 0, frame_size_b, packet_size_b, header_size_b;
|
||||
off_t offset_b, packet_offset_b, frame_offset_b;
|
||||
|
||||
uint32_t packet_size = bytes_per_packet;
|
||||
size_t packet_size = bytes_per_packet;
|
||||
off_t offset = msd->data_offset;
|
||||
uint32_t stream_offset_b = msd->data_offset * 8;
|
||||
off_t max_offset = msd->data_offset + msd->data_size;
|
||||
off_t stream_offset_b = msd->data_offset * 8;
|
||||
|
||||
offset += start_packet * packet_size;
|
||||
size = offset + msd->data_size;
|
||||
packet_size_b = packet_size * 8;
|
||||
|
||||
/* read packets */
|
||||
while (offset < size) {
|
||||
while (offset < max_offset) {
|
||||
offset_b = offset * 8; /* global offset in bits */
|
||||
offset += packet_size; /* global offset in bytes */
|
||||
|
||||
|
@ -678,7 +662,7 @@ void wmapro_get_samples(ms_sample_data * msd, STREAMFILE *streamFile, int block_
|
|||
return;
|
||||
}
|
||||
samples_per_frame = wma_get_samples_per_frame(version, sample_rate, decode_flags);
|
||||
bits_frame_size = floor(log(block_align) / log(2)) + 4; /* max bits needed to represent this block_align */
|
||||
bits_frame_size = (int)floor(log(block_align) / log(2)) + 4; /* max bits needed to represent this block_align */
|
||||
samples_per_subframe = 0; /* not really needed WMAPro can't use loop subframes (complex subframe lengths) */
|
||||
msd->xma_version = 0; /* signal it's not XMA */
|
||||
|
||||
|
@ -705,7 +689,8 @@ void wma_get_samples(ms_sample_data * msd, STREAMFILE *streamFile, int block_ali
|
|||
else {
|
||||
/* variable frames per packet (mini-header values) */
|
||||
off_t offset = msd->data_offset;
|
||||
while (offset < msd->data_size) { /* read packets (superframes) */
|
||||
off_t max_offset = msd->data_offset + msd->data_size;
|
||||
while (offset < max_offset) { /* read packets (superframes) */
|
||||
int packet_frames;
|
||||
uint8_t header = read_8bit(offset, streamFile); /* upper nibble: index; lower nibble: frames */
|
||||
|
||||
|
|
|
@ -534,6 +534,8 @@ static void flush_ea_mt_internal(VGMSTREAM *vgmstream, int is_start) {
|
|||
int i;
|
||||
size_t bytes;
|
||||
|
||||
if (!data) return;
|
||||
|
||||
/* the decoder needs to be notified when offsets change */
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
UTKContext *ctx = data->utk_context[i];
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
#include "coding.h"
|
||||
|
||||
|
||||
/* FADPCM table */
|
||||
static const int8_t fadpcm_coefs[8][2] = {
|
||||
{ 0 , 0 },
|
||||
{ 60 , 0 },
|
||||
{ 122 , 60 },
|
||||
{ 115 , 52 },
|
||||
{ 98 , 55 },
|
||||
{ 0 , 0 },
|
||||
{ 0 , 0 },
|
||||
{ 0 , 0 },
|
||||
};
|
||||
|
||||
/* FMOD's FADPCM, basically XA/PSX ADPCM with a fancy header layout.
|
||||
* Code/layout could be simplified but tries to emulate FMOD's code.
|
||||
* Algorithm and tables debugged from their PC DLLs. */
|
||||
void decode_fadpcm(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
off_t frame_offset;
|
||||
int i, j, k;
|
||||
int block_samples, num_frame, samples_done = 0, sample_count = 0;
|
||||
uint32_t coefs, shifts;
|
||||
int32_t hist1; //= stream->adpcm_history1_32;
|
||||
int32_t hist2; //= stream->adpcm_history2_32;
|
||||
|
||||
/* external interleave (fixed size), mono */
|
||||
block_samples = (0x8c - 0xc) * 2;
|
||||
num_frame = first_sample / block_samples;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
frame_offset = stream->offset + 0x8c*num_frame;
|
||||
|
||||
|
||||
/* parse 0xc header (header samples are not written to outbuf) */
|
||||
coefs = read_32bitLE(frame_offset + 0x00, stream->streamfile);
|
||||
shifts = read_32bitLE(frame_offset + 0x04, stream->streamfile);
|
||||
hist1 = read_16bitLE(frame_offset + 0x08, stream->streamfile);
|
||||
hist2 = read_16bitLE(frame_offset + 0x0a, stream->streamfile);
|
||||
|
||||
|
||||
/* decode nibbles, grouped in 8 sets of 0x10 * 0x04 * 2 */
|
||||
for (i = 0; i < 8; i++) {
|
||||
int32_t coef1, coef2, shift, coef_index, shift_factor;
|
||||
off_t group_offset = frame_offset + 0x0c + 0x10*i;
|
||||
|
||||
/* each set has its own coefs/shifts (indexes > 7 are repeat, ex. 0x9 is 0x2) */
|
||||
coef_index = ((coefs >> i*4) & 0x0f) % 0x07;
|
||||
shift_factor = (shifts >> i*4) & 0x0f;
|
||||
|
||||
coef1 = fadpcm_coefs[coef_index][0];
|
||||
coef2 = fadpcm_coefs[coef_index][1];
|
||||
shift = 0x16 - shift_factor;
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
uint32_t nibbles = read_32bitLE(group_offset + 0x04*j, stream->streamfile);
|
||||
|
||||
for (k = 0; k < 8; k++) {
|
||||
int32_t new_sample;
|
||||
|
||||
new_sample = (nibbles >> k*4) & 0x0f;
|
||||
new_sample = (new_sample << 28) >> shift; /* sign extend + scale */
|
||||
new_sample = (new_sample - hist2*coef2 + hist1*coef1);
|
||||
new_sample = new_sample >> 6; /* (new_sample / 64) has minor rounding differences */
|
||||
new_sample = clamp16(new_sample);
|
||||
|
||||
if (sample_count >= first_sample && samples_done < samples_to_do) {
|
||||
outbuf[samples_done * channelspacing] = new_sample;
|
||||
samples_done++;
|
||||
}
|
||||
sample_count++;
|
||||
|
||||
hist2 = hist1;
|
||||
hist1 = new_sample;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//stream->adpcm_history1_32 = hist1;
|
||||
//stream->adpcm_history2_32 = hist2;
|
||||
}
|
|
@ -364,6 +364,10 @@ ffmpeg_codec_data * init_ffmpeg_config(STREAMFILE *streamFile, uint8_t * header,
|
|||
memcpy(&data->config, config, sizeof(ffmpeg_custom_config));
|
||||
}
|
||||
|
||||
/* ignore bad combos */
|
||||
if ((header && !header_size) || (!header && header_size))
|
||||
goto fail;
|
||||
|
||||
/* fake header to trick FFmpeg into demuxing/decoding the stream */
|
||||
if (header_size > 0) {
|
||||
data->header_size = header_size;
|
||||
|
@ -706,6 +710,7 @@ end:
|
|||
|
||||
void reset_ffmpeg(VGMSTREAM *vgmstream) {
|
||||
ffmpeg_codec_data *data = (ffmpeg_codec_data *) vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
if (data->formatCtx) {
|
||||
avformat_seek_file(data->formatCtx, data->streamIndex, 0, 0, 0, AVSEEK_FLAG_ANY);
|
||||
|
@ -733,6 +738,7 @@ void reset_ffmpeg(VGMSTREAM *vgmstream) {
|
|||
void seek_ffmpeg(VGMSTREAM *vgmstream, int32_t num_sample) {
|
||||
ffmpeg_codec_data *data = (ffmpeg_codec_data *) vgmstream->codec_data;
|
||||
int64_t ts;
|
||||
if (!data) return;
|
||||
|
||||
/* Start from 0 and discard samples until loop_start (slower but not too noticeable).
|
||||
* Due to various FFmpeg quirks seeking to a sample is erratic in many formats (would need extra steps). */
|
||||
|
|
|
@ -53,6 +53,7 @@ void decode_g719(VGMSTREAM * vgmstream, sample * outbuf, int channelspacing, int
|
|||
void reset_g719(VGMSTREAM *vgmstream) {
|
||||
g719_codec_data *data = vgmstream->codec_data;
|
||||
int i;
|
||||
if (!data) return;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++)
|
||||
{
|
||||
|
|
|
@ -52,6 +52,7 @@ void decode_g7221(VGMSTREAM * vgmstream, sample * outbuf, int channelspacing, in
|
|||
void reset_g7221(VGMSTREAM *vgmstream) {
|
||||
g7221_codec_data *data = vgmstream->codec_data;
|
||||
int i;
|
||||
if (!data) return;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
void decode_hca(hca_codec_data * data, sample * outbuf, int32_t samples_to_do, int channels) {
|
||||
int samples_done = 0;
|
||||
|
||||
int32_t samples_remain = clHCA_samplesPerBlock - data->sample_ptr;
|
||||
|
||||
void *hca_data = NULL;
|
||||
|
@ -84,7 +83,8 @@ void decode_hca(hca_codec_data * data, sample * outbuf, int32_t samples_to_do, i
|
|||
|
||||
void reset_hca(VGMSTREAM *vgmstream) {
|
||||
hca_codec_data *data = vgmstream->codec_data;
|
||||
/*clHCA *hca = (clHCA *)(data + 1);*/
|
||||
if (!data) return;
|
||||
|
||||
data->curblock = 0;
|
||||
data->sample_ptr = clHCA_samplesPerBlock;
|
||||
data->samples_discard = 0;
|
||||
|
@ -92,6 +92,8 @@ void reset_hca(VGMSTREAM *vgmstream) {
|
|||
|
||||
void loop_hca(VGMSTREAM *vgmstream) {
|
||||
hca_codec_data *data = (hca_codec_data *)(vgmstream->codec_data);
|
||||
if (!data) return;
|
||||
|
||||
data->curblock = data->info.loopStart;
|
||||
data->sample_ptr = clHCA_samplesPerBlock;
|
||||
data->samples_discard = 0;
|
||||
|
|
|
@ -8,14 +8,7 @@
|
|||
* All IMAs are mostly the same with these variations:
|
||||
* - interleave: blocks and channels are handled externally (layouts) or internally (mixed channels)
|
||||
* - block header: none (external), normal (4 bytes of history 16b + step 8b + reserved 8b) or others; per channel/global
|
||||
* - expand type: ms-ima style or others; low or high nibble first
|
||||
*
|
||||
* todo:
|
||||
* MS IMAs have the last sample of the prev block in the block header. In Microsoft's implementation, the header sample
|
||||
* is written first and last sample is skipped (since they match). vgmstream ignores the header sample and
|
||||
* writes the last one instead. This means the very first sample in the first header in a stream is incorrectly skipped.
|
||||
* Header step should be 8 bit.
|
||||
* Officially defined in "Microsoft Multimedia Standards Update" doc (RIFFNEW.pdf).
|
||||
* - expand type: IMA style or variations; low or high nibble first
|
||||
*/
|
||||
|
||||
static const int ADPCMTable[89] = {
|
||||
|
@ -39,15 +32,15 @@ static const int IMA_IndexTable[16] = {
|
|||
};
|
||||
|
||||
|
||||
/* Standard IMA (most common) */
|
||||
/* Original IMA expansion, using shift+ADDs to avoid MULs (slow back then) */
|
||||
static void std_ima_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset, int nibble_shift, int32_t * hist1, int32_t * step_index) {
|
||||
int sample_nibble, sample_decoded, step, delta;
|
||||
|
||||
/* calculate diff = [signed] (step / 8) + (step / 4) + (step / 2) + (step) [when code = 4+2+1]
|
||||
* simplified through math, using bitwise ops to avoid rounding:
|
||||
* diff = (code + 1/2) * (step / 4)
|
||||
* > diff = (step * nibble / 4) + (step / 8)
|
||||
* > diff = (((step * nibble) + (step / 2)) / 4) */
|
||||
/* simplified through math from:
|
||||
* - diff = (code + 1/2) * (step / 4)
|
||||
* > diff = ((step * nibble) + (step / 2)) / 4
|
||||
* > diff = (step * nibble / 4) + (step / 8)
|
||||
* final diff = [signed] (step / 8) + (step / 4) + (step / 2) + (step) [when code = 4+2+1] */
|
||||
|
||||
sample_nibble = (read_8bit(byte_offset,stream->streamfile) >> nibble_shift)&0xf; /* ADPCM code */
|
||||
sample_decoded = *hist1; /* predictor value */
|
||||
|
@ -81,7 +74,33 @@ static void std_ima_expand_nibble_16(VGMSTREAMCHANNEL * stream, off_t byte_offse
|
|||
if (sample_nibble & 8) delta = -delta;
|
||||
sample_decoded += delta;
|
||||
|
||||
*hist1 = clamp16(sample_decoded); //no need for this actually
|
||||
*hist1 = clamp16(sample_decoded); /* no need for this, actually */
|
||||
*step_index += IMA_IndexTable[sample_nibble];
|
||||
if (*step_index < 0) *step_index=0;
|
||||
if (*step_index > 88) *step_index=88;
|
||||
}
|
||||
|
||||
/* Original IMA expansion, but using MULs rather than shift+ADDs (faster for newer processors).
|
||||
* There is minor rounding difference between ADD and MUL expansions, noticeable/propagated in non-headered IMAs. */
|
||||
static void std_ima_expand_nibble_mul(VGMSTREAMCHANNEL * stream, off_t byte_offset, int nibble_shift, int32_t * hist1, int32_t * step_index) {
|
||||
int sample_nibble, sample_decoded, step, delta;
|
||||
|
||||
/* simplified through math from:
|
||||
* - diff = (code + 1/2) * (step / 4)
|
||||
* > diff = (code + 1/2) * step) / 4) * (2 / 2)
|
||||
* > diff = (code + 1/2) * 2 * step / 8
|
||||
* final diff = [signed] ((code * 2 + 1) * step) / 8 */
|
||||
|
||||
sample_nibble = (read_8bit(byte_offset,stream->streamfile) >> nibble_shift)&0xf;
|
||||
sample_decoded = *hist1;
|
||||
step = ADPCMTable[*step_index];
|
||||
|
||||
delta = (sample_nibble & 0x7);
|
||||
delta = ((delta * 2 + 1) * step) >> 3;
|
||||
if (sample_nibble & 8) delta = -delta;
|
||||
sample_decoded += delta;
|
||||
|
||||
*hist1 = clamp16(sample_decoded);
|
||||
*step_index += IMA_IndexTable[sample_nibble];
|
||||
if (*step_index < 0) *step_index=0;
|
||||
if (*step_index > 88) *step_index=88;
|
||||
|
@ -96,7 +115,8 @@ static void n3ds_ima_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset,
|
|||
step = ADPCMTable[*step_index];
|
||||
|
||||
sample_decoded = sample_decoded << 3;
|
||||
delta = step * (sample_nibble & 7) * 2 + step; /* custom */
|
||||
delta = (sample_nibble & 0x07);
|
||||
delta = step * delta * 2 + step; /* custom */
|
||||
if (sample_nibble & 8) delta = -delta;
|
||||
sample_decoded += delta;
|
||||
sample_decoded = sample_decoded >> 3;
|
||||
|
@ -149,24 +169,6 @@ static void otns_ima_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset,
|
|||
if (*step_index > 88) *step_index=88;
|
||||
}
|
||||
|
||||
/* Ubisoft games, algorithm by Zench (https://bitbucket.org/Zenchreal/decubisnd) */
|
||||
static void ubi_ima_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset, int nibble_shift, int32_t * hist1, int32_t * step_index) {
|
||||
int sample_nibble, sample_decoded, step, delta;
|
||||
|
||||
sample_nibble = (read_8bit(byte_offset,stream->streamfile) >> nibble_shift)&0xf;
|
||||
sample_decoded = *hist1;
|
||||
step = ADPCMTable[*step_index];
|
||||
|
||||
delta = (((sample_nibble & 7) * 2 + 1) * step) >> 3; /* custom */
|
||||
if (sample_nibble & 8) delta = -delta;
|
||||
sample_decoded += delta;
|
||||
|
||||
*hist1 = clamp16(sample_decoded);
|
||||
*step_index += IMA_IndexTable[sample_nibble];
|
||||
if (*step_index < 0) *step_index=0;
|
||||
if (*step_index > 88) *step_index=88;
|
||||
}
|
||||
|
||||
/* ************************************ */
|
||||
/* DVI/IMA */
|
||||
/* ************************************ */
|
||||
|
@ -176,7 +178,6 @@ static void ubi_ima_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset,
|
|||
* For vgmstream, low nibble is called "IMA ADPCM" and high nibble is "DVI IMA ADPCM" (same thing though). */
|
||||
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) {
|
||||
int i, sample_count = 0;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
|
@ -186,7 +187,7 @@ void decode_standard_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channel
|
|||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
|
||||
/* decode nibbles */
|
||||
/* decode nibbles (layout: varies) */
|
||||
for (i = first_sample; i < first_sample + samples_to_do; i++, sample_count += channelspacing) {
|
||||
off_t byte_offset = is_stereo ?
|
||||
stream->offset + i : /* stereo: one nibble per channel */
|
||||
|
@ -205,7 +206,6 @@ void decode_standard_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channel
|
|||
|
||||
void decode_3ds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i, sample_count;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
|
@ -227,7 +227,6 @@ void decode_3ds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspaci
|
|||
|
||||
void decode_snds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
|
@ -249,7 +248,6 @@ void decode_snds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspac
|
|||
|
||||
void decode_otns_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
|
@ -275,20 +273,20 @@ void decode_otns_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample *
|
|||
/* MS-IMA */
|
||||
/* ************************************ */
|
||||
|
||||
/* IMA with variable-sized frames, header and custom nibble layout (outputs non-aligned number of samples).
|
||||
/* IMA with custom frame sizes, header and nibble layout. Outputs an odd number of samples per frame,
|
||||
* so to simplify calcs this decodes full frames, thus hist doesn't need to be mantained.
|
||||
* Officially defined in "Microsoft Multimedia Standards Update" doc (RIFFNEW.pdf). */
|
||||
void decode_ms_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, samples_read = 0, samples_done = 0, max_samples;
|
||||
|
||||
int32_t hist1;// = stream->adpcm_history1_32;
|
||||
int step_index;// = stream->adpcm_step_index;
|
||||
|
||||
/* internal interleave (configurable size), mixed channels (4 byte per ch) */
|
||||
/* internal interleave (configurable size), mixed channels */
|
||||
int block_samples = ((vgmstream->interleave_block_size - 0x04*vgmstream->channels) * 2 / vgmstream->channels) + 1;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
/* normal header (hist+step+reserved per channel) */
|
||||
{
|
||||
/* normal header (hist+step+reserved), per channel */
|
||||
{ //if (first_sample == 0) {
|
||||
off_t header_offset = stream->offset + 0x04*channel;
|
||||
|
||||
hist1 = read_16bitLE(header_offset+0x00,stream->streamfile);
|
||||
|
@ -296,7 +294,7 @@ void decode_ms_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * ou
|
|||
if (step_index < 0) step_index = 0;
|
||||
if (step_index > 88) step_index = 88;
|
||||
|
||||
/* write header sample */
|
||||
/* write header sample (odd samples per block) */
|
||||
if (samples_read >= first_sample && samples_done < samples_to_do) {
|
||||
outbuf[samples_done * channelspacing] = (short)hist1;
|
||||
samples_done++;
|
||||
|
@ -308,12 +306,12 @@ void decode_ms_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * ou
|
|||
if (max_samples > samples_to_do + first_sample - samples_done)
|
||||
max_samples = samples_to_do + first_sample - samples_done; /* for smaller last block */
|
||||
|
||||
/* decode nibbles (layout: alternates 4*2 nibbles per channel) */
|
||||
/* decode nibbles (layout: alternates 4 bytes/4*2 nibbles per channel) */
|
||||
for (i = 0; i < max_samples; i++) {
|
||||
off_t byte_offset = stream->offset + 0x04*vgmstream->channels + 0x04*channel + 0x04*vgmstream->channels*(i/8) + (i%8)/2;
|
||||
int nibble_shift = (i&1?4:0); /* low nibble first */
|
||||
|
||||
std_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
std_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index); /* original expand */
|
||||
|
||||
if (samples_read >= first_sample && samples_done < samples_to_do) {
|
||||
outbuf[samples_done * channelspacing] = (short)(hist1);
|
||||
|
@ -331,24 +329,23 @@ void decode_ms_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * ou
|
|||
//stream->adpcm_step_index = step_index;
|
||||
}
|
||||
|
||||
/* Reflection's MS-IMA (some layout info from XA2WAV by Deniz Oezmen) */
|
||||
/* Reflection's MS-IMA with custom nibble layout (some info from XA2WAV by Deniz Oezmen) */
|
||||
void decode_ref_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, samples_read = 0, samples_done = 0, max_samples;
|
||||
|
||||
int32_t hist1;// = stream->adpcm_history1_32;
|
||||
int step_index;// = stream->adpcm_step_index;
|
||||
|
||||
/* internal interleave (configurable size), mixed channels (4 byte per ch) */
|
||||
/* internal interleave (configurable size), mixed channels */
|
||||
int block_channel_size = (vgmstream->interleave_block_size - 0x04*vgmstream->channels) / vgmstream->channels;
|
||||
int block_samples = ((vgmstream->interleave_block_size - 0x04*vgmstream->channels) * 2 / vgmstream->channels) + 1;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
/* normal header (hist+step+reserved per channel) */
|
||||
{
|
||||
/* normal header (hist+step+reserved), per channel */
|
||||
{ //if (first_sample == 0) {
|
||||
off_t header_offset = stream->offset + 0x04*channel;
|
||||
|
||||
hist1 = read_16bitLE(header_offset+0x00,stream->streamfile);
|
||||
step_index = read_8bit(header_offset+0x02,stream->streamfile); /* 0x03: reserved */
|
||||
step_index = read_8bit(header_offset+0x02,stream->streamfile);
|
||||
if (step_index < 0) step_index = 0;
|
||||
if (step_index > 88) step_index = 88;
|
||||
|
||||
|
@ -391,90 +388,93 @@ void decode_ref_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * o
|
|||
/* XBOX-IMA */
|
||||
/* ************************************ */
|
||||
|
||||
/* MS-IMA with fixed frame size, skips last sample per channel (for aligment) and custom multichannel nibble layout.
|
||||
* For multichannel the layout is (I think) mixed stereo channels (ex. 6ch: 2ch + 2ch + 2ch) */
|
||||
void decode_xbox_ima(VGMSTREAM * vgmstream,VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel) {
|
||||
int i, sample_count;
|
||||
|
||||
/* MS-IMA with fixed frame size, and outputs an even number of samples per frame (skips last nibble).
|
||||
* Defined in Xbox's SDK. Multichannel interleaves 2ch*N/2, or 1ch*N with odd num_channels
|
||||
* (seen in some Koei .wav, could be simplified as interleaved stereo) --unsure if official. */
|
||||
void decode_xbox_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count = 0;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
off_t offset = stream->offset;
|
||||
|
||||
//internal interleave (0x20+4 size), mixed channels (4 byte per ch, mixed stereo)
|
||||
int block_samples = (vgmstream->channels==1) ?
|
||||
32 :
|
||||
32*(vgmstream->channels&2);//todo this can be zero in 4/5/8ch = SEGFAULT using % below
|
||||
/* internal interleave (fixed size), mixed channels */
|
||||
int block_samples = (0x24-0x4) * 2;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
//normal header (per channel)
|
||||
/* normal header (hist+step+reserved), per stereo/mono channel in blocks */
|
||||
if (first_sample == 0) {
|
||||
off_t header_offset;
|
||||
header_offset = stream->offset + 4*(channel%2);
|
||||
off_t header_offset = (channelspacing & 1) ?
|
||||
stream->offset + 0x24*(channel) + 0x00:
|
||||
stream->offset + 0x48*(channel/2) + 0x04*(channel%2);
|
||||
|
||||
hist1 = read_16bitLE(header_offset,stream->streamfile);
|
||||
step_index = read_16bitLE(header_offset+2,stream->streamfile);
|
||||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
}
|
||||
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
int nibble_shift;
|
||||
|
||||
offset = (channelspacing==1) ?
|
||||
stream->offset + 4*(channel%2) + 4 + i/8*4 + (i%8)/2 :
|
||||
stream->offset + 4*(channel%2) + 4*2 + i/8*4*2 + (i%8)/2;
|
||||
nibble_shift = (i&1?4:0); //low nibble first
|
||||
|
||||
std_ima_expand_nibble(stream, offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
}
|
||||
|
||||
//internal interleave: increment offset on complete frame
|
||||
if (channelspacing==1) { /* mono */
|
||||
if (offset-stream->offset == 32+3) // ??
|
||||
stream->offset += 0x24;
|
||||
} else {
|
||||
if (offset-stream->offset == 64+(4*(channel%2))+3) // ??
|
||||
stream->offset += 0x24*channelspacing;
|
||||
}
|
||||
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
|
||||
/* mono XBOX-IMA ADPCM for interleave */
|
||||
void decode_xbox_ima_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count = 0, num_frame;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
//external interleave
|
||||
int block_samples = (0x24 - 0x4) * 2; /* block size - header, 2 samples per byte */
|
||||
num_frame = first_sample / block_samples;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
//normal header
|
||||
if (first_sample == 0) {
|
||||
off_t header_offset = stream->offset + 0x24*num_frame;
|
||||
|
||||
hist1 = read_16bitLE(header_offset,stream->streamfile);
|
||||
step_index = read_8bit(header_offset+2,stream->streamfile);
|
||||
hist1 = read_16bitLE(header_offset+0x00,stream->streamfile);
|
||||
step_index = read_8bit(header_offset+0x02,stream->streamfile);
|
||||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
|
||||
//must write history from header as last nibble/sample in block is almost always 0 / not encoded
|
||||
/* write header sample (even samples per block, skips last nibble) */
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count += channelspacing;
|
||||
first_sample += 1;
|
||||
samples_to_do -= 1;
|
||||
}
|
||||
|
||||
for (i=first_sample; i < first_sample + samples_to_do; i++) { /* first_sample + samples_to_do should be block_samples at most */
|
||||
off_t byte_offset = (stream->offset + 0x24*num_frame + 0x4) + (i-1)/2;
|
||||
int nibble_shift = ((i-1)&1?4:0); //low nibble first
|
||||
/* decode nibbles (layout: alternates 4 bytes/4*2 nibbles per channel, in stereo blocks) */
|
||||
for (i = first_sample; i < first_sample + samples_to_do; i++) {
|
||||
off_t byte_offset = (channelspacing & 1) ?
|
||||
(stream->offset + 0x24*(channel) + 0x04) + (i-1)/2:
|
||||
(stream->offset + 0x48*(channel/2) + 0x04*2) + 0x04*(channel%2) + 0x04*2*((i-1)/8) + ((i-1)%8)/2;
|
||||
int nibble_shift = ((i-1)&1?4:0); /* low nibble first */
|
||||
|
||||
//last nibble/sample in block is ignored (next header sample contains it)
|
||||
/* must skip last nibble per official decoder, probably not needed though */
|
||||
if (i < block_samples) {
|
||||
std_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count += channelspacing;
|
||||
}
|
||||
}
|
||||
|
||||
/* internal interleave: increment offset on complete frame */
|
||||
if (i == block_samples) {
|
||||
stream->offset += 0x24*channelspacing;
|
||||
}
|
||||
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
|
||||
/* Multichannel XBOX-IMA ADPCM, with all channels mixed in the same block (equivalent to multichannel MS-IMA; seen in .rsd XADP). */
|
||||
void decode_xbox_ima_mch(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count = 0, num_frame;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
/* external interleave (fixed size), multichannel */
|
||||
int block_samples = (0x24 - 0x4) * 2;
|
||||
num_frame = first_sample / block_samples;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
/* normal header (hist+step+reserved), multichannel */
|
||||
if (first_sample == 0) {
|
||||
off_t header_offset = stream->offset + 0x24*channelspacing*num_frame + 0x04*channel;
|
||||
|
||||
hist1 = read_16bitLE(header_offset+0x00,stream->streamfile);
|
||||
step_index = read_8bit(header_offset+0x02,stream->streamfile);
|
||||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
|
||||
/* write header sample (even samples per block, skips last nibble) */
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count += channelspacing;
|
||||
first_sample += 1;
|
||||
samples_to_do -= 1;
|
||||
}
|
||||
|
||||
/* decode nibbles (layout: alternates 4 bytes/4*2 nibbles per channel) */
|
||||
for (i = first_sample; i < first_sample + samples_to_do; i++) {
|
||||
off_t byte_offset = (stream->offset + 0x24*channelspacing*num_frame + 0x04*channelspacing) + 0x04*channel + 0x04*channelspacing*((i-1)/8) + ((i-1)%8)/2;
|
||||
int nibble_shift = ((i-1)&1?4:0); /* low nibble first */
|
||||
|
||||
/* must skip last nibble per spec, rarely needed though */
|
||||
if (i < block_samples) {
|
||||
std_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
|
@ -486,39 +486,86 @@ void decode_xbox_ima_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channel
|
|||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
|
||||
void decode_nds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i, sample_count;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_16;//todo unneeded 16?
|
||||
/* Mono XBOX-IMA ADPCM, used for interleave. Also defined in Xbox's SDK. */
|
||||
void decode_xbox_ima_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count = 0, num_frame;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
//external interleave
|
||||
/* external interleave (fixed size), mono */
|
||||
int block_samples = (0x24 - 0x4) * 2;
|
||||
num_frame = first_sample / block_samples;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
//normal header
|
||||
/* normal header (hist+step+reserved), single channel */
|
||||
if (first_sample == 0) {
|
||||
off_t header_offset = stream->offset + 0x24*num_frame;
|
||||
|
||||
hist1 = read_16bitLE(header_offset+0x00,stream->streamfile);
|
||||
step_index = read_8bit(header_offset+0x02,stream->streamfile);
|
||||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
|
||||
/* write header sample (even samples per block, skips last nibble) */
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count += channelspacing;
|
||||
first_sample += 1;
|
||||
samples_to_do -= 1;
|
||||
}
|
||||
|
||||
/* decode nibbles (layout: all nibbles from one channel) */
|
||||
for (i = first_sample; i < first_sample + samples_to_do; i++) {
|
||||
off_t byte_offset = (stream->offset + 0x24*num_frame + 0x4) + (i-1)/2;
|
||||
int nibble_shift = ((i-1)&1?4:0); /* low nibble first */
|
||||
|
||||
/* must skip last nibble per spec, rarely needed though (ex. Gauntlet Dark Legacy) */
|
||||
if (i < block_samples) {
|
||||
std_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count += channelspacing;
|
||||
}
|
||||
}
|
||||
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
|
||||
/* Similar to MS-IMA with even number of samples, header sample is not written (setup only).
|
||||
* Apparently clamps to -32767 unlike standard's -32768 (probably not noticeable).
|
||||
* Info here: http://problemkaputt.de/gbatek.htm#dssoundnotes */
|
||||
void decode_nds_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i, sample_count;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
/* external interleave (configurable size), mono */
|
||||
|
||||
/* normal header (hist+step+reserved), single channel */
|
||||
if (first_sample == 0) {
|
||||
off_t header_offset = stream->offset;
|
||||
|
||||
hist1 = read_16bitLE(header_offset,stream->streamfile);
|
||||
step_index = read_16bitLE(header_offset+2,stream->streamfile);
|
||||
|
||||
//todo clip step_index?
|
||||
if (step_index < 0) step_index=0; /* probably pre-adjusted */
|
||||
if (step_index > 88) step_index=88;
|
||||
}
|
||||
|
||||
/* decode nibbles (layout: all nibbles from the channel) */
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
off_t byte_offset = stream->offset + 4 + i/2;
|
||||
int nibble_shift = (i&1?4:0); //low nibble first
|
||||
off_t byte_offset = stream->offset + 0x04 + i/2;
|
||||
int nibble_shift = (i&1?4:0); /* low nibble first */
|
||||
|
||||
//todo waveform has minor deviations using known expands
|
||||
std_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
}
|
||||
|
||||
stream->adpcm_history1_16 = hist1;
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
|
||||
void decode_dat4_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i, sample_count;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_16;//todo unneeded 16?
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
|
@ -548,7 +595,6 @@ void decode_dat4_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspac
|
|||
|
||||
void decode_rad_ima(VGMSTREAM * vgmstream,VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel) {
|
||||
int i, sample_count;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
|
@ -583,7 +629,6 @@ void decode_rad_ima(VGMSTREAM * vgmstream,VGMSTREAMCHANNEL * stream, sample * ou
|
|||
|
||||
void decode_rad_ima_mono(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i, sample_count;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
|
@ -613,6 +658,7 @@ void decode_rad_ima_mono(VGMSTREAMCHANNEL * stream, sample * outbuf, int channel
|
|||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
|
||||
/* Apple's IMA4, a.k.a QuickTime IMA. 2 byte header and header sample is not written (setup only). */
|
||||
void decode_apple_ima4(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i, sample_count, num_frame;
|
||||
int16_t hist1 = stream->adpcm_history1_16;//todo unneeded 16?
|
||||
|
@ -647,91 +693,99 @@ void decode_apple_ima4(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelsp
|
|||
|
||||
/* XBOX-IMA with modified data layout */
|
||||
void decode_fsb_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel) {
|
||||
int i, sample_count;
|
||||
|
||||
int i, sample_count = 0;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
//internal interleave
|
||||
int block_samples = (0x24 - 4) * 2; /* block size - header, 2 samples per byte */
|
||||
/* internal interleave (configurable size), mixed channels */
|
||||
int block_samples = (0x24 - 0x4) * 2;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
//interleaved header (all hist per channel + all step_index per channel)
|
||||
/* interleaved header (all hist per channel + all step_index+reserved per channel) */
|
||||
if (first_sample == 0) {
|
||||
off_t hist_offset = stream->offset + 2*channel;
|
||||
off_t step_offset = stream->offset + 2*channel + 2*vgmstream->channels;
|
||||
off_t hist_offset = stream->offset + 0x02*channel + 0x00;
|
||||
off_t step_offset = stream->offset + 0x02*channel + 0x02*vgmstream->channels;
|
||||
|
||||
hist1 = read_16bitLE(hist_offset,stream->streamfile);
|
||||
hist1 = read_16bitLE(hist_offset,stream->streamfile);
|
||||
step_index = read_8bit(step_offset,stream->streamfile);
|
||||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
}
|
||||
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
off_t byte_offset = stream->offset + 4*vgmstream->channels + 2*channel + i/4*2*vgmstream->channels + (i%4)/2;//2-byte per channel
|
||||
int nibble_shift = (i&1?4:0); //low nibble first
|
||||
|
||||
std_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
}
|
||||
|
||||
//internal interleave: increment offset on complete frame
|
||||
if (i == block_samples) stream->offset += 36*vgmstream->channels;
|
||||
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
|
||||
/* XBOX-IMA with modified data layout */
|
||||
void decode_wwise_ima(VGMSTREAM * vgmstream,VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count = 0;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
//internal interleave (configurable size), block-interleave multichannel (ex. if block is 0xD8 in 6ch: 6 blocks of 4+0x20)
|
||||
int block_samples = (vgmstream->interleave_block_size - 4*vgmstream->channels) * 2 / vgmstream->channels;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
//block-interleaved header (1 header per channel block); can be LE or BE
|
||||
if (first_sample == 0) {
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = vgmstream->codec_endian ? read_16bitBE : read_16bitLE;
|
||||
off_t header_offset = stream->offset + (vgmstream->interleave_block_size / vgmstream->channels)*channel;
|
||||
|
||||
hist1 = read_16bit(header_offset,stream->streamfile);
|
||||
step_index = read_8bit(header_offset+2,stream->streamfile);
|
||||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
|
||||
//must write history from header as last nibble/sample in block is almost always 0 / not encoded
|
||||
/* write header sample (even samples per block, skips last nibble) */
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count += channelspacing;
|
||||
first_sample += 1;
|
||||
samples_to_do -= 1;
|
||||
}
|
||||
|
||||
for (i=first_sample; i < first_sample + samples_to_do; i++) { /* first_sample + samples_to_do should be block_samples at most */
|
||||
off_t byte_offset = stream->offset + (vgmstream->interleave_block_size / vgmstream->channels)*channel + 4 + (i-1)/2;
|
||||
int nibble_shift = ((i-1)&1?4:0); //low nibble first
|
||||
/* decode nibbles (layout: 2 bytes/2*2 nibbles per channel) */
|
||||
for (i = first_sample; i < first_sample + samples_to_do; i++) {
|
||||
off_t byte_offset = stream->offset + 0x04*vgmstream->channels + 0x02*channel + (i-1)/4*2*vgmstream->channels + ((i-1)%4)/2;
|
||||
int nibble_shift = ((i-1)&1?4:0); /* low nibble first */
|
||||
|
||||
//last nibble/sample in block is ignored (next header sample contains it)
|
||||
/* must skip last nibble per official decoder, probably not needed though */
|
||||
if (i < block_samples) {
|
||||
std_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count+=channelspacing;
|
||||
sample_count += channelspacing;
|
||||
}
|
||||
}
|
||||
|
||||
//internal interleave: increment offset on complete frame
|
||||
if (i == block_samples) stream->offset += vgmstream->interleave_block_size;
|
||||
/* internal interleave: increment offset on complete frame */
|
||||
if (i == block_samples) {
|
||||
stream->offset += 0x24*vgmstream->channels;
|
||||
}
|
||||
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
//todo atenuation: apparently from hcs's analysis Wwise IMA expands nibbles slightly different, reducing clipping/dbs
|
||||
/*
|
||||
From Wwise_v2015.1.6_Build5553_SDK.Linux
|
||||
<_ZN13CAkADPCMCodec12DecodeSampleEiii>:
|
||||
|
||||
/* mono XBOX-IMA with header endianness and alt nibble expand (per hcs's decompilation) */
|
||||
void decode_wwise_ima(VGMSTREAM * vgmstream, VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count = 0, num_frame;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_index = stream->adpcm_step_index;
|
||||
|
||||
/* external interleave (fixed size), mono */
|
||||
int block_samples = (0x24 - 0x4) * 2;
|
||||
num_frame = first_sample / block_samples;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
/* normal header (hist+step+reserved), single channel */
|
||||
if (first_sample == 0) {
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = vgmstream->codec_endian ? read_16bitBE : read_16bitLE;
|
||||
off_t header_offset = stream->offset + 0x24*num_frame;
|
||||
|
||||
hist1 = read_16bit(header_offset,stream->streamfile);
|
||||
step_index = read_8bit(header_offset+2,stream->streamfile);
|
||||
if (step_index < 0) step_index=0;
|
||||
if (step_index > 88) step_index=88;
|
||||
|
||||
/* write header sample (even samples per block, skips last nibble) */
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count += channelspacing;
|
||||
first_sample += 1;
|
||||
samples_to_do -= 1;
|
||||
}
|
||||
|
||||
/* decode nibbles (layout: all nibbles from one channel) */
|
||||
for (i = first_sample; i < first_sample + samples_to_do; i++) {
|
||||
off_t byte_offset = (stream->offset + 0x24*num_frame + 0x4) + (i-1)/2;
|
||||
int nibble_shift = ((i-1)&1?4:0); /* low nibble first */
|
||||
|
||||
/* must skip last nibble like other XBOX-IMAs, often needed (ex. Bayonetta 2 sfx) */
|
||||
if (i < block_samples) {
|
||||
std_ima_expand_nibble_mul(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1);
|
||||
sample_count += channelspacing;
|
||||
}
|
||||
}
|
||||
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_index;
|
||||
}
|
||||
/* from hcs's analysis Wwise IMA expands nibbles slightly different, reducing dbs. Just "MUL" expand?
|
||||
<_ZN13CAkADPCMCodec12DecodeSampleEiii>: //From Wwise_v2015.1.6_Build5553_SDK.Linux
|
||||
10: 83 e0 07 and $0x7,%eax ; sample
|
||||
13: 01 c0 add %eax,%eax ; sample*2
|
||||
15: 83 c0 01 add $0x1,%eax ; sample*2+1
|
||||
|
@ -740,8 +794,6 @@ From Wwise_v2015.1.6_Build5553_SDK.Linux
|
|||
1f: 85 c0 test %eax,%eax ; result negative?
|
||||
21: 0f 48 c2 cmovs %edx,%eax ; adjust if negative to fix rounding for below division
|
||||
24: c1 f8 03 sar $0x3,%eax ; (sample*2+1)*scale/8
|
||||
|
||||
Different rounding model vs IMA's shift-and-add (also "adjust" step may be unnecessary).
|
||||
*/
|
||||
|
||||
/* MS-IMA with possibly the XBOX-IMA model of even number of samples per block (more tests are needed) */
|
||||
|
@ -832,7 +884,7 @@ void decode_ubi_ima(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspaci
|
|||
(!(i%2) ? 4:0) : /* mono mode (high first) */
|
||||
(channel==0 ? 4:0); /* stereo mode (high=L,low=R) */
|
||||
|
||||
ubi_ima_expand_nibble(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
std_ima_expand_nibble_mul(stream, byte_offset,nibble_shift, &hist1, &step_index);
|
||||
outbuf[sample_count] = (short)(hist1); /* all samples are written */
|
||||
}
|
||||
|
||||
|
@ -849,7 +901,7 @@ size_t ima_bytes_to_samples(size_t bytes, int channels) {
|
|||
}
|
||||
|
||||
size_t ms_ima_bytes_to_samples(size_t bytes, int block_align, int channels) {
|
||||
/* MS IMA blocks have a 4 byte header per channel; 2 samples per byte (2 nibbles) */
|
||||
/* MS-IMA blocks have a 4 byte header per channel; 2 samples per byte (2 nibbles) */
|
||||
return (bytes / block_align) * ((block_align - 0x04*channels) * 2 / channels + 1)
|
||||
+ ((bytes % block_align) ? (((bytes % block_align) - 0x04*channels) * 2 / channels + 1) : 0);
|
||||
}
|
||||
|
@ -858,7 +910,13 @@ size_t xbox_ima_bytes_to_samples(size_t bytes, int channels) {
|
|||
int block_align = 0x24 * channels;
|
||||
/* XBOX IMA blocks have a 4 byte header per channel; 2 samples per byte (2 nibbles) */
|
||||
return (bytes / block_align) * (block_align - 4 * channels) * 2 / channels
|
||||
+ ((bytes % block_align) ? ((bytes % block_align) - 4 * channels) * 2 / channels : 0); //todo probably not possible (aligned)
|
||||
+ ((bytes % block_align) ? ((bytes % block_align) - 4 * channels) * 2 / channels : 0); /* unlikely (encoder aligns) */
|
||||
}
|
||||
|
||||
size_t apple_ima4_bytes_to_samples(size_t bytes, int channels) {
|
||||
int block_align = 0x22 * channels;
|
||||
return (bytes / block_align) * (block_align - 0x02*channels) * 2 / channels
|
||||
+ ((bytes % block_align) ? ((bytes % block_align) - 0x02*channels) * 2 / channels : 0);
|
||||
}
|
||||
|
||||
size_t ubi_ima_bytes_to_samples(size_t bytes, int channels, STREAMFILE *streamFile, off_t offset) {
|
||||
|
|
|
@ -86,6 +86,8 @@ void decode_mp4_aac(mp4_aac_codec_data * data, sample * outbuf, int32_t samples_
|
|||
|
||||
void reset_mp4_aac(VGMSTREAM *vgmstream) {
|
||||
mp4_aac_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
data->sampleId = 0;
|
||||
data->sample_ptr = data->samples_per_frame;
|
||||
data->samples_discard = 0;
|
||||
|
@ -93,6 +95,8 @@ void reset_mp4_aac(VGMSTREAM *vgmstream) {
|
|||
|
||||
void seek_mp4_aac(VGMSTREAM *vgmstream, int32_t num_sample) {
|
||||
mp4_aac_codec_data *data = (mp4_aac_codec_data *)(vgmstream->codec_data);
|
||||
if (!data) return;
|
||||
|
||||
data->sampleId = 0;
|
||||
data->sample_ptr = data->samples_per_frame;
|
||||
data->samples_discard = num_sample;
|
||||
|
|
|
@ -58,7 +58,11 @@ int mpeg_custom_setup_init_default(STREAMFILE *streamFile, off_t start_offset, m
|
|||
break;
|
||||
|
||||
case MPEG_LYN:
|
||||
goto fail; /* not fully implemented */
|
||||
if (data->config.interleave <= 0)
|
||||
goto fail; /* needs external fixed size */
|
||||
data->default_buffer_size = data->config.interleave;
|
||||
//todo simplify/unify XVAG/P3D/SCD/LYN and just feed arbitrary chunks to the decoder
|
||||
break;
|
||||
|
||||
case MPEG_STANDARD:
|
||||
case MPEG_AHX:
|
||||
|
@ -137,9 +141,9 @@ int mpeg_custom_parse_frame_default(VGMSTREAMCHANNEL *stream, mpeg_codec_data *d
|
|||
|
||||
case MPEG_P3D: /* fixed interleave, not frame-aligned (ie. blocks may end/start in part of a frame) */
|
||||
case MPEG_SCD:
|
||||
case MPEG_LYN:
|
||||
current_interleave = data->config.interleave;
|
||||
|
||||
#if 1
|
||||
/* check if current interleave block is short */
|
||||
{
|
||||
off_t block_offset = stream->offset - stream->channel_start_offset;
|
||||
|
@ -148,7 +152,7 @@ int mpeg_custom_parse_frame_default(VGMSTREAMCHANNEL *stream, mpeg_codec_data *d
|
|||
if (data->config.data_size && block_offset + next_block >= data->config.data_size)
|
||||
current_interleave = (data->config.data_size % next_block) / data->streams_size; /* short_interleave*/
|
||||
}
|
||||
#endif
|
||||
|
||||
current_interleave_pre = current_interleave*num_stream;
|
||||
current_interleave_post = current_interleave*(data->streams_size-1) - current_interleave_pre;
|
||||
|
||||
|
@ -162,7 +166,7 @@ int mpeg_custom_parse_frame_default(VGMSTREAMCHANNEL *stream, mpeg_codec_data *d
|
|||
break;
|
||||
}
|
||||
if (!current_data_size || current_data_size > ms->buffer_size) {
|
||||
VGM_LOG("MPEG: incorrect data_size 0x%x\n", current_data_size);
|
||||
VGM_LOG("MPEG: incorrect data_size 0x%x vs buffer 0x%x\n", current_data_size, ms->buffer_size);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
@ -147,10 +147,12 @@ int mpeg_custom_parse_frame_ealayer3(VGMSTREAMCHANNEL *stream, mpeg_codec_data *
|
|||
|
||||
if (!ealayer3_skip_data(stream, data, num_stream, 0))
|
||||
goto fail;
|
||||
|
||||
}
|
||||
|
||||
// todo rarely there is a block between granules (ex. EAL3 v2P in FIFA 2016)
|
||||
/* In EAL3 V2P sometimes there is a new SNS/SPS block between granules. Instead of trying to fix it here
|
||||
* or in blocked layout (too complex/patchy), SNS/SPS uses a custom streamfile that simply removes all
|
||||
* block headers, so this parser only sees raw EALayer3 data. It also discards samples, which confuses
|
||||
* blocked layout calculations */
|
||||
|
||||
/* get second frame/granule (MPEG1 only) if first granule was found */
|
||||
granule_found = 0;
|
||||
|
@ -298,7 +300,7 @@ static int ealayer3_parse_frame_v2(vgm_bitstream *is, ealayer3_frame_info * eaf)
|
|||
if (!ok) goto fail;
|
||||
}
|
||||
VGM_ASSERT(eaf->v2_extended_flag && eaf->v2_common_size == 0, "EA EAL3: v2 empty frame\n"); /* seen in V2S */
|
||||
VGM_ASSERT(eaf->v2_extended_flag && eaf->v2_mode_value > 0, "EA EAL3: v2_mode=%x with 0x%x\n", eaf->v2_mode, eaf->v2_mode_value);
|
||||
VGM_ASSERT(eaf->v2_extended_flag && eaf->v2_mode_value > 0, "EA EAL3: v2_mode=%x with value=0x%x\n", eaf->v2_mode, eaf->v2_mode_value);
|
||||
//VGM_ASSERT(eaf->v2_pcm_number > 0, "EA EAL3: v2_pcm_number 0x%x\n", eaf->v2_pcm_number);
|
||||
|
||||
eaf->pcm_size = (2*eaf->v2_pcm_number * eaf->channels);
|
||||
|
@ -550,8 +552,6 @@ static int ealayer3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *d
|
|||
size_t bytes_filled;
|
||||
int i;
|
||||
|
||||
if (!eaf->pcm_size)
|
||||
return 1;
|
||||
|
||||
bytes_filled = sizeof(sample)*ms->samples_filled*data->channels_per_frame;
|
||||
if (bytes_filled + eaf->pcm_size > ms->output_buffer_size) {
|
||||
|
@ -561,6 +561,9 @@ static int ealayer3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *d
|
|||
|
||||
|
||||
if (eaf->v1_pcm_number) {
|
||||
if (!eaf->pcm_size)
|
||||
return 1;
|
||||
|
||||
VGM_ASSERT(eaf->v1_pcm_decode_discard > 576, "MPEG EAL3: big discard %i at 0x%lx\n", eaf->v1_pcm_decode_discard, stream->offset);
|
||||
VGM_ASSERT(eaf->v1_pcm_number > 0x100, "MPEG EAL3: big samples %i at 0x%lx\n", eaf->v1_pcm_number, stream->offset);
|
||||
|
||||
|
@ -583,6 +586,7 @@ static int ealayer3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *d
|
|||
decode_to_discard = data->samples_per_frame;//+ eaf->v1_pcm_number;
|
||||
}
|
||||
else {
|
||||
// todo also discard
|
||||
if (decode_to_discard == 0) /* seems ok? */
|
||||
decode_to_discard += data->samples_per_frame;//+ eaf->v1_pcm_number;
|
||||
else if (decode_to_discard == 576) /* untested */
|
||||
|
@ -594,17 +598,6 @@ static int ealayer3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *d
|
|||
|
||||
if (eaf->v2_extended_flag) {
|
||||
|
||||
if (eaf->v2_pcm_number) {
|
||||
/* read + write PCM block samples (always BE) */
|
||||
for (i = 0; i < eaf->v2_pcm_number * data->channels_per_frame; i++) {
|
||||
off_t pcm_offset = stream->offset + eaf->pre_size + eaf->common_size + sizeof(sample)*i;
|
||||
int16_t pcm_sample = read_16bitBE(pcm_offset,stream->streamfile);
|
||||
put_16bitLE(ms->output_buffer + bytes_filled + sizeof(sample)*i, pcm_sample);
|
||||
}
|
||||
ms->samples_filled += eaf->v2_pcm_number;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* todo supposed skip modes (only seen 0x00):
|
||||
*
|
||||
* AB00CCCC CCCCCCCC if A is set: DDEEEEEE EEEEFFFF FFFFFFGG GGGGGGGG
|
||||
|
@ -620,16 +613,27 @@ static int ealayer3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *d
|
|||
* if 3: 576
|
||||
*/
|
||||
|
||||
//;VGM_LOG("EA EAL3 v2: off=%lx, mode=%x, value=%x, pcm=%x, size=%x\n", stream->offset, eaf->v2_mode, eaf->v2_mode_value, eaf->v2_pcm_number, eaf->v2_common_size);
|
||||
|
||||
if (eaf->v2_pcm_number) {
|
||||
/* read + write PCM block samples (always BE) */
|
||||
for (i = 0; i < eaf->v2_pcm_number * data->channels_per_frame; i++) {
|
||||
off_t pcm_offset = stream->offset + eaf->pre_size + eaf->common_size + sizeof(sample)*i;
|
||||
int16_t pcm_sample = read_16bitBE(pcm_offset,stream->streamfile);
|
||||
put_16bitLE(ms->output_buffer + bytes_filled + sizeof(sample)*i, pcm_sample);
|
||||
}
|
||||
ms->samples_filled += eaf->v2_pcm_number;
|
||||
}
|
||||
|
||||
/* modify decoded samples depending on flag */
|
||||
if (eaf->v2_mode == 0x00) {
|
||||
size_t decode_to_discard = eaf->v2_mode_value;
|
||||
|
||||
if (decode_to_discard == 576)
|
||||
decode_to_discard = data->samples_per_frame;//+ eaf->v2_pcm_number;
|
||||
size_t decode_to_discard = eaf->v2_mode_value; /* (usually 0 in V2P, varies in V2S) */
|
||||
if (decode_to_discard == 0)
|
||||
decode_to_discard = 576;
|
||||
|
||||
//todo output seems correct-ish but reaches file end and tries to parse more frames
|
||||
ms->decode_to_discard += decode_to_discard;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -638,7 +642,7 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
/* Skip EA-frames from other streams for multichannel (interleaved 1 EA-frame per stream).
|
||||
/* Skip EA-frames from other streams for .sns/sps multichannel (interleaved 1 EA-frame per stream).
|
||||
* Due to EALayer3 being in blocks and other complexities (we can't go past a block) all
|
||||
* streams's offsets should start in the first stream's EA-frame.
|
||||
*
|
||||
|
@ -649,6 +653,8 @@ fail:
|
|||
* - skip one EA-frame per following streams until offset is in first stream's EA-frame
|
||||
* (ie. 1st stream skips 2, 2nd stream skips 1, 3rd stream skips 0)
|
||||
* - repeat again for granule1
|
||||
*
|
||||
* EALayer3 v1 in SCHl uses external offsets and 1ch multichannel instead.
|
||||
*/
|
||||
static int ealayer3_skip_data(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, int at_start) {
|
||||
int ok, i;
|
||||
|
@ -657,6 +663,9 @@ static int ealayer3_skip_data(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, i
|
|||
uint8_t ibuf[EALAYER3_EA_FRAME_BUFFER_SIZE];
|
||||
int skips = at_start ? num_stream : data->streams_size - 1 - num_stream;
|
||||
|
||||
/* v1 does multichannel with set offsets */
|
||||
if (data->type == MPEG_EAL31)
|
||||
return 1;
|
||||
|
||||
for (i = 0; i < skips; i++) {
|
||||
is.buf = ibuf;
|
||||
|
|
|
@ -130,6 +130,8 @@ mpeg_codec_data *init_mpeg_custom(STREAMFILE *streamFile, off_t start_offset, co
|
|||
memcpy(&data->config, config, sizeof(mpeg_custom_config));
|
||||
data->config.channels = channels;
|
||||
|
||||
data->default_buffer_size = MPEG_DATA_BUFFER_SIZE;
|
||||
|
||||
/* init per subtype */
|
||||
switch(data->type) {
|
||||
case MPEG_EAL31:
|
||||
|
@ -144,6 +146,7 @@ mpeg_codec_data *init_mpeg_custom(STREAMFILE *streamFile, off_t start_offset, co
|
|||
|
||||
if (channels <= 0 || channels > 16) goto fail; /* arbitrary max */
|
||||
if (channels < data->channels_per_frame) goto fail;
|
||||
if (data->default_buffer_size > 0x8000) goto fail;
|
||||
|
||||
|
||||
/* init streams */
|
||||
|
@ -160,7 +163,7 @@ mpeg_codec_data *init_mpeg_custom(STREAMFILE *streamFile, off_t start_offset, co
|
|||
if (!data->streams[i]->output_buffer) goto fail;
|
||||
|
||||
/* one per stream as sometimes mpg123 can't read the whole buffer in one pass */
|
||||
data->streams[i]->buffer_size = MPEG_DATA_BUFFER_SIZE;
|
||||
data->streams[i]->buffer_size = data->default_buffer_size;
|
||||
data->streams[i]->buffer = calloc(sizeof(uint8_t), data->streams[i]->buffer_size);
|
||||
if (!data->streams[i]->buffer) goto fail;
|
||||
}
|
||||
|
@ -499,6 +502,7 @@ void free_mpeg(mpeg_codec_data *data) {
|
|||
void reset_mpeg(VGMSTREAM *vgmstream) {
|
||||
off_t input_offset;
|
||||
mpeg_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
/* reset multistream */ //todo check if stream offsets are properly reset
|
||||
|
||||
|
@ -523,6 +527,7 @@ void reset_mpeg(VGMSTREAM *vgmstream) {
|
|||
void seek_mpeg(VGMSTREAM *vgmstream, int32_t num_sample) {
|
||||
off_t input_offset;
|
||||
mpeg_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
/* seek multistream */
|
||||
if (!data->custom) {
|
||||
|
|
|
@ -22,15 +22,21 @@ void decode_ogg_vorbis(ogg_vorbis_codec_data * data, sample * outbuf, int32_t sa
|
|||
|
||||
|
||||
void reset_ogg_vorbis(VGMSTREAM *vgmstream) {
|
||||
OggVorbis_File *ogg_vorbis_file;
|
||||
ogg_vorbis_codec_data *data = vgmstream->codec_data;
|
||||
OggVorbis_File *ogg_vorbis_file = &(data->ogg_vorbis_file);
|
||||
if (!data) return;
|
||||
|
||||
ogg_vorbis_file = &(data->ogg_vorbis_file);
|
||||
|
||||
ov_pcm_seek(ogg_vorbis_file, 0);
|
||||
}
|
||||
|
||||
void seek_ogg_vorbis(VGMSTREAM *vgmstream, int32_t num_sample) {
|
||||
OggVorbis_File *ogg_vorbis_file;
|
||||
ogg_vorbis_codec_data *data = (ogg_vorbis_codec_data *)(vgmstream->codec_data);
|
||||
OggVorbis_File *ogg_vorbis_file = &(data->ogg_vorbis_file);
|
||||
if (!data) return;
|
||||
|
||||
ogg_vorbis_file = &(data->ogg_vorbis_file);
|
||||
|
||||
ov_pcm_seek_lap(ogg_vorbis_file, num_sample);
|
||||
}
|
||||
|
|
|
@ -78,15 +78,6 @@ void decode_pcm16_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspa
|
|||
}
|
||||
}
|
||||
|
||||
void decode_pcm16LE_XOR_int(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i;
|
||||
int32_t sample_count;
|
||||
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
outbuf[sample_count]=read_16bitLE(stream->offset+i*2*channelspacing,stream->streamfile)^stream->key_xor;
|
||||
}
|
||||
}
|
||||
|
||||
static int expand_ulaw(uint8_t ulawbyte) {
|
||||
int sign, segment, quantization, new_sample;
|
||||
const int bias = 0x84;
|
||||
|
@ -177,7 +168,7 @@ void decode_pcmfloat(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspac
|
|||
int sample_pcm;
|
||||
|
||||
sample_float = (float*)&sample_int;
|
||||
sample_pcm = floor((*sample_float) * 32767.f + .5f);
|
||||
sample_pcm = (int)floor((*sample_float) * 32767.f + .5f);
|
||||
|
||||
outbuf[sample_count] = clamp16(sample_pcm);
|
||||
}
|
||||
|
|
|
@ -110,52 +110,6 @@ void decode_psx(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing,
|
|||
stream->adpcm_history2_32=hist2;
|
||||
}
|
||||
|
||||
/* encrypted */
|
||||
void decode_psx_bmdx(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
|
||||
int predict_nr, shift_factor, sample;
|
||||
int32_t hist1=stream->adpcm_history1_32;
|
||||
int32_t hist2=stream->adpcm_history2_32;
|
||||
|
||||
short scale;
|
||||
int i;
|
||||
int32_t sample_count;
|
||||
uint8_t flag;
|
||||
|
||||
int framesin = first_sample/28;
|
||||
int head = read_8bit(stream->offset+framesin*16,stream->streamfile) ^ stream->bmdx_xor;
|
||||
|
||||
predict_nr = ((head >> 4) & 0xf);
|
||||
shift_factor = (head & 0xf);
|
||||
flag = read_8bit(stream->offset+framesin*16+1,stream->streamfile);
|
||||
|
||||
first_sample = first_sample % 28;
|
||||
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
|
||||
sample=0;
|
||||
|
||||
if(flag<0x07) {
|
||||
|
||||
short sample_byte = (short)read_8bit(stream->offset+(framesin*16)+2+i/2,stream->streamfile);
|
||||
if (i/2 == 0)
|
||||
sample_byte = (short)(int8_t)(sample_byte+stream->bmdx_add);
|
||||
|
||||
scale = ((i&1 ?
|
||||
sample_byte >> 4 :
|
||||
sample_byte & 0x0f)<<12);
|
||||
|
||||
sample=(int)((scale >> shift_factor)+hist1*VAG_f[predict_nr][0]+hist2*VAG_f[predict_nr][1]);
|
||||
}
|
||||
|
||||
outbuf[sample_count] = clamp16(sample);
|
||||
hist2=hist1;
|
||||
hist1=sample;
|
||||
}
|
||||
stream->adpcm_history1_32=hist1;
|
||||
stream->adpcm_history2_32=hist2;
|
||||
}
|
||||
|
||||
/* some games have garbage (?) in their flags, this decoder just ignores that byte */
|
||||
void decode_psx_badflags(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
|
||||
|
@ -257,5 +211,9 @@ void decode_psx_configurable(VGMSTREAMCHANNEL * stream, sample * outbuf, int cha
|
|||
|
||||
|
||||
size_t ps_bytes_to_samples(size_t bytes, int channels) {
|
||||
return bytes / channels / 16 * 28;
|
||||
return bytes / channels / 0x10 * 28;
|
||||
}
|
||||
|
||||
size_t ps_cfg_bytes_to_samples(size_t bytes, size_t frame_size, int channels) {
|
||||
return bytes / channels / frame_size * 28;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ static void pcm_convert_float_to_16(vorbis_custom_codec_data * data, sample * ou
|
|||
sample *ptr = outbuf + i;
|
||||
float *mono = pcm[i];
|
||||
for (j = 0; j < samples_to_do; j++) {
|
||||
int val = floor(mono[j] * 32767.f + .5f);
|
||||
int val = (int)floor(mono[j] * 32767.f + .5f);
|
||||
if (val > 32767) val = 32767;
|
||||
if (val < -32768) val = -32768;
|
||||
|
||||
|
@ -207,6 +207,7 @@ void free_vorbis_custom(vorbis_custom_codec_data * data) {
|
|||
|
||||
void reset_vorbis_custom(VGMSTREAM *vgmstream) {
|
||||
vorbis_custom_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
/* Seeking is provided by the Ogg layer, so with custom vorbis we'd need seek tables instead.
|
||||
* To avoid having to parse different formats we'll just discard until the expected sample */
|
||||
|
@ -216,6 +217,7 @@ void reset_vorbis_custom(VGMSTREAM *vgmstream) {
|
|||
|
||||
void seek_vorbis_custom(VGMSTREAM *vgmstream, int32_t num_sample) {
|
||||
vorbis_custom_codec_data *data = vgmstream->codec_data;
|
||||
if (!data) return;
|
||||
|
||||
/* Seeking is provided by the Ogg layer, so with custom vorbis we'd need seek tables instead.
|
||||
* To avoid having to parse different formats we'll just discard until the expected sample */
|
||||
|
|
|
@ -146,7 +146,12 @@ static int build_header_comment(uint8_t * buf, size_t bufsize) {
|
|||
static int build_header_setup(uint8_t * buf, size_t bufsize, uint32_t setup_id, STREAMFILE *streamFile) {
|
||||
int bytes;
|
||||
|
||||
/* try to load from external files first */
|
||||
/* try to locate from the precompiled list */
|
||||
bytes = load_fvs_array(buf, bufsize, setup_id, streamFile);
|
||||
if (bytes)
|
||||
return bytes;
|
||||
|
||||
/* try to load from external files */
|
||||
bytes = load_fvs_file_single(buf, bufsize, setup_id, streamFile);
|
||||
if (bytes)
|
||||
return bytes;
|
||||
|
@ -155,11 +160,6 @@ static int build_header_setup(uint8_t * buf, size_t bufsize, uint32_t setup_id,
|
|||
if (bytes)
|
||||
return bytes;
|
||||
|
||||
/* try to locate from the precompiled list */
|
||||
bytes = load_fvs_array(buf, bufsize, setup_id, streamFile);
|
||||
if (bytes)
|
||||
return bytes;
|
||||
|
||||
/* not found */
|
||||
VGM_LOG("FSB Vorbis: setup_id %08x not found\n", setup_id);
|
||||
return 0;
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
/* DEFS */
|
||||
/* **************************************************************************** */
|
||||
|
||||
static int build_header_identification(uint8_t * buf, size_t bufsize, int channels, int sample_rate, int blocksize_short, int blocksize_long);
|
||||
static int build_header_comment(uint8_t * buf, size_t bufsize);
|
||||
static int get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_t header_type, int * granulepos, size_t * packet_size, int big_endian);
|
||||
static int rebuild_packet(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian);
|
||||
static int rebuild_setup(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian, int channels);
|
||||
static size_t build_header_identification(uint8_t * buf, size_t bufsize, int channels, int sample_rate, int blocksize_short, int blocksize_long);
|
||||
static size_t build_header_comment(uint8_t * buf, size_t bufsize);
|
||||
static size_t get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_t header_type, int * granulepos, size_t * packet_size, int big_endian);
|
||||
static size_t rebuild_packet(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian);
|
||||
static size_t rebuild_setup(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian, int channels);
|
||||
|
||||
static int ww2ogg_generate_vorbis_packet(vgm_bitstream * ow, vgm_bitstream * iw, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian);
|
||||
static int ww2ogg_generate_vorbis_setup(vgm_bitstream * ow, vgm_bitstream * iw, vorbis_custom_codec_data * data, int channels, size_t packet_size, STREAMFILE *streamFile);
|
||||
|
@ -126,7 +126,7 @@ fail:
|
|||
/* **************************************************************************** */
|
||||
|
||||
/* loads info from a wwise packet header */
|
||||
static int get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_t header_type, int * granulepos, size_t * packet_size, int big_endian) {
|
||||
static size_t get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_t header_type, int * granulepos, size_t * packet_size, int big_endian) {
|
||||
int32_t (*read_32bit)(off_t,STREAMFILE*) = big_endian ? read_32bitBE : read_32bitLE;
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = big_endian ? read_16bitBE : read_16bitLE;
|
||||
|
||||
|
@ -153,7 +153,7 @@ static int get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_
|
|||
}
|
||||
|
||||
/* Transforms a Wwise data packet into a real Vorbis one (depending on config) */
|
||||
static int rebuild_packet(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian) {
|
||||
static size_t rebuild_packet(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian) {
|
||||
vgm_bitstream ow, iw;
|
||||
int rc, granulepos;
|
||||
size_t header_size, packet_size;
|
||||
|
@ -196,7 +196,7 @@ fail:
|
|||
|
||||
|
||||
/* Transforms a Wwise setup packet into a real Vorbis one (depending on config). */
|
||||
static int rebuild_setup(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian, int channels) {
|
||||
static size_t rebuild_setup(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian, int channels) {
|
||||
vgm_bitstream ow, iw;
|
||||
int rc, granulepos;
|
||||
size_t header_size, packet_size;
|
||||
|
@ -238,8 +238,8 @@ fail:
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int build_header_identification(uint8_t * buf, size_t bufsize, int channels, int sample_rate, int blocksize_0_exp, int blocksize_1_exp) {
|
||||
int bytes = 0x1e;
|
||||
static size_t build_header_identification(uint8_t * buf, size_t bufsize, int channels, int sample_rate, int blocksize_0_exp, int blocksize_1_exp) {
|
||||
size_t bytes = 0x1e;
|
||||
uint8_t blocksizes;
|
||||
|
||||
if (bytes > bufsize) return 0;
|
||||
|
@ -260,8 +260,8 @@ static int build_header_identification(uint8_t * buf, size_t bufsize, int channe
|
|||
return bytes;
|
||||
}
|
||||
|
||||
static int build_header_comment(uint8_t * buf, size_t bufsize) {
|
||||
int bytes = 0x19;
|
||||
static size_t build_header_comment(uint8_t * buf, size_t bufsize) {
|
||||
size_t bytes = 0x19;
|
||||
|
||||
if (bytes > bufsize) return 0;
|
||||
|
||||
|
@ -1098,13 +1098,13 @@ static unsigned int ww2ogg_tremor_book_maptype1_quantvals(unsigned int entries,
|
|||
static int load_wvc(uint8_t * ibuf, size_t ibufsize, uint32_t codebook_id, wwise_setup_t setup_type, STREAMFILE *streamFile) {
|
||||
size_t bytes;
|
||||
|
||||
/* try to load from external file (ignoring type, just use file if found) */
|
||||
bytes = load_wvc_file(ibuf, ibufsize, codebook_id, streamFile);
|
||||
/* try to locate from the precompiled list */
|
||||
bytes = load_wvc_array(ibuf, ibufsize, codebook_id, setup_type);
|
||||
if (bytes)
|
||||
return bytes;
|
||||
|
||||
/* try to locate from the precompiled list */
|
||||
bytes = load_wvc_array(ibuf, ibufsize, codebook_id, setup_type);
|
||||
/* try to load from external file (ignoring type, just use file if found) */
|
||||
bytes = load_wvc_file(ibuf, ibufsize, codebook_id, streamFile);
|
||||
if (bytes)
|
||||
return bytes;
|
||||
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
#include "../util.h"
|
||||
#include "coding.h"
|
||||
|
||||
/* fixed point (.8) amount to scale the current step size by */
|
||||
/* part of the same series as used in MS ADPCM "ADPCMTable" */
|
||||
static const unsigned int scale_step[16] = {
|
||||
230, 230, 230, 230, 307, 409, 512, 614,
|
||||
230, 230, 230, 230, 307, 409, 512, 614
|
||||
};
|
||||
|
||||
/* expand an unsigned four bit delta to a wider signed range */
|
||||
static const int scale_delta[16] = {
|
||||
1, 3, 5, 7, 9, 11, 13, 15,
|
||||
-1, -3, -5, -7, -9,-11,-13,-15
|
||||
};
|
||||
|
||||
|
||||
/* raw Yamaha ADPCM a.k.a AICA as it's mainly used in Naomi/Dreamcast (also in RIFF and older arcade sound chips). */
|
||||
void decode_aica(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo) {
|
||||
int i, sample_count;
|
||||
|
||||
int32_t hist1 = stream->adpcm_history1_16;
|
||||
int step_size = stream->adpcm_step_index;
|
||||
|
||||
/* no header (external setup), pre-clamp for wrong values */
|
||||
if (step_size < 0x7f) step_size = 0x7f;
|
||||
if (step_size > 0x6000) step_size = 0x6000;
|
||||
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
int sample_nibble, sample_decoded, sample_delta;
|
||||
off_t byte_offset = is_stereo ?
|
||||
stream->offset + i : /* stereo: one nibble per channel */
|
||||
stream->offset + i/2; /* mono: consecutive nibbles */
|
||||
int nibble_shift = is_stereo ?
|
||||
(!(channel&1) ? 0:4) : /* even = low/L, odd = high/R */
|
||||
(!(i&1) ? 0:4); /* low nibble first */
|
||||
|
||||
/* Yamaha/AICA expand, but same result as IMA's (((delta * 2 + 1) * step) >> 3) */
|
||||
sample_nibble = ((read_8bit(byte_offset,stream->streamfile) >> nibble_shift))&0xf;
|
||||
sample_delta = (step_size * scale_delta[sample_nibble]) / 8;
|
||||
sample_decoded = hist1 + sample_delta;
|
||||
|
||||
outbuf[sample_count] = clamp16(sample_decoded);
|
||||
hist1 = outbuf[sample_count];
|
||||
|
||||
step_size = (step_size * scale_step[sample_nibble]) >> 8;
|
||||
if (step_size < 0x7f) step_size = 0x7f;
|
||||
if (step_size > 0x6000) step_size = 0x6000;
|
||||
}
|
||||
|
||||
stream->adpcm_history1_16 = hist1;
|
||||
stream->adpcm_step_index = step_size;
|
||||
}
|
||||
|
||||
/* Yamaha ADPCM, in headered frames like MS-IMA. Possibly originated from Yamaha's SMAF tools
|
||||
* (Windows ACM encoder/decoder was given in their site). Some info from Rockbox's yamaha_adpcm.c */
|
||||
void decode_yamaha(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel) {
|
||||
int i, sample_count, num_frame;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_size = stream->adpcm_step_index;
|
||||
|
||||
/* external interleave */
|
||||
int block_samples = (0x40 - 0x04*channelspacing) * 2 / channelspacing;
|
||||
num_frame = first_sample / block_samples;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
/* header (hist+step) */
|
||||
if (first_sample == 0) {
|
||||
off_t header_offset = stream->offset + 0x40*num_frame + 0x04*channel;
|
||||
|
||||
hist1 = read_16bitLE(header_offset+0x00,stream->streamfile);
|
||||
step_size = read_16bitLE(header_offset+0x02,stream->streamfile);
|
||||
if (step_size < 0x7f) step_size = 0x7f;
|
||||
if (step_size > 0x6000) step_size = 0x6000;
|
||||
}
|
||||
|
||||
/* decode nibbles (layout: varies) */
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
int sample_nibble, sample_decoded, sample_delta;
|
||||
off_t byte_offset = (channelspacing == 2) ?
|
||||
(stream->offset + 0x40*num_frame + 0x04*channelspacing) + i : /* stereo: one nibble per channel */
|
||||
(stream->offset + 0x40*num_frame + 0x04*channelspacing) + i/2; /* mono: consecutive nibbles */
|
||||
int nibble_shift = (channelspacing == 2) ?
|
||||
(!(channel&1) ? 0:4) :
|
||||
(!(i&1) ? 0:4); /* even = low, odd = high */
|
||||
|
||||
/* Yamaha/AICA expand, but same result as IMA's (((delta * 2 + 1) * step) >> 3) */
|
||||
sample_nibble = (read_8bit(byte_offset,stream->streamfile) >> nibble_shift)&0xf;
|
||||
sample_delta = (step_size * scale_delta[sample_nibble]) / 8;
|
||||
sample_decoded = hist1 + sample_delta;
|
||||
|
||||
outbuf[sample_count] = clamp16(sample_decoded);
|
||||
hist1 = outbuf[sample_count];
|
||||
|
||||
step_size = (step_size * scale_step[sample_nibble]) >> 8;
|
||||
if (step_size < 0x7f) step_size = 0x7f;
|
||||
if (step_size > 0x6000) step_size = 0x6000;
|
||||
}
|
||||
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_size;
|
||||
}
|
||||
|
||||
/* Yamaha ADPCM with unknown expand variation (noisy), step size is double of normal Yamaha? */
|
||||
void decode_yamaha_nxap(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do) {
|
||||
int i, sample_count, num_frame;
|
||||
int32_t hist1 = stream->adpcm_history1_32;
|
||||
int step_size = stream->adpcm_step_index;
|
||||
|
||||
/* external interleave */
|
||||
int block_samples = (0x40 - 0x4) * 2;
|
||||
num_frame = first_sample / block_samples;
|
||||
first_sample = first_sample % block_samples;
|
||||
|
||||
/* header (hist+step) */
|
||||
if (first_sample == 0) {
|
||||
off_t header_offset = stream->offset + 0x40*num_frame;
|
||||
|
||||
hist1 = read_16bitLE(header_offset+0x00,stream->streamfile);
|
||||
step_size = read_16bitLE(header_offset+0x02,stream->streamfile);
|
||||
if (step_size < 0x7f) step_size = 0x7f;
|
||||
if (step_size > 0x6000) step_size = 0x6000;
|
||||
}
|
||||
|
||||
/* decode nibbles (layout: all nibbles from one channel) */
|
||||
for (i=first_sample,sample_count=0; i<first_sample+samples_to_do; i++,sample_count+=channelspacing) {
|
||||
int sample_nibble, sample_decoded, sample_delta;
|
||||
off_t byte_offset = (stream->offset + 0x40*num_frame + 0x04) + i/2;
|
||||
int nibble_shift = (i&1?4:0); /* low nibble first */
|
||||
|
||||
/* Yamaha expand? */
|
||||
sample_nibble = (read_8bit(byte_offset,stream->streamfile) >> nibble_shift)&0xf;
|
||||
sample_delta = (step_size * scale_delta[sample_nibble] / 4) / 8; //todo not ok
|
||||
sample_decoded = hist1 + sample_delta;
|
||||
|
||||
outbuf[sample_count] = clamp16(sample_decoded);
|
||||
hist1 = outbuf[sample_count];
|
||||
|
||||
step_size = (step_size * scale_step[sample_nibble]) >> 8;
|
||||
if (step_size < 0x7f) step_size = 0x7f;
|
||||
if (step_size > 0x6000) step_size = 0x6000;
|
||||
}
|
||||
|
||||
stream->adpcm_history1_32 = hist1;
|
||||
stream->adpcm_step_index = step_size;
|
||||
}
|
||||
|
||||
size_t aica_bytes_to_samples(size_t bytes, int channels) {
|
||||
/* 2 samples per byte (2 nibbles) in stereo or mono config */
|
||||
return bytes * 2 / channels;
|
||||
}
|
||||
|
||||
size_t yamaha_bytes_to_samples(size_t bytes, int channels) {
|
||||
int block_align = 0x40;
|
||||
|
||||
return (bytes / block_align) * (block_align - 0x04*channels) * 2 / channels
|
||||
+ ((bytes % block_align) ? ((bytes % block_align) - 0x04*channels) * 2 / channels : 0);
|
||||
}
|
|
@ -19,6 +19,7 @@ static const char* extension_list[] = {
|
|||
//"ac3", //FFmpeg, not parsed //common?
|
||||
"ace", //fake, for tri-Ace's formats (to be removed)
|
||||
"acm",
|
||||
"ad", //txth/reserved [Xenosaga Freaks (PS2)]
|
||||
"adm",
|
||||
"adp",
|
||||
"adpcm",
|
||||
|
@ -43,7 +44,9 @@ static const char* extension_list[] = {
|
|||
"ast",
|
||||
"at3",
|
||||
"at9",
|
||||
"atsl",
|
||||
"atsl3",
|
||||
"atsl4",
|
||||
"atx",
|
||||
"aud",
|
||||
"aus",
|
||||
|
@ -86,10 +89,11 @@ static const char* extension_list[] = {
|
|||
"cbd2",
|
||||
"ccc",
|
||||
"cd",
|
||||
"cfn",
|
||||
"cfn", //fake extension/header id for .caf (to be removed)
|
||||
"ckd",
|
||||
"cnk",
|
||||
"cps",
|
||||
"cvs",
|
||||
"cxs",
|
||||
|
||||
"da",
|
||||
|
@ -105,8 +109,10 @@ static const char* extension_list[] = {
|
|||
"dvi",
|
||||
"dxh",
|
||||
|
||||
"e4x",
|
||||
"eam",
|
||||
"emff",
|
||||
"eno",
|
||||
"enth",
|
||||
"exa",
|
||||
"ezw",
|
||||
|
@ -116,6 +122,7 @@ static const char* extension_list[] = {
|
|||
"filp",
|
||||
"flx",
|
||||
"fsb",
|
||||
"fsv",
|
||||
"fwav",
|
||||
|
||||
"g1l",
|
||||
|
@ -159,10 +166,12 @@ static const char* extension_list[] = {
|
|||
"khv",
|
||||
"km9",
|
||||
"kovs", //.kvs header id
|
||||
"kns",
|
||||
"kraw",
|
||||
"ktss",
|
||||
"ktss", //.kns header id
|
||||
"kvs",
|
||||
|
||||
"l",
|
||||
"laac", //fake extension, for AAC (tri-Ace/FFmpeg)
|
||||
"lac3", //fake extension, for AC3
|
||||
"leg",
|
||||
|
@ -170,6 +179,7 @@ static const char* extension_list[] = {
|
|||
"logg", //fake extension, for OGGs
|
||||
"lopus", //fake extension, for OPUS
|
||||
"lpcm",
|
||||
"lpk",
|
||||
"lps",
|
||||
"lsf",
|
||||
"lstm", //fake extension, for STMs
|
||||
|
@ -179,6 +189,7 @@ static const char* extension_list[] = {
|
|||
"matx",
|
||||
"mc3",
|
||||
"mca",
|
||||
"mcadpcm",
|
||||
"mcg",
|
||||
"mds",
|
||||
"mdsp",
|
||||
|
@ -193,9 +204,13 @@ static const char* extension_list[] = {
|
|||
//"mpc", //FFmpeg, not parsed (musepack) //common
|
||||
"mpdsp",
|
||||
"mpds",
|
||||
"ms",
|
||||
"msa",
|
||||
"msb",
|
||||
"msd",
|
||||
"msf",
|
||||
"mss",
|
||||
"msv", //txh/reserved [Fight Club (PS2)]
|
||||
"msvp",
|
||||
"mta2",
|
||||
"mtaf",
|
||||
|
@ -221,6 +236,7 @@ static const char* extension_list[] = {
|
|||
"omu",
|
||||
//"opus", //common
|
||||
"otm",
|
||||
"ovb",
|
||||
|
||||
"p1d", //txth/reserved [Farming Simulator 18 (3DS)]
|
||||
"p2bt",
|
||||
|
@ -228,19 +244,24 @@ static const char* extension_list[] = {
|
|||
"past",
|
||||
"pcm",
|
||||
"pdt",
|
||||
"pk",
|
||||
"pnb",
|
||||
"pona",
|
||||
"pos",
|
||||
"ps2stm", //fake extension for .stm (to be removed)
|
||||
"psh",
|
||||
"psh", // fake extension for VSV(?) Dawn of Mana needs to be checked again
|
||||
"psnd",
|
||||
"psw",
|
||||
"psw", //fake extension for .wam
|
||||
|
||||
"r",
|
||||
"rac", //txth/reserved [Manhunt (Xbox)]
|
||||
"rak",
|
||||
"ras",
|
||||
"raw",
|
||||
"rkv",
|
||||
"rnd",
|
||||
"rof",
|
||||
"rpgmvo",
|
||||
"rrds",
|
||||
"rsd",
|
||||
"rsf",
|
||||
|
@ -282,9 +303,12 @@ static const char* extension_list[] = {
|
|||
"sgd",
|
||||
"sgx",
|
||||
"sl3",
|
||||
"slb", //txth/reserved [THE Nekomura no Hitobito (PS2)]
|
||||
"sli",
|
||||
"smc",
|
||||
"smp",
|
||||
"smpl", //fake extension (to be removed)
|
||||
"smv",
|
||||
"snd",
|
||||
"snds",
|
||||
"sng",
|
||||
|
@ -292,6 +316,7 @@ static const char* extension_list[] = {
|
|||
"snr",
|
||||
"sns",
|
||||
"snu",
|
||||
"son",
|
||||
"spd",
|
||||
"spm",
|
||||
"sps",
|
||||
|
@ -305,6 +330,7 @@ static const char* extension_list[] = {
|
|||
//"stm", //common
|
||||
"stma", //fake extension (to be removed)
|
||||
"str",
|
||||
"stream",
|
||||
"strm",
|
||||
"sts",
|
||||
"stx",
|
||||
|
@ -313,16 +339,19 @@ static const char* extension_list[] = {
|
|||
"swag",
|
||||
"swav",
|
||||
"swd",
|
||||
"switch_audio"
|
||||
"sx",
|
||||
"sxd",
|
||||
"sxd2",
|
||||
|
||||
"tec",
|
||||
"thp",
|
||||
"tk1",
|
||||
"tk5",
|
||||
"tra",
|
||||
"trj",
|
||||
"trm",
|
||||
"tun",
|
||||
"txtp",
|
||||
"tydsp",
|
||||
|
||||
"ulw",
|
||||
|
@ -335,24 +364,29 @@ static const char* extension_list[] = {
|
|||
"vawx",
|
||||
"vb",
|
||||
"vbk",
|
||||
"vbx", //txth/reserved [THE Taxi 2 (PS2)]
|
||||
"vds",
|
||||
"vdm",
|
||||
"vgs",
|
||||
"vgv",
|
||||
"vig",
|
||||
"vis", //txth/reserved [AirForce Delta (PS2)]
|
||||
"vms",
|
||||
"voi",
|
||||
"vpk",
|
||||
"vs",
|
||||
"vsf",
|
||||
"vsv", // official extension for PSH? TODO: recheck Dawn of Mana
|
||||
"vxn",
|
||||
|
||||
"waa",
|
||||
"wac",
|
||||
"wad",
|
||||
"waf",
|
||||
"wam",
|
||||
"was",
|
||||
//"wav", //common
|
||||
"wave",
|
||||
"wavm",
|
||||
"wb",
|
||||
"wem",
|
||||
|
@ -364,6 +398,7 @@ static const char* extension_list[] = {
|
|||
"wsd",
|
||||
"wsi",
|
||||
"wv2", //txth/reserved [Slave Zero (PC)]
|
||||
"wve",
|
||||
"wvs",
|
||||
|
||||
"xa",
|
||||
|
@ -379,7 +414,7 @@ static const char* extension_list[] = {
|
|||
"xss",
|
||||
"xvag",
|
||||
"xvas",
|
||||
"xwav",
|
||||
"xwav",//fake, to be removed
|
||||
"xwb",
|
||||
"xwc",
|
||||
"xwm", //FFmpeg, not parsed (XWMA)
|
||||
|
@ -425,7 +460,6 @@ typedef struct {
|
|||
|
||||
static const coding_info coding_info_list[] = {
|
||||
{coding_PCM16LE, "Little Endian 16-bit PCM"},
|
||||
{coding_PCM16LE_XOR_int, "Little Endian 16-bit PCM with 2 byte interleave and XOR obfuscation"},
|
||||
{coding_PCM16BE, "Big Endian 16-bit PCM"},
|
||||
{coding_PCM16_int, "16-bit PCM with 2 byte interleave (block)"},
|
||||
{coding_PCM8, "8-bit PCM"},
|
||||
|
@ -454,9 +488,8 @@ static const coding_info coding_info_list[] = {
|
|||
{coding_XA, "CD-ROM XA 4-bit ADPCM"},
|
||||
{coding_PSX, "Playstation 4-bit ADPCM"},
|
||||
{coding_PSX_badflags, "Playstation 4-bit ADPCM (bad flags)"},
|
||||
{coding_PSX_bmdx, "Playstation 4-bit ADPCM (BMDX encryption)"},
|
||||
{coding_PSX_cfg, "Playstation 4-bit ADPCM (configurable)"},
|
||||
{coding_HEVAG, "Playstation Vita HEVAG 4-bit ADPCM"},
|
||||
{coding_HEVAG, "Sony HEVAG 4-bit ADPCM"},
|
||||
|
||||
{coding_EA_XA, "Electronic Arts EA-XA 4-bit ADPCM v1"},
|
||||
{coding_EA_XA_int, "Electronic Arts EA-XA 4-bit ADPCM v1 (mono/interleave)"},
|
||||
|
@ -471,6 +504,7 @@ static const coding_info coding_info_list[] = {
|
|||
{coding_3DS_IMA, "3DS IMA 4-bit ADPCM"},
|
||||
{coding_MS_IMA, "Microsoft 4-bit IMA ADPCM"},
|
||||
{coding_XBOX_IMA, "XBOX 4-bit IMA ADPCM"},
|
||||
{coding_XBOX_IMA_mch, "XBOX 4-bit IMA ADPCM (multichannel)"},
|
||||
{coding_XBOX_IMA_int, "XBOX 4-bit IMA ADPCM (mono/interleave)"},
|
||||
{coding_NDS_IMA, "NDS-style 4-bit IMA ADPCM"},
|
||||
{coding_DAT4_IMA, "Eurocom DAT4 4-bit IMA ADPCM"},
|
||||
|
@ -488,6 +522,9 @@ static const coding_info coding_info_list[] = {
|
|||
{coding_MSADPCM, "Microsoft 4-bit ADPCM"},
|
||||
{coding_WS, "Westwood Studios VBR ADPCM"},
|
||||
{coding_AICA, "Yamaha AICA 4-bit ADPCM"},
|
||||
{coding_AICA_int, "Yamaha AICA 4-bit ADPCM (mono/interleave)"},
|
||||
{coding_YAMAHA, "Yamaha 4-bit ADPCM"},
|
||||
{coding_YAMAHA_NXAP, "Yamaha NXAP 4-bit ADPCM"},
|
||||
{coding_NDS_PROCYON, "Procyon Studio Digital Sound Elements NDS 4-bit APDCM"},
|
||||
{coding_L5_555, "Level-5 0x555 4-bit ADPCM"},
|
||||
{coding_SASSC, "Activision / EXAKT SASSC 8-bit DPCM"},
|
||||
|
@ -495,25 +532,21 @@ static const coding_info coding_info_list[] = {
|
|||
{coding_MTAF, "Konami MTAF 4-bit ADPCM"},
|
||||
{coding_MTA2, "Konami MTA2 4-bit ADPCM"},
|
||||
{coding_MC3, "Paradigm MC3 3-bit ADPCM"},
|
||||
{coding_FADPCM, "FMOD FADPCM 4-bit ADPCM"},
|
||||
|
||||
{coding_SDX2, "Squareroot-delta-exact (SDX2) 8-bit DPCM"},
|
||||
{coding_SDX2_int, "Squareroot-delta-exact (SDX2) 8-bit DPCM with 1 byte interleave"},
|
||||
{coding_CBD2, "Cuberoot-delta-exact (CBD2) 8-bit DPCM"},
|
||||
{coding_CBD2_int, "Cuberoot-delta-exact (CBD2) 8-bit DPCM with 1 byte interleave"},
|
||||
{coding_ACM, "InterPlay ACM"},
|
||||
{coding_NWA0, "NWA DPCM Level 0"},
|
||||
{coding_NWA1, "NWA DPCM Level 1"},
|
||||
{coding_NWA2, "NWA DPCM Level 2"},
|
||||
{coding_NWA3, "NWA DPCM Level 3"},
|
||||
{coding_NWA4, "NWA DPCM Level 4"},
|
||||
{coding_NWA5, "NWA DPCM Level 5"},
|
||||
{coding_NWA, "VisualArt's NWA DPCM"},
|
||||
|
||||
{coding_EA_MT, "Electronic Arts MicroTalk"},
|
||||
|
||||
{coding_CRI_HCA, "CRI HCA"},
|
||||
|
||||
#ifdef VGM_USE_VORBIS
|
||||
{coding_ogg_vorbis, "Ogg Vorbis"},
|
||||
{coding_OGG_VORBIS, "Ogg Vorbis"},
|
||||
{coding_VORBIS_custom, "Custom Vorbis"},
|
||||
#endif
|
||||
#ifdef VGM_USE_MPEG
|
||||
|
@ -544,48 +577,47 @@ static const coding_info coding_info_list[] = {
|
|||
static const layout_info layout_info_list[] = {
|
||||
{layout_none, "flat (no layout)"},
|
||||
{layout_interleave, "interleave"},
|
||||
{layout_interleave_shortblock, "interleave with short last block"},
|
||||
{layout_mxch_blocked, "MxCh blocked"},
|
||||
{layout_ast_blocked, "AST blocked"},
|
||||
{layout_halpst_blocked, "HALPST blocked"},
|
||||
{layout_xa_blocked, "CD-ROM XA"},
|
||||
|
||||
{layout_segmented, "segmented"},
|
||||
{layout_layered, "layered"},
|
||||
{layout_aix, "AIX"},
|
||||
|
||||
{layout_blocked_mxch, "blocked (MxCh)"},
|
||||
{layout_blocked_ast, "blocked (AST)"},
|
||||
{layout_blocked_halpst, "blocked (HALPST)"},
|
||||
{layout_blocked_xa, "blocked (XA)"},
|
||||
{layout_blocked_ea_schl, "blocked (EA SCHl)"},
|
||||
{layout_blocked_ea_1snh, "blocked (EA 1SNh)"},
|
||||
{layout_caf_blocked, "CAF blocked"},
|
||||
{layout_wsi_blocked, ".wsi blocked"},
|
||||
{layout_xvas_blocked, ".xvas blocked"},
|
||||
{layout_str_snds_blocked, ".str SNDS blocked"},
|
||||
{layout_ws_aud_blocked, "Westwood Studios .aud blocked"},
|
||||
{layout_matx_blocked, "Matrix .matx blocked"},
|
||||
{layout_blocked_caf, "blocked (CAF)"},
|
||||
{layout_blocked_wsi, "blocked (WSI)"},
|
||||
{layout_blocked_xvas, "blocked (.xvas)"},
|
||||
{layout_blocked_str_snds, "blocked (.str SNDS)"},
|
||||
{layout_blocked_ws_aud, "blocked (Westwood Studios .aud)"},
|
||||
{layout_blocked_matx, "blocked (Matrix .matx)"},
|
||||
{layout_blocked_dec, "blocked (DEC)"},
|
||||
{layout_vs_blocked, "vs blocked"},
|
||||
{layout_emff_ps2_blocked, "EMFF (PS2) blocked"},
|
||||
{layout_emff_ngc_blocked, "EMFF (NGC/WII) blocked"},
|
||||
{layout_gsb_blocked, "GSB blocked"},
|
||||
{layout_thp_blocked, "THP Movie Audio blocked"},
|
||||
{layout_filp_blocked, "FILp blocked"},
|
||||
{layout_blocked_vs, "blocked (vs)"},
|
||||
{layout_blocked_emff_ps2, "blocked (EMFF PS2)"},
|
||||
{layout_blocked_emff_ngc, "blocked (EMFF NGC)"},
|
||||
{layout_blocked_gsb, "blocked (GSB)"},
|
||||
{layout_blocked_thp, "blocked (THP Movie Audio)"},
|
||||
{layout_blocked_filp, "blocked (FILP)"},
|
||||
{layout_blocked_ea_swvr, "blocked (EA SWVR)"},
|
||||
{layout_ps2_adm_blocked, "ADM blocked"},
|
||||
{layout_dsp_bdsp_blocked, "DSP blocked"},
|
||||
{layout_blocked_adm, "blocked (ADM)"},
|
||||
{layout_blocked_bdsp, "blocked (BDSP)"},
|
||||
{layout_blocked_ivaud, "blocked (IVAUD)"},
|
||||
{layout_ps2_iab_blocked, "IAB blocked"},
|
||||
{layout_ps2_strlr_blocked, "The Bouncer STR blocked"},
|
||||
{layout_rws_blocked, "RWS blocked"},
|
||||
{layout_hwas_blocked, "HWAS blocked"},
|
||||
{layout_tra_blocked, "TRA blocked"},
|
||||
{layout_acm, "ACM blocked"},
|
||||
{layout_mus_acm, "multiple ACM files, ACM blocked"},
|
||||
{layout_aix, "AIX interleave, internally 18-byte interleaved"},
|
||||
{layout_aax, "AAX blocked, 18-byte interleaved"},
|
||||
{layout_scd_int, "SCD multistream interleave"},
|
||||
{layout_blocked_ps2_iab, "blocked (IAB)"},
|
||||
{layout_blocked_ps2_strlr, "blocked (The Bouncer STR)"},
|
||||
{layout_blocked_rws, "blocked (RWS)"},
|
||||
{layout_blocked_hwas, "blocked (HWAS)"},
|
||||
{layout_blocked_tra, "blocked (TRA)"},
|
||||
{layout_blocked_ea_sns, "blocked (EA SNS)"},
|
||||
{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
|
||||
{layout_blocked_ea_wve_au00, "blocked (EA WVE au00)"},
|
||||
{layout_blocked_ea_wve_ad10, "blocked (EA WVE Ad10)"},
|
||||
{layout_blocked_sthd, "blocked (STHD)"},
|
||||
};
|
||||
|
||||
static const meta_info meta_info_list[] = {
|
||||
|
@ -642,17 +674,16 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_PS2_ILD, "ILD header"},
|
||||
{meta_PS2_PNB, "assumed PNB (PsychoNauts Bgm File) by .pnb extension"},
|
||||
{meta_XBOX_WAVM, "Xbox WAVM raw header"},
|
||||
{meta_XBOX_RIFF, "Microsoft XWAV RIFF header"},
|
||||
{meta_DSP_STR, "assumed Conan Gamecube STR File by .str extension"},
|
||||
{meta_EA_SCHL, "Electronic Arts SCHl header (variable)"},
|
||||
{meta_EA_SCHL_fixed, "Electronic Arts SCHl header (fixed)"},
|
||||
{meta_CFN, "tri-Crescendo CAF Header"},
|
||||
{meta_CAF, "tri-Crescendo CAF Header"},
|
||||
{meta_PS2_VPK, "VPK Header"},
|
||||
{meta_GENH, "GENH Generic Header"},
|
||||
{meta_DSP_SADB, "sadb header"},
|
||||
{meta_SADL, "sadl header"},
|
||||
{meta_GENH, "GENH generic header"},
|
||||
{meta_DSP_SADB, "Procyon Studio SADB header"},
|
||||
{meta_SADL, "Procyon Studio SADL header"},
|
||||
{meta_PS2_BMDX, "Beatmania .bmdx header"},
|
||||
{meta_DSP_WSI, ".wsi header"},
|
||||
{meta_DSP_WSI, "Alone in the Dark .WSI header"},
|
||||
{meta_AIFC, "Audio Interchange File Format AIFF-C"},
|
||||
{meta_AIFF, "Audio Interchange File Format"},
|
||||
{meta_STR_SNDS, ".str SNDS SHDR chunk"},
|
||||
|
@ -662,15 +693,15 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_PS2_SVS, "Square SVS header"},
|
||||
{meta_RIFF_WAVE, "RIFF WAVE header"},
|
||||
{meta_RIFF_WAVE_POS, "RIFF WAVE header and .pos for looping"},
|
||||
{meta_NWA, "Visual Art's NWA header"},
|
||||
{meta_NWA_NWAINFOINI, "Visual Art's NWA header and NWAINFO.INI for looping"},
|
||||
{meta_NWA_GAMEEXEINI, "Visual Art's NWA header and Gameexe.ini for looping"},
|
||||
{meta_NWA, "VisualArt's NWA header"},
|
||||
{meta_NWA_NWAINFOINI, "VisualArt's NWA header (NWAINFO.INI looping)"},
|
||||
{meta_NWA_GAMEEXEINI, "VisualArt's NWA header (Gameexe.ini looping)"},
|
||||
{meta_XSS, "Dino Crisis 3 XSS File"},
|
||||
{meta_HGC1, "Knights of the Temple 2 hgC1 Header"},
|
||||
{meta_AUS, "Capcom AUS Header"},
|
||||
{meta_RWS, "RenderWare RWS header"},
|
||||
{meta_EA_1SNH, "Electronic Arts 1SNh/EACS header"},
|
||||
{meta_SL3, "SL3 Header"},
|
||||
{meta_SL3, "Atari Melbourne House SL3 header"},
|
||||
{meta_FSB1, "FMOD Sample Bank (FSB1) Header"},
|
||||
{meta_FSB2, "FMOD Sample Bank (FSB2) Header"},
|
||||
{meta_FSB3, "FMOD Sample Bank (FSB3) Header"},
|
||||
|
@ -694,19 +725,19 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_BG00, "Falcom BG00 Header"},
|
||||
{meta_PS2_RSTM, "Rockstar Games RSTM Header"},
|
||||
{meta_ACM, "InterPlay ACM Header"},
|
||||
{meta_MUS_ACM, "MUS playlist and multiple InterPlay ACM Headered files"},
|
||||
{meta_MUS_ACM, "InterPlay MUS ACM header"},
|
||||
{meta_PS2_KCES, "Konami KCES Header"},
|
||||
{meta_PS2_DXH, "Tokobot Plus DXH Header"},
|
||||
{meta_PS2_PSH, "Dawn of Mana - Seiken Densetsu 4 PSH Header"},
|
||||
{meta_PS2_PSH, "Square Enix PSH/VSV Header"},
|
||||
{meta_RIFF_WAVE_labl, "RIFF WAVE header with loop markers"},
|
||||
{meta_RIFF_WAVE_smpl, "RIFF WAVE header with sample looping info"},
|
||||
{meta_RIFF_WAVE_wsmp, "RIFF WAVE header with wsmp looping info"},
|
||||
{meta_RIFX_WAVE, "RIFX WAVE header"},
|
||||
{meta_RIFX_WAVE_smpl, "RIFX WAVE header with sample looping info"},
|
||||
{meta_XNB, "Microsoft XNA Game Studio 4.0 header"},
|
||||
{meta_SCD_PCM, "Lunar: Eternal Blue .PCM header"},
|
||||
{meta_PS2_PCM, "Konami KCEJ East .PCM header"},
|
||||
{meta_PS2_RKV, "Legacy of Kain - Blood Omen 2 RKV Header"},
|
||||
{meta_PS2_PSW, "Rayman Raving Rabbids Riff Container File"},
|
||||
{meta_PS2_RKV, "Legacy of Kain - Blood Omen 2 RKV PS2 header"},
|
||||
{meta_PS2_VAS, "Pro Baseball Spirits 5 VAS Header"},
|
||||
{meta_PS2_TEC, "assumed TECMO badflagged stream by .tec extension"},
|
||||
{meta_XBOX_WVS, "Metal Arms WVS Header (XBOX)"},
|
||||
|
@ -724,32 +755,34 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_NGC_YMF, "YMF DSP Header"},
|
||||
{meta_PS2_CCC, "CCC Header"},
|
||||
{meta_PSX_FAG, "FAG Header"},
|
||||
{meta_PS2_MIHB, "Merged MIH+MIB"},
|
||||
{meta_PS2_MIHB, "MIH+MIB header"},
|
||||
{meta_DSP_WII_MUS, "mus header"},
|
||||
{meta_WII_SNG, "SNG DSP Header"},
|
||||
{meta_RSD2VAG, "RSD2/VAG Header"},
|
||||
{meta_RSD2PCMB, "RSD2/PCMB Header"},
|
||||
{meta_RSD2XADP, "RSD2/XADP Header"},
|
||||
{meta_RSD3VAG, "RSD3/VAG Header"},
|
||||
{meta_RSD3GADP, "RSD3/GADP Header"},
|
||||
{meta_RSD3PCM, "RSD3/PCM Header"},
|
||||
{meta_RSD3PCMB, "RSD3/PCMB Header"},
|
||||
{meta_RSD4PCMB, "RSD4/PCMB Header"},
|
||||
{meta_RSD4PCM, "RSD4/PCM Header"},
|
||||
{meta_RSD4RADP, "RSD4/RADP Header"},
|
||||
{meta_RSD4VAG, "RSD4/VAG Header"},
|
||||
{meta_RSD6XADP, "RSD6/XADP Header"},
|
||||
{meta_RSD6VAG, "RSD6/VAG Header"},
|
||||
{meta_RSD6WADP, "RSD6/WADP Header"},
|
||||
{meta_RSD6RADP, "RSD6/RADP Header"},
|
||||
{meta_RSD6XMA, "RSD6/XMA Header"},
|
||||
{meta_RSD2VAG, "Radical RSD2/VAG header"},
|
||||
{meta_RSD2PCMB, "Radical RSD2/PCMB header"},
|
||||
{meta_RSD2XADP, "Radical RSD2/XADP header"},
|
||||
{meta_RSD3VAG, "Radical RSD3/VAG header"},
|
||||
{meta_RSD3GADP, "Radical RSD3/GADP header"},
|
||||
{meta_RSD3PCM, "Radical RSD3/PCM header"},
|
||||
{meta_RSD3PCMB, "Radical RSD3/PCMB header"},
|
||||
{meta_RSD4PCMB, "Radical RSD4/PCMB header"},
|
||||
{meta_RSD4PCM, "Radical RSD4/PCM header"},
|
||||
{meta_RSD4RADP, "Radical RSD4/RADP header"},
|
||||
{meta_RSD4VAG, "Radical RSD4/VAG header"},
|
||||
{meta_RSD6XADP, "Radical RSD6/XADP header"},
|
||||
{meta_RSD6VAG, "Radical RSD6/VAG header"},
|
||||
{meta_RSD6WADP, "Radical RSD6/WADP header"},
|
||||
{meta_RSD6RADP, "Radical RSD6/RADP header"},
|
||||
{meta_RSD6XMA, "Radical RSD6/XMA header"},
|
||||
{meta_RSD6AT3P, "Radical RSD6/AT3+ header"},
|
||||
{meta_RSD6WMA, "Radical RSD6/WMA header"},
|
||||
{meta_DC_ASD, "ASD Header"},
|
||||
{meta_NAOMI_SPSD, "SPSD Header"},
|
||||
{meta_NAOMI_SPSD, "Naomi SPSD header"},
|
||||
{meta_FFXI_BGW, "BGW BGMStream header"},
|
||||
{meta_FFXI_SPW, "SPW SeWave header"},
|
||||
{meta_PS2_ASS, "ASS Header"},
|
||||
{meta_IDSP, "IDSP Header"},
|
||||
{meta_WAA_WAC_WAD_WAM, "WAA/WAC/WAD/WAM RIFF Header"},
|
||||
{meta_UBI_JADE, "Ubisoft Jade RIFF header"},
|
||||
{meta_PS2_SEG, "SEG (PS2) Header"},
|
||||
{meta_XBOX_SEG, "SEG (XBOX) Header"},
|
||||
{meta_NDS_STRM_FFTA2, "Final Fantasy Tactics A2 RIFF Header"},
|
||||
|
@ -775,7 +808,6 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_NGC_DSP_IADP, "IADP Header"},
|
||||
{meta_RSTM_shrunken, "Nintendo RSTM header, corrupted by Atlus"},
|
||||
{meta_RIFF_WAVE_MWV, "RIFF WAVE header with .mwv flavoring"},
|
||||
{meta_RIFF_WAVE_SNS, "RIFF WAVE header with .sns flavoring"},
|
||||
{meta_FFCC_STR, "Final Fantasy: Crystal Chronicles STR header"},
|
||||
{meta_SAT_BAKA, "BAKA header from Crypt Killer"},
|
||||
{meta_NDS_SWAV, "SWAV Header"},
|
||||
|
@ -790,8 +822,8 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_ZSD, "ZSD Header"},
|
||||
{meta_RedSpark, "RedSpark Header"},
|
||||
{meta_PC_IVAUD, "assumed GTA IV Audio file by .ivaud extension"},
|
||||
{meta_DSP_WII_WSD, "Standard Nintendo DSP headers in .wsd"},
|
||||
{meta_WII_NDP, "Vertigo NDP Header"},
|
||||
{meta_DSP_WII_WSD, ".WSD header"},
|
||||
{meta_WII_NDP, "Icon Games NDP header"},
|
||||
{meta_PS2_SPS, "Ape Escape 2 SPS Header"},
|
||||
{meta_PS2_XA2_RRP, "Acclaim XA2 Header"},
|
||||
{meta_NDS_HWAS, "Vicarious Visions HWAS header"},
|
||||
|
@ -804,13 +836,13 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_NGC_GCUB, "GCub Header"},
|
||||
{meta_NGC_SCK_DSP, "The Scorpion King SCK Header"},
|
||||
{meta_NGC_SWD, "PSF + Standard DSP Headers"},
|
||||
{meta_CAFF, "Apple Core Audio Format Header"},
|
||||
{meta_CAFF, "Apple Core Audio Format File header"},
|
||||
{meta_PC_MXST, "Lego Island MxSt Header"},
|
||||
{meta_SAB, "Team17 SAB header"},
|
||||
{meta_MAXIS_XA, "Maxis XAI/XAJ Header"},
|
||||
{meta_EXAKT_SC, "assumed Activision / EXAKT SC by extension"},
|
||||
{meta_WII_BNS, "Nintendo BNS header"},
|
||||
{meta_WII_WAS, "WAS (iSWS) DSP header"},
|
||||
{meta_WII_WAS, "Sumo Digital iSWS header"},
|
||||
{meta_XBOX_HLWAV, "Half Life 2 bgm header"},
|
||||
{meta_STX, "Nintendo .stx header"},
|
||||
{meta_MYSPD, "U-Sing .MYSPD header"},
|
||||
|
@ -820,7 +852,7 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_DMSG, "RIFF/DMSGsegh header"},
|
||||
{meta_PONA_3DO, "Policenauts BGM header"},
|
||||
{meta_PONA_PSX, "Policenauts BGM header"},
|
||||
{meta_NGC_DSP_AAAP, "Double standard DSP header in 'AAAp'"},
|
||||
{meta_NGC_DSP_AAAP, "Acclaim Austin AAAp header"},
|
||||
{meta_NGC_DSP_KONAMI, "Konami DSP header"},
|
||||
{meta_PS2_STER, "STER Header"},
|
||||
{meta_BNSF, "Namco Bandai BNSF header"},
|
||||
|
@ -831,25 +863,27 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_PS2_SMPL, "Homura SMPL header"},
|
||||
{meta_PS2_MSA, "Psyvariar -Complete Edition- MSA header"},
|
||||
{meta_PC_SMP, "Ghostbusters .smp Header"},
|
||||
{meta_NGC_PDT, "PDT DSP header"},
|
||||
{meta_NGC_BO2, "Blood Omen 2 DSP header"},
|
||||
{meta_NGC_PDT, "Hudson .PDT header"},
|
||||
{meta_NGC_RKV, "Legacy of Kain - Blood Omen 2 RKV GC header"},
|
||||
{meta_DSP_DDSP, ".DDSP header"},
|
||||
{meta_P3D, "Radical P3D header"},
|
||||
{meta_PS2_TK1, "Tekken TK5STRM1 Header"},
|
||||
{meta_PS2_ADSC, "ADSC Header"},
|
||||
{meta_NGC_DSP_MPDS, "MPDS DSP header"},
|
||||
{meta_DSP_STR_IG, "Infogrames dual dsp header"},
|
||||
{meta_EA_SWVR, "Electronic Arts SWVR header"},
|
||||
{meta_DSP_STR_IG, "Infogrames .DSP header"},
|
||||
{meta_EA_SWVR, "Electronic Arts SWVR header"},
|
||||
{meta_PS2_B1S, "B1S header"},
|
||||
{meta_PS2_WAD, "WAD header"},
|
||||
{meta_DSP_XIII, "XIII dsp header"},
|
||||
{meta_NGC_DSP_STH_STR, "STH dsp header"},
|
||||
{meta_DSP_CABELAS, "Cabelas games dsp header"},
|
||||
{meta_PS2_ADM, "Dragon Quest V .ADM raw header"},
|
||||
{meta_PS2_LPCM, "LPCM header"},
|
||||
{meta_PS2_VMS, "VMS Header"},
|
||||
{meta_XAU, "XPEC XAU header"},
|
||||
{meta_GH3_BAR, "Guitar Hero III Mobile .bar"},
|
||||
{meta_FFW, "Freedom Fighters BGM header"},
|
||||
{meta_DSP_DSPW, "DSPW dsp header"},
|
||||
{meta_DSP_DSPW, "Capcom DSPW header"},
|
||||
{meta_PS2_JSTM, "JSTM Header"},
|
||||
{meta_XVAG, "Sony XVAG header"},
|
||||
{meta_PS3_CPS, "tri-Crescendo CPS Header"},
|
||||
|
@ -865,7 +899,7 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_PS2_SPM, "SPM header"},
|
||||
{meta_X360_TRA, "Terminal Reality .TRA raw header"},
|
||||
{meta_PS2_VGS, "Princess Soft VGS header"},
|
||||
{meta_PS2_IAB, "IAB header"},
|
||||
{meta_PS2_IAB, "Runtime .IAB header"},
|
||||
{meta_PS2_STRLR, "STR L/R header"},
|
||||
{meta_LSF_N1NJ4N, ".lsf !n1nj4n header"},
|
||||
{meta_VAWX, "feelplus VAWX header"},
|
||||
|
@ -895,14 +929,14 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_CSTM, "Nintendo 3DS CSTM Header"},
|
||||
{meta_FSTM, "Nintendo Wii U FSTM Header"},
|
||||
{meta_KT_WIIBGM, "Koei Tecmo WiiBGM Header"},
|
||||
{meta_KTSS, "Koei Tecmo Switch Sound Header"},
|
||||
{meta_KTSS, "Koei Tecmo Nintendo Stream KTSS Header"},
|
||||
{meta_3DS_IDSP, "Nintendo IDSP Header"},
|
||||
{meta_WIIU_BTSND, "Nintendo Wii U Menu Boot Sound"},
|
||||
{meta_MCA, "Capcom MCA header"},
|
||||
{meta_XB3D_ADX, "Xenoblade 3D ADX header"},
|
||||
{meta_HCA, "CRI MiddleWare HCA Header"},
|
||||
{meta_PS2_SVAG_SNK, "SNK SVAG header"},
|
||||
{meta_PS2_VDS_VDM, "Graffiti Kingdom VDS/VDM header"},
|
||||
{meta_PS2_VDS_VDM, "Procyon Studio VDS/VDM header"},
|
||||
{meta_X360_CXS, "tri-Crescendo CXS header"},
|
||||
{meta_AKB, "Square-Enix AKB header"},
|
||||
{meta_NUB_XMA, "Namco NUB XMA header"},
|
||||
|
@ -917,12 +951,12 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_GTD, "GTD/GHS header"},
|
||||
{meta_TA_AAC_X360, "tri-Ace AAC (X360) header"},
|
||||
{meta_TA_AAC_PS3, "tri-Ace AAC (PS3) header"},
|
||||
{meta_TA_AAC_VORBIS, "tri-Ace AAC (Mobile Vorbis) header"},
|
||||
{meta_TA_AAC_MOBILE, "tri-Ace AAC (Mobile) header"},
|
||||
{meta_PS3_MTA2, "Konami MTA2 header"},
|
||||
{meta_NGC_ULW, "Criterion ULW raw header"},
|
||||
{meta_PC_XA30, "Reflections XA30 PC header"},
|
||||
{meta_WII_04SW, "Reflections 04SW header"},
|
||||
{meta_TXTH, "TXTH Generic Header"},
|
||||
{meta_TXTH, "TXTH generic header"},
|
||||
{meta_EA_BNK, "Electronic Arts BNK header"},
|
||||
{meta_SK_AUD, "Silicon Knights AUD header"},
|
||||
{meta_AHX, "CRI AHX header"},
|
||||
|
@ -930,7 +964,7 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_BINK, "RAD Game Tools Bink header"},
|
||||
{meta_EA_SNU, "Electronic Arts SNU header"},
|
||||
{meta_AWC, "Rockstar AWC header"},
|
||||
{meta_NSW_OPUS, "Nintendo Switch OPUS header"},
|
||||
{meta_OPUS, "Nintendo Switch OPUS header"},
|
||||
{meta_PC_AL2, "Illwinter Game Design AL2 raw header"},
|
||||
{meta_PC_AST, "Capcom AST (PC) header"},
|
||||
{meta_UBI_SB, "Ubisoft SBx header"},
|
||||
|
@ -956,10 +990,29 @@ static const meta_info meta_info_list[] = {
|
|||
{meta_SQEX_SAB, "Square-Enix SAB header"},
|
||||
{meta_SQEX_MAB, "Square-Enix MAB header"},
|
||||
{meta_OGG_L2SD, "Ogg Vorbis (L2SD)"},
|
||||
{meta_WAF, "KID WAF header"},
|
||||
{meta_WAVE, "EngineBlack .WAVE header"},
|
||||
{meta_WAVE_segmented, "EngineBlack .WAVE header (segmented)"},
|
||||
{meta_SMV, "Cho Aniki Zero .SMV header"},
|
||||
{meta_NXAP, "Nex NXAP header"},
|
||||
{meta_EA_WVE_AU00, "Electronic Arts WVE (au00) header"},
|
||||
{meta_EA_WVE_AD10, "Electronic Arts WVE (Ad10) header"},
|
||||
{meta_STHD, "Dream Factory STHD header"},
|
||||
{meta_MP4, "MP4/AAC header"},
|
||||
{meta_PCM_SRE, "Capcom .PCM+SRE header"},
|
||||
{meta_DSP_MCADPCM, "Bethesda .mcadpcm header"},
|
||||
{meta_UBI_LYN, "Ubisoft LyN RIFF header"},
|
||||
{meta_MSB_MSH, "Sony MSB+MSH header"},
|
||||
{meta_OGG_RPGMV, "Ogg Vorbis (RPGMV header)"},
|
||||
{meta_OGG_ENO, "Ogg Vorbis (ENO header)"},
|
||||
{meta_TXTP, "TXTP generic header"},
|
||||
{meta_SMC_SMH, "Genki SMC+SMH header"},
|
||||
{meta_OGG_YS8, "Ogg Vorbis (Ys VIII header)"},
|
||||
{meta_PPST, "Parappa PPST header"},
|
||||
{meta_OPUS_PPP, "AT9 OPUS header"},
|
||||
{meta_UBI_BAO, "Ubisoft BAO header"},
|
||||
{meta_DSP_SWITCH_AUDIO, "UE4 Switch Audio header"},
|
||||
|
||||
#ifdef VGM_USE_MP4V2
|
||||
{meta_MP4, "AAC header"},
|
||||
#endif
|
||||
#ifdef VGM_USE_FFMPEG
|
||||
{meta_FFmpeg, "FFmpeg supported file format"},
|
||||
#endif
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
#include "../coding/coding.h"
|
||||
|
||||
void render_vgmstream_aax(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
||||
int samples_written=0;
|
||||
aax_codec_data *data = vgmstream->codec_data;
|
||||
|
||||
while (samples_written<sample_count) {
|
||||
int samples_to_do;
|
||||
int samples_this_block = data->sample_counts[data->current_segment];
|
||||
|
||||
if (vgmstream->loop_flag && vgmstream_do_loop(vgmstream)) {
|
||||
int i;
|
||||
data->current_segment = data->loop_segment;
|
||||
|
||||
reset_vgmstream(data->adxs[data->current_segment]);
|
||||
|
||||
/* carry over the history from the loop point */
|
||||
if (data->loop_segment > 0)
|
||||
{
|
||||
for (i=0;i<data->adxs[0]->channels;i++)
|
||||
{
|
||||
data->adxs[data->loop_segment]->ch[i].adpcm_history1_32 =
|
||||
data->adxs[data->loop_segment-1]->ch[i].adpcm_history1_32;
|
||||
data->adxs[data->loop_segment]->ch[i].adpcm_history2_32 =
|
||||
data->adxs[data->loop_segment-1]->ch[i].adpcm_history2_32;
|
||||
}
|
||||
}
|
||||
vgmstream->samples_into_block = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
samples_to_do = vgmstream_samples_to_do(samples_this_block, 1, vgmstream);
|
||||
|
||||
/*printf("samples_to_do=%d,samples_this_block=%d,samples_written=%d,sample_count=%d\n",samples_to_do,samples_this_block,samples_written,sample_count);*/
|
||||
|
||||
if (samples_written+samples_to_do > sample_count)
|
||||
samples_to_do=sample_count-samples_written;
|
||||
|
||||
if (samples_to_do == 0)
|
||||
{
|
||||
int i;
|
||||
data->current_segment++;
|
||||
/*printf("advance to %d at %d samples\n",data->current_segment,vgmstream->current_sample);*/
|
||||
reset_vgmstream(data->adxs[data->current_segment]);
|
||||
|
||||
/* carry over the history from the previous segment */
|
||||
for (i=0;i<data->adxs[0]->channels;i++)
|
||||
{
|
||||
data->adxs[data->current_segment]->ch[i].adpcm_history1_32 =
|
||||
data->adxs[data->current_segment-1]->ch[i].adpcm_history1_32;
|
||||
data->adxs[data->current_segment]->ch[i].adpcm_history2_32 =
|
||||
data->adxs[data->current_segment-1]->ch[i].adpcm_history2_32;
|
||||
}
|
||||
vgmstream->samples_into_block = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
render_vgmstream(&buffer[samples_written*data->adxs[data->current_segment]->channels],
|
||||
samples_to_do,data->adxs[data->current_segment]);
|
||||
|
||||
samples_written += samples_to_do;
|
||||
vgmstream->current_sample += samples_to_do;
|
||||
vgmstream->samples_into_block+=samples_to_do;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
static void block_update(VGMSTREAM * vgmstream);
|
||||
|
||||
void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
||||
int samples_written=0;
|
||||
|
||||
|
@ -34,12 +36,13 @@ void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM *
|
|||
}
|
||||
|
||||
/* probably block bug or EOF, next calcs would give wrong values and buffer segfaults */
|
||||
if (samples_this_block <= 0) {
|
||||
VGM_LOG("layout_blocked: empty/wrong block\n");
|
||||
if (samples_this_block < 0) {
|
||||
VGM_LOG("layout_blocked: wrong block at 0x%lx\n", vgmstream->current_block_offset);
|
||||
memset(buffer + samples_written*vgmstream->channels, 0, (sample_count - samples_written) * vgmstream->channels * sizeof(sample));
|
||||
break;
|
||||
break; /* probable infinite loop otherwise */
|
||||
}
|
||||
|
||||
/* samples_this_block = 0 is allowed (empty block), will do nothing then move to next block */
|
||||
|
||||
samples_to_do = vgmstream_samples_to_do(samples_this_block, samples_per_frame, vgmstream);
|
||||
if (samples_written + samples_to_do > sample_count)
|
||||
|
@ -49,7 +52,7 @@ void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM *
|
|||
decode_vgmstream(vgmstream, samples_written, samples_to_do, buffer);
|
||||
}
|
||||
else {
|
||||
/* block end signal (used below): partially 0-set buffer */
|
||||
/* block end signal (used in halpst): partially 0-set buffer */
|
||||
int i;
|
||||
for (i = samples_written*vgmstream->channels; i < (samples_written+samples_to_do)*vgmstream->channels; i++) {
|
||||
buffer[i]=0;
|
||||
|
@ -64,115 +67,10 @@ void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM *
|
|||
/* move to next block when all samples are consumed */
|
||||
if (vgmstream->samples_into_block==samples_this_block
|
||||
/*&& vgmstream->current_sample < vgmstream->num_samples*/) { /* don't go past last block */
|
||||
switch (vgmstream->layout_type) {
|
||||
case layout_ast_blocked:
|
||||
ast_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_mxch_blocked:
|
||||
mxch_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_halpst_blocked:
|
||||
if (vgmstream->next_block_offset>=0)
|
||||
halpst_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
else
|
||||
vgmstream->current_block_offset = -1;
|
||||
break;
|
||||
case layout_xa_blocked:
|
||||
xa_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_schl:
|
||||
block_update_ea_schl(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_1snh:
|
||||
block_update_ea_1snh(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_caf_blocked:
|
||||
caf_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_wsi_blocked:
|
||||
wsi_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_str_snds_blocked:
|
||||
str_snds_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_ws_aud_blocked:
|
||||
ws_aud_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_matx_blocked:
|
||||
matx_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_dec:
|
||||
block_update_dec(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_emff_ps2_blocked:
|
||||
emff_ps2_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_emff_ngc_blocked:
|
||||
emff_ngc_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_gsb_blocked:
|
||||
gsb_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_vs_blocked:
|
||||
vs_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_xvas_blocked:
|
||||
xvas_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_thp_blocked:
|
||||
thp_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_filp_blocked:
|
||||
filp_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ivaud:
|
||||
block_update_ivaud(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_swvr:
|
||||
block_update_ea_swvr(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_ps2_adm_blocked:
|
||||
ps2_adm_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_dsp_bdsp_blocked:
|
||||
dsp_bdsp_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_tra_blocked:
|
||||
tra_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_ps2_iab_blocked:
|
||||
ps2_iab_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_ps2_strlr_blocked:
|
||||
ps2_strlr_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_rws_blocked:
|
||||
rws_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_hwas_blocked:
|
||||
hwas_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_sns:
|
||||
block_update_ea_sns(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_awc:
|
||||
block_update_awc(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_vgs:
|
||||
block_update_vgs(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
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;
|
||||
}
|
||||
block_update(vgmstream);
|
||||
|
||||
/* for VBR these may change */
|
||||
frame_size = get_vgmstream_frame_size(vgmstream); /* for VBR these may change */
|
||||
frame_size = get_vgmstream_frame_size(vgmstream);
|
||||
samples_per_frame = get_vgmstream_samples_per_frame(vgmstream);
|
||||
|
||||
/* get samples in the current block */
|
||||
|
@ -189,3 +87,122 @@ void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM *
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void block_update(VGMSTREAM * vgmstream) {
|
||||
switch (vgmstream->layout_type) {
|
||||
case layout_blocked_ast:
|
||||
block_update_ast(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_mxch:
|
||||
block_update_mxch(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_halpst:
|
||||
if (vgmstream->next_block_offset>=0)
|
||||
block_update_halpst(vgmstream->next_block_offset,vgmstream);
|
||||
else
|
||||
vgmstream->current_block_offset = -1;
|
||||
break;
|
||||
case layout_blocked_xa:
|
||||
block_update_xa(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_schl:
|
||||
block_update_ea_schl(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_1snh:
|
||||
block_update_ea_1snh(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_caf:
|
||||
block_update_caf(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_wsi:
|
||||
block_update_wsi(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_str_snds:
|
||||
block_update_str_snds(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ws_aud:
|
||||
block_update_ws_aud(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_matx:
|
||||
block_update_matx(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_dec:
|
||||
block_update_dec(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_emff_ps2:
|
||||
block_update_emff_ps2(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_emff_ngc:
|
||||
block_update_emff_ngc(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_gsb:
|
||||
block_update_gsb(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_vs:
|
||||
block_update_vs(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_xvas:
|
||||
block_update_xvas(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_thp:
|
||||
block_update_thp(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_filp:
|
||||
block_update_filp(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ivaud:
|
||||
block_update_ivaud(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_swvr:
|
||||
block_update_ea_swvr(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_adm:
|
||||
block_update_adm(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_bdsp:
|
||||
block_update_bdsp(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_tra:
|
||||
block_update_tra(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ps2_iab:
|
||||
block_update_ps2_iab(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ps2_strlr:
|
||||
block_update_ps2_strlr(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_rws:
|
||||
block_update_rws(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_hwas:
|
||||
block_update_hwas(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_sns:
|
||||
block_update_ea_sns(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_awc:
|
||||
block_update_awc(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_vgs:
|
||||
block_update_vgs(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
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;
|
||||
case layout_blocked_ea_wve_au00:
|
||||
block_update_ea_wve_au00(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ea_wve_ad10:
|
||||
block_update_ea_wve_ad10(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_sthd:
|
||||
block_update_sthd(vgmstream->next_block_offset,vgmstream);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* blocks of 0x1000 with interleave 0x400 but also smaller last interleave */
|
||||
void block_update_adm(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
||||
int i, new_full_block;
|
||||
size_t block_size, interleave_size, interleave_data;
|
||||
|
||||
/* no header */
|
||||
interleave_size = 0x400;
|
||||
interleave_data = 0x400;
|
||||
block_size = interleave_size * vgmstream->channels;
|
||||
|
||||
/* every 0x1000 is a full block, signaled by PS-ADPCM flags */
|
||||
new_full_block = (read_8bit(block_offset+0x01, streamFile) == 0x06);
|
||||
|
||||
/* try to autodetect usable interleave data size as can be smaller when a discrete block ends (ex. 0x10~0x50, varies with file) */
|
||||
if (!new_full_block) {
|
||||
off_t next_block_offset = block_offset + block_size;
|
||||
|
||||
while (next_block_offset > block_offset) {
|
||||
next_block_offset -= 0x10;
|
||||
|
||||
/* check if unused line (all blocks should only use flags 0x06/0x03/0x02) */
|
||||
if (read_32bitLE(next_block_offset, streamFile) == 0x00000000) {
|
||||
interleave_data -= 0x10;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->next_block_offset = block_offset + block_size;
|
||||
vgmstream->current_block_size = interleave_data;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + interleave_size*i;
|
||||
|
||||
//if (new_full_block) { /* blocks are not discrete */
|
||||
// vgmstream->ch[i].adpcm_history1_32 = 0;
|
||||
// vgmstream->ch[i].adpcm_step_index = 0;
|
||||
//}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void ast_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_ast(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = read_32bitBE(
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void dsp_bdsp_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_bdsp(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
|
@ -0,0 +1,21 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* each block is a new CAF header */
|
||||
void block_update_caf(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
||||
int i,ch;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->next_block_offset = block_offset + read_32bitBE(block_offset+0x04, streamFile);
|
||||
vgmstream->current_block_size = read_32bitBE(block_offset+0x14, streamFile);
|
||||
|
||||
for (ch = 0; ch < vgmstream->channels; ch++) {
|
||||
vgmstream->ch[ch].offset = block_offset + read_32bitBE(block_offset+0x10+(0x08*ch), streamFile);
|
||||
|
||||
/* re-read coeffs (though blocks seem to repeat them) */
|
||||
for (i = 0; i < 16; i++) {
|
||||
vgmstream->ch[ch].adpcm_coef[i] = read_16bitBE(block_offset+0x34 + 0x2c*ch + 0x02*i, streamFile);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,7 +21,7 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
|
|||
|
||||
block_samples = 0;
|
||||
|
||||
if (id == 0x5343446C || id == 0x5344454E) { /* "SCDl" "SDEN" audio data */
|
||||
if (id == 0x5343446C || id == 0x5344454E || id == 0x53444652) { /* "SCDl" "SDEN" "SDFR" audio data */
|
||||
switch(vgmstream->coding_type) {
|
||||
case coding_PSX:
|
||||
block_samples = ps_bytes_to_samples(block_size-0x10, vgmstream->channels);
|
||||
|
@ -37,7 +37,7 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
|
|||
block_size = 0x04;
|
||||
}
|
||||
|
||||
if (id == 0x5343486C || id == 0x5348454E) { /* "SCHl" "SHEN" end block */
|
||||
if (id == 0x5343486C || id == 0x5348454E || id == 0x53484652) { /* "SCHl" "SHEN" "SHFR" end block */
|
||||
new_schl = 1;
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
|
|||
break;
|
||||
block_offset += block_size;
|
||||
|
||||
/* "SCEl" are aligned to 0x80 usually, but causes problems if not 32b-aligned (ex. Need for Speed 2 PC) */
|
||||
if ((id == 0x5343456C || id == 0x5345454E) && block_offset % 0x04) {
|
||||
/* "SCEl" "SEEN" "SEFR" are aligned to 0x80 usually, but causes problems if not 32b-aligned (ex. Need for Speed 2 PC) */
|
||||
if ((id == 0x5343456C || id == 0x5345454E || id == 0x53454652) && block_offset % 0x04) {
|
||||
block_offset += 0x04 - (block_offset % 0x04);
|
||||
}
|
||||
}
|
||||
|
@ -93,6 +93,14 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
|
|||
|
||||
break;
|
||||
|
||||
/* id, size, samples */
|
||||
case coding_PCM16_int:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (i*0x02);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples, hists-per-channel, stereo/interleaved data */
|
||||
case coding_EA_XA:
|
||||
//case coding_EA_XA_V2: /* handled in default */
|
||||
|
@ -126,14 +134,22 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
|
|||
break;
|
||||
|
||||
#ifdef VGM_USE_MPEG
|
||||
/* id, size, samples, offset?, unknown (null for MP2, some constant for all blocks for EALayer3) */
|
||||
/* id, size, samples, offsets, unknown (null for MP2, some size/config for EALayer3; only if not >2ch) */
|
||||
case coding_MPEG_custom:
|
||||
case coding_MPEG_layer1:
|
||||
case coding_MPEG_layer2:
|
||||
case coding_MPEG_layer3:
|
||||
case coding_MPEG_ealayer3:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
off_t channel_start = read_32bit(block_offset + 0x0C,streamFile);
|
||||
off_t channel_start;
|
||||
|
||||
/* EALayer3 6ch uses 1ch*6 with offsets, no flag in header [Medal of Honor 2010 (PC) movies] */
|
||||
if (vgmstream->channels > 2) {
|
||||
channel_start = read_32bit(block_offset + 0x0C + 0x04*i,streamFile);
|
||||
} else {
|
||||
channel_start = read_32bit(block_offset + 0x0C,streamFile);
|
||||
}
|
||||
|
||||
vgmstream->ch[i].offset = block_offset + 0x0C + (0x04*vgmstream->channels) + channel_start;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +1,97 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
#include "../coding/coding.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
/* EA-style blocks */
|
||||
void block_update_ea_swvr(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
||||
int i;
|
||||
size_t block_size, header_size = 0, channel_size = 0, interleave = 0;
|
||||
uint32_t block_id;
|
||||
int32_t (*read_32bit)(off_t,STREAMFILE*) = vgmstream->codec_endian ? read_32bitBE : read_32bitLE;
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = vgmstream->codec_endian ? read_16bitBE : read_16bitLE;
|
||||
|
||||
block_id = read_32bit(block_offset+0x00, streamFile);
|
||||
block_size = read_32bit(block_offset+0x04, streamFile);
|
||||
|
||||
/* parse blocks (Freekstyle uses multiblocks) */
|
||||
switch(block_id) {
|
||||
case 0x5641474D: /* "VAGM" */
|
||||
if (read_16bit(block_offset+0x1a, streamFile) == 0x0024) {
|
||||
header_size = 0x40;
|
||||
channel_size = (block_size - header_size) / vgmstream->channels;
|
||||
|
||||
/* ignore blocks of other subsongs */
|
||||
{
|
||||
int target_subsong = vgmstream->stream_index ? vgmstream->stream_index : 1;
|
||||
if (read_32bit(block_offset+0x0c, streamFile)+1 != target_subsong) {
|
||||
channel_size = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
header_size = 0x1c;
|
||||
channel_size = (block_size - header_size) / vgmstream->channels;
|
||||
}
|
||||
break;
|
||||
case 0x56414742: /* "VAGB" */
|
||||
if (read_16bit(block_offset+0x1a, streamFile) == 0x6400) {
|
||||
header_size = 0x40;
|
||||
} else {
|
||||
header_size = 0x18;
|
||||
}
|
||||
channel_size = (block_size - header_size) / vgmstream->channels;
|
||||
break;
|
||||
|
||||
case 0x4453504D: /* "DSPM" */
|
||||
header_size = 0x60;
|
||||
channel_size = (block_size - header_size) / vgmstream->channels;
|
||||
|
||||
/* ignore blocks of other subsongs */
|
||||
{
|
||||
int target_subsong = vgmstream->stream_index ? vgmstream->stream_index : 1;
|
||||
if (read_32bit(block_offset+0x0c, streamFile)+1 != target_subsong) {
|
||||
channel_size = 0;
|
||||
}
|
||||
}
|
||||
dsp_read_coefs_be(vgmstream, streamFile, block_offset+0x1a, 0x22);
|
||||
//todo adpcm history?
|
||||
break;
|
||||
case 0x44535042: /* "DSPB" */
|
||||
header_size = 0x40;
|
||||
channel_size = (block_size - header_size) / vgmstream->channels;
|
||||
dsp_read_coefs_be(vgmstream, streamFile, block_offset+0x18, 0x00);
|
||||
//todo adpcm history?
|
||||
break;
|
||||
|
||||
case 0x4D534943: /* "MSIC" */
|
||||
header_size = 0x1c;
|
||||
channel_size = (block_size - header_size) / vgmstream->channels;
|
||||
break;
|
||||
case 0x53484F43: /* "SHOC" (a generic block but hopefully has PC sounds) */
|
||||
header_size = 0x14; //todo the first block is 0x18
|
||||
channel_size = (block_size - header_size) / vgmstream->channels;
|
||||
break;
|
||||
|
||||
case 0x46494C4C: /* "FILL" (FILLs do that up to 0x6000, but at 0x5FFC don't actually have size) */
|
||||
if ((block_offset + 0x04) % 0x6000 == 0)
|
||||
block_size = 0x04;
|
||||
header_size = 0x08;
|
||||
break;
|
||||
|
||||
case 0xFFFFFFFF:
|
||||
channel_size = -1; /* signal bad block */
|
||||
break;
|
||||
|
||||
default: /* ignore, 0 samples */
|
||||
VGM_LOG("EA SWVR: ignored 0x%08x at 0x%lx\n", block_id, block_offset);
|
||||
break;
|
||||
}
|
||||
|
||||
vgmstream->current_block_size = channel_size;
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = read_32bit(vgmstream->current_block_offset+0x04,streamFile)-0x1C;
|
||||
vgmstream->next_block_offset = vgmstream->current_block_offset+vgmstream->current_block_size+0x1C;
|
||||
vgmstream->current_block_size/=vgmstream->channels;
|
||||
vgmstream->next_block_offset = block_offset + block_size;
|
||||
|
||||
for (i=0;i<vgmstream->channels;i++) {
|
||||
vgmstream->ch[i].offset = vgmstream->current_block_offset+0x1C+(vgmstream->current_block_size*i);
|
||||
interleave = vgmstream->coding_type == coding_PCM8_U_int ? 0x1 : channel_size;
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + header_size + interleave*i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#include "layout.h"
|
||||
#include "../coding/coding.h"
|
||||
|
||||
|
||||
/* EA style blocks, one block per channel when stereo */
|
||||
void block_update_ea_wve_ad10(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
||||
int i;
|
||||
size_t block_size, channel_size = 0, interleave = 0;
|
||||
uint32_t block_id;
|
||||
|
||||
block_id = read_32bitBE(block_offset+0x00, streamFile);
|
||||
block_size = read_32bitBE(block_offset+0x04, streamFile);
|
||||
|
||||
/* accept "Ad10/Ad11" audio block/footer */
|
||||
if (block_id == 0x41643130 || block_id == 0x41643131) {
|
||||
channel_size = block_size - 0x08; /* one block per channel */
|
||||
interleave = block_size;
|
||||
block_size = block_size*vgmstream->channels;
|
||||
}
|
||||
/* rest could be "MDEC" video blocks with 0 size/samples */
|
||||
|
||||
vgmstream->current_block_size = channel_size;
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->next_block_offset = block_offset + block_size;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = (block_offset + 0x08) + interleave*i;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
#include "layout.h"
|
||||
#include "../coding/coding.h"
|
||||
|
||||
|
||||
/* EA style blocks */
|
||||
void block_update_ea_wve_au00(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
||||
int i;
|
||||
size_t block_size, channel_size = 0;
|
||||
uint32_t block_id;
|
||||
|
||||
block_id = read_32bitBE(block_offset+0x00, streamFile);
|
||||
block_size = read_32bitBE(block_offset+0x04, streamFile);
|
||||
|
||||
/* accept "au00/au01" audio block/footer */
|
||||
if (block_id == 0x61753030 || block_id == 0x61753031) {
|
||||
/* adjusted to frame boundaries as blocks have padding */
|
||||
channel_size = ((block_size - 0x10) / vgmstream->interleave_block_size * vgmstream->interleave_block_size) / vgmstream->channels;
|
||||
}
|
||||
/* rest could be "MDEC" video blocks with 0 size/samples */
|
||||
|
||||
vgmstream->current_block_size = channel_size;
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->next_block_offset = block_offset + block_size;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = (block_offset + 0x10) + channel_size*i;
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void emff_ps2_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_emff_ps2(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
|
@ -17,7 +17,7 @@ void emff_ps2_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
|||
}
|
||||
}
|
||||
|
||||
void emff_ngc_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_emff_ngc(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void filp_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_filp(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void gsb_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_gsb(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
int block_header_size = 0x20; /*from header*/
|
||||
int block_channel_size = 0x8000; /*from header, per channel*/
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void halpst_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_halpst(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i, header_length;
|
||||
/* header length must be a multiple of 0x20 */
|
||||
header_length = (4+8*vgmstream->channels+0x1f)/0x20*0x20;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* a simple headerless block with special adpcm history handling */
|
||||
void hwas_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_hwas(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
size_t block_size;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void matx_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_matx(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
//MxCh blocked layout as used by Lego Island
|
||||
void mxch_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_mxch(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->next_block_offset = block_offset +
|
||||
read_32bitLE(vgmstream->current_block_offset+4,vgmstream->ch[0].streamfile)+8;
|
|
@ -0,0 +1,22 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* blocks with mini header (0x48124812 + unknown + block data + block size) */
|
||||
void block_update_ps2_iab(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
||||
int i;
|
||||
size_t block_size, channel_size;
|
||||
|
||||
channel_size = read_32bitLE(block_offset+0x08,streamFile) / vgmstream->channels;
|
||||
block_size = read_32bitLE(block_offset+0x0c,streamFile);
|
||||
if (!block_size)
|
||||
block_size = 0x10; /* happens on last block */
|
||||
|
||||
vgmstream->current_block_size = channel_size;
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->next_block_offset = block_offset + block_size;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x10 + channel_size*i;
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void ps2_strlr_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_ps2_strlr(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* a simple headerless block with padding; configured in the main header */
|
||||
void rws_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_rws(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
size_t block_size;
|
||||
size_t interleave;
|
|
@ -0,0 +1,22 @@
|
|||
#include "layout.h"
|
||||
|
||||
/* Dream Factory STHD blocks */
|
||||
void block_update_sthd(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
||||
size_t block_size, channel_size;
|
||||
off_t data_offset;
|
||||
int i;
|
||||
|
||||
block_size = 0x800;
|
||||
data_offset = read_16bitLE(block_offset + 0x04, streamFile);
|
||||
channel_size = read_16bitLE(block_offset + 0x16, streamFile);
|
||||
/* 0x06: num channels, 0x10: total blocks, 0x12: block count, 0x14(2): null, 0x18: block count + 1 */
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = channel_size;
|
||||
vgmstream->next_block_offset = block_offset + block_size;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + data_offset + channel_size*i;
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void str_snds_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_str_snds(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
off_t current_chunk;
|
||||
size_t file_size;
|
||||
int i;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void thp_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_thp(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i,j;
|
||||
STREAMFILE *streamFile=vgmstream->ch[0].streamfile;
|
||||
off_t start_offset;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset (first 32bytes is useless for decoding) */
|
||||
void tra_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_tra(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void vs_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_vs(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
for (i=0;i<vgmstream->channels;i++) {
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void ws_aud_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_ws_aud(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = read_16bitLE(
|
|
@ -0,0 +1,21 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* .wsi - headered blocks with a single channel */
|
||||
void block_update_wsi(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
|
||||
int i;
|
||||
off_t channel_block_size;
|
||||
|
||||
|
||||
/* assume that all channels have the same size for this block */
|
||||
channel_block_size = read_32bitBE(block_offset, streamFile);
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = channel_block_size - 0x10; /* remove header */
|
||||
vgmstream->next_block_offset = block_offset + channel_block_size*vgmstream->channels;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + channel_block_size*i + 0x10;
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void xa_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_xa(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
int8_t currentChannel=0;
|
||||
int8_t subAudio=0;
|
|
@ -2,7 +2,7 @@
|
|||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void xvas_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
void block_update_xvas(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
|
@ -1,26 +0,0 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void caf_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = read_32bitBE(
|
||||
vgmstream->current_block_offset+0x14,
|
||||
vgmstream->ch[0].streamfile);
|
||||
vgmstream->next_block_offset = vgmstream->current_block_offset +
|
||||
(off_t)read_32bitBE(vgmstream->current_block_offset+0x04,
|
||||
vgmstream->ch[0].streamfile);
|
||||
|
||||
for (i=0;i<vgmstream->channels;i++) {
|
||||
vgmstream->ch[i].offset = vgmstream->current_block_offset +
|
||||
read_32bitBE(block_offset+0x10+(8*i),vgmstream->ch[0].streamfile);
|
||||
}
|
||||
|
||||
/* coeffs */
|
||||
for (i=0;i<16;i++) {
|
||||
vgmstream->ch[0].adpcm_coef[i] = read_16bitBE(block_offset+0x34+(2*i),vgmstream->ch[0].streamfile);
|
||||
vgmstream->ch[1].adpcm_coef[i] = read_16bitBE(block_offset+0x60+(2*i),vgmstream->ch[0].streamfile);
|
||||
}
|
||||
}
|
|
@ -10,12 +10,12 @@ void render_vgmstream_interleave(sample * buffer, int32_t sample_count, VGMSTREA
|
|||
|
||||
samples_this_block = vgmstream->interleave_block_size / frame_size * samples_per_frame;
|
||||
|
||||
if (vgmstream->layout_type == layout_interleave_shortblock &&
|
||||
if (vgmstream->interleave_last_block_size && vgmstream->channels > 1 &&
|
||||
vgmstream->current_sample - vgmstream->samples_into_block + samples_this_block> vgmstream->num_samples) {
|
||||
frame_size = get_vgmstream_shortframe_size(vgmstream);
|
||||
samples_per_frame = get_vgmstream_samples_per_shortframe(vgmstream);
|
||||
|
||||
samples_this_block = vgmstream->interleave_smallblock_size / frame_size * samples_per_frame;
|
||||
samples_this_block = vgmstream->interleave_last_block_size / frame_size * samples_per_frame;
|
||||
}
|
||||
|
||||
while (samples_written<sample_count) {
|
||||
|
@ -23,7 +23,7 @@ void render_vgmstream_interleave(sample * buffer, int32_t sample_count, VGMSTREA
|
|||
|
||||
if (vgmstream->loop_flag && vgmstream_do_loop(vgmstream)) {
|
||||
/* we assume that the loop is not back into a short block */
|
||||
if (vgmstream->layout_type == layout_interleave_shortblock) {
|
||||
if (vgmstream->interleave_last_block_size && vgmstream->channels > 1) {
|
||||
frame_size = get_vgmstream_frame_size(vgmstream);
|
||||
samples_per_frame = get_vgmstream_samples_per_frame(vgmstream);
|
||||
samples_this_block = vgmstream->interleave_block_size / frame_size * samples_per_frame;
|
||||
|
@ -45,14 +45,14 @@ void render_vgmstream_interleave(sample * buffer, int32_t sample_count, VGMSTREA
|
|||
|
||||
if (vgmstream->samples_into_block==samples_this_block) {
|
||||
int chan;
|
||||
if (vgmstream->layout_type == layout_interleave_shortblock &&
|
||||
if (vgmstream->interleave_last_block_size && vgmstream->channels > 1 &&
|
||||
vgmstream->current_sample + samples_this_block > vgmstream->num_samples) {
|
||||
frame_size = get_vgmstream_shortframe_size(vgmstream);
|
||||
samples_per_frame = get_vgmstream_samples_per_shortframe(vgmstream);
|
||||
|
||||
samples_this_block = vgmstream->interleave_smallblock_size / frame_size * samples_per_frame;
|
||||
samples_this_block = vgmstream->interleave_last_block_size / frame_size * samples_per_frame;
|
||||
for (chan=0;chan<vgmstream->channels;chan++)
|
||||
vgmstream->ch[chan].offset+=vgmstream->interleave_block_size*(vgmstream->channels-chan)+vgmstream->interleave_smallblock_size*chan;
|
||||
vgmstream->ch[chan].offset+=vgmstream->interleave_block_size*(vgmstream->channels-chan)+vgmstream->interleave_last_block_size*chan;
|
||||
} else {
|
||||
|
||||
for (chan=0;chan<vgmstream->channels;chan++)
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* TODO: there must be a reasonable way to respect the loop settings, as
|
||||
the substreams are in their own little world.
|
||||
Currently the VGMSTREAMs layers loop internally and the external/base VGMSTREAM
|
||||
doesn't actually loop, and would ignore any altered values/loop_flag. */
|
||||
|
||||
#define LAYER_BUF_SIZE 512
|
||||
#define LAYER_MAX_CHANNELS 6 /* at least 2, but let's be generous */
|
||||
|
||||
|
||||
void render_vgmstream_layered(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
||||
sample interleave_buf[LAYER_BUF_SIZE*LAYER_MAX_CHANNELS];
|
||||
int32_t samples_done = 0;
|
||||
layered_layout_data *data = vgmstream->layout_data;
|
||||
|
||||
while (samples_done < sample_count) {
|
||||
int32_t samples_to_do = LAYER_BUF_SIZE;
|
||||
int layer;
|
||||
|
||||
if (samples_to_do > sample_count - samples_done)
|
||||
samples_to_do = sample_count - samples_done;
|
||||
|
||||
for (layer = 0; layer < data->layer_count; layer++) {
|
||||
int s,l_ch;
|
||||
int layer_channels = data->layers[layer]->channels;
|
||||
|
||||
render_vgmstream(interleave_buf, samples_to_do, data->layers[layer]);
|
||||
|
||||
for (l_ch = 0; l_ch < layer_channels; l_ch++) {
|
||||
for (s = 0; s < samples_to_do; s++) {
|
||||
size_t layer_sample = s*layer_channels + l_ch;
|
||||
size_t buffer_sample = (samples_done+s)*vgmstream->channels + (layer*layer_channels+l_ch);
|
||||
|
||||
buffer[buffer_sample] = interleave_buf[layer_sample];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
samples_done += samples_to_do;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
layered_layout_data* init_layout_layered(int layer_count) {
|
||||
layered_layout_data *data = NULL;
|
||||
|
||||
if (layer_count <= 0 || layer_count > 255)
|
||||
goto fail;
|
||||
|
||||
data = calloc(1, sizeof(layered_layout_data));
|
||||
if (!data) goto fail;
|
||||
|
||||
data->layer_count = layer_count;
|
||||
|
||||
data->layers = calloc(layer_count, sizeof(VGMSTREAM*));
|
||||
if (!data->layers) goto fail;
|
||||
|
||||
return data;
|
||||
fail:
|
||||
free_layout_layered(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int setup_layout_layered(layered_layout_data* data) {
|
||||
int i;
|
||||
|
||||
/* setup each VGMSTREAM (roughly equivalent to vgmstream.c's init_vgmstream_internal stuff) */
|
||||
for (i = 0; i < data->layer_count; i++) {
|
||||
if (!data->layers[i])
|
||||
goto fail;
|
||||
|
||||
if (data->layers[i]->num_samples <= 0)
|
||||
goto fail;
|
||||
|
||||
if (data->layers[i]->channels > LAYER_MAX_CHANNELS)
|
||||
goto fail;
|
||||
|
||||
if (i > 0) {
|
||||
/* a bit weird, but no matter */
|
||||
if (data->layers[i]->sample_rate != data->layers[i-1]->sample_rate) {
|
||||
VGM_LOG("layered layout: layer %i has different sample rate\n", i);
|
||||
}
|
||||
|
||||
/* also weird */
|
||||
if (data->layers[i]->coding_type != data->layers[i-1]->coding_type) {
|
||||
VGM_LOG("layered layout: layer %i has different coding type\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
//todo could check if layers'd loop match vs main, etc
|
||||
|
||||
/* save start things so we can restart for seeking/looping */
|
||||
memcpy(data->layers[i]->start_ch,data->layers[i]->ch,sizeof(VGMSTREAMCHANNEL)*data->layers[i]->channels);
|
||||
memcpy(data->layers[i]->start_vgmstream,data->layers[i],sizeof(VGMSTREAM));
|
||||
}
|
||||
|
||||
return 1;
|
||||
fail:
|
||||
return 0; /* caller is expected to free */
|
||||
}
|
||||
|
||||
void free_layout_layered(layered_layout_data *data) {
|
||||
int i;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
if (data->layers) {
|
||||
for (i = 0; i < data->layer_count; i++) {
|
||||
close_vgmstream(data->layers[i]);
|
||||
}
|
||||
free(data->layers);
|
||||
}
|
||||
free(data);
|
||||
}
|
||||
|
||||
void reset_layout_layered(layered_layout_data *data) {
|
||||
int i;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
for (i = 0; i < data->layer_count; i++) {
|
||||
reset_vgmstream(data->layers[i]);
|
||||
}
|
||||
}
|
|
@ -7,78 +7,60 @@
|
|||
/* blocked layouts */
|
||||
void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
|
||||
void ast_block_update(off_t block_ofset, VGMSTREAM * vgmstream);
|
||||
|
||||
void mxch_block_update(off_t block_ofset, VGMSTREAM * vgmstream);
|
||||
|
||||
void halpst_block_update(off_t block_ofset, VGMSTREAM * vgmstream);
|
||||
|
||||
void xa_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void block_update_ast(off_t block_ofset, VGMSTREAM * vgmstream);
|
||||
void block_update_mxch(off_t block_ofset, VGMSTREAM * vgmstream);
|
||||
void block_update_halpst(off_t block_ofset, VGMSTREAM * vgmstream);
|
||||
void block_update_xa(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_ea_1snh(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void caf_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void wsi_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void str_snds_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void ws_aud_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void matx_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void block_update_caf(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_wsi(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_str_snds(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_ws_aud(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_matx(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_dec(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void vs_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void emff_ps2_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void emff_ngc_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void gsb_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void xvas_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void thp_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void filp_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void block_update_vs(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_emff_ps2(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_emff_ngc(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_gsb(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_xvas(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_thp(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_filp(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_ivaud(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void block_update_ea_swvr(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void ps2_adm_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void dsp_bdsp_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void tra_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void ps2_iab_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void ps2_strlr_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void rws_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void hwas_block_update(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
void block_update_adm(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_bdsp(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_tra(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_ps2_iab(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_ps2_strlr(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_rws(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_hwas(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
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);
|
||||
void block_update_ea_wve_au00(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_ea_wve_ad10(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
void block_update_sthd(off_t block_offset, VGMSTREAM * vgmstream);
|
||||
|
||||
/* other layouts */
|
||||
void render_vgmstream_interleave(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
|
||||
void render_vgmstream_nolayout(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
|
||||
void render_vgmstream_mus_acm(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
|
||||
void render_vgmstream_aix(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
|
||||
void render_vgmstream_aax(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
void render_vgmstream_segmented(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
segmented_layout_data* init_layout_segmented(int segment_count);
|
||||
int setup_layout_segmented(segmented_layout_data* data);
|
||||
void free_layout_segmented(segmented_layout_data *data);
|
||||
void reset_layout_segmented(segmented_layout_data *data);
|
||||
|
||||
void render_vgmstream_scd_int(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
void render_vgmstream_layered(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream);
|
||||
layered_layout_data* init_layout_layered(int layer_count);
|
||||
int setup_layout_layered(layered_layout_data* data);
|
||||
void free_layout_layered(layered_layout_data *data);
|
||||
void reset_layout_layered(layered_layout_data *data);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
#include "../coding/acm_decoder.h"
|
||||
#include "../coding/coding.h"
|
||||
|
||||
void render_vgmstream_mus_acm(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
||||
int samples_written=0;
|
||||
mus_acm_codec_data *data = vgmstream->codec_data;
|
||||
|
||||
while (samples_written<sample_count) {
|
||||
ACMStream *acm = data->files[data->current_file];
|
||||
int samples_to_do;
|
||||
int samples_this_block = acm->total_values / acm->info.channels;
|
||||
|
||||
if (vgmstream->loop_flag && vgmstream_do_loop(vgmstream)) {
|
||||
data->current_file = data->loop_start_file;
|
||||
acm_reset(data->files[data->current_file]);
|
||||
vgmstream->samples_into_block = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
samples_to_do = vgmstream_samples_to_do(samples_this_block, 1, vgmstream);
|
||||
|
||||
/*printf("samples_to_do=%d,samples_this_block=%d,samples_written=%d,sample_count=%d\n",samples_to_do,samples_this_block,samples_written,sample_count);*/
|
||||
|
||||
if (samples_written+samples_to_do > sample_count)
|
||||
samples_to_do=sample_count-samples_written;
|
||||
|
||||
if (samples_to_do == 0)
|
||||
{
|
||||
data->current_file++;
|
||||
/*printf("next %d, %d samples\n",data->current_file,data->files[data->current_file]->total_values/data->files[data->current_file]->info.channels);*/
|
||||
/* force loop back to first file in case we're still playing for some
|
||||
* reason, prevent out of bounds stuff */
|
||||
if (data->current_file >= data->file_count) data->current_file = 0;
|
||||
acm_reset(data->files[data->current_file]);
|
||||
vgmstream->samples_into_block = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
/*printf("decode %d samples file %d\n",samples_to_do,data->current_file);*/
|
||||
decode_acm(acm,
|
||||
buffer+samples_written*vgmstream->channels,
|
||||
samples_to_do, vgmstream->channels);
|
||||
|
||||
samples_written += samples_to_do;
|
||||
vgmstream->current_sample += samples_to_do;
|
||||
vgmstream->samples_into_block+=samples_to_do;
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void ps2_adm_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = 0x1000; /*read_32bitLE(
|
||||
vgmstream->current_block_offset+0x10,
|
||||
vgmstream->ch[0].streamfile); */
|
||||
vgmstream->next_block_offset = vgmstream->current_block_offset + vgmstream->current_block_size;
|
||||
//vgmstream->current_block_size/=vgmstream->channels;
|
||||
|
||||
for (i=0;i<vgmstream->channels;i++) {
|
||||
vgmstream->ch[i].offset = vgmstream->current_block_offset+(0x400*i);
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void ps2_iab_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = read_32bitLE(vgmstream->current_block_offset+0x08,vgmstream->ch[0].streamfile);
|
||||
vgmstream->next_block_offset = vgmstream->current_block_offset+vgmstream->current_block_size+0x10;
|
||||
vgmstream->current_block_size/=vgmstream->channels;
|
||||
|
||||
for (i=0;i<vgmstream->channels;i++) {
|
||||
vgmstream->ch[i].offset = vgmstream->current_block_offset+0x10+(vgmstream->current_block_size*i);
|
||||
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* TODO: currently only properly handles mono substreams */
|
||||
/* TODO: there must be a reasonable way to respect the loop settings, as is
|
||||
the substreams are in their own little world */
|
||||
|
||||
#define INTERLEAVE_BUF_SIZE 512
|
||||
void render_vgmstream_scd_int(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
||||
sample interleave_buf[INTERLEAVE_BUF_SIZE];
|
||||
int32_t samples_done = 0;
|
||||
scd_int_codec_data *data = vgmstream->codec_data;
|
||||
|
||||
while (samples_done < sample_count)
|
||||
{
|
||||
int32_t samples_to_do = INTERLEAVE_BUF_SIZE;
|
||||
int c;
|
||||
if (samples_to_do > sample_count - samples_done)
|
||||
samples_to_do = sample_count - samples_done;
|
||||
|
||||
for (c=0; c < data->substream_count; c++)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
render_vgmstream(interleave_buf,
|
||||
samples_to_do, data->substreams[c]);
|
||||
|
||||
for (i=0; i < samples_to_do; i++)
|
||||
{
|
||||
buffer[(samples_done+i)*data->substream_count + c] = interleave_buf[i];
|
||||
}
|
||||
}
|
||||
|
||||
samples_done += samples_to_do;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
|
||||
void render_vgmstream_segmented(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
||||
int samples_written=0;
|
||||
segmented_layout_data *data = vgmstream->layout_data;
|
||||
//int samples_per_frame = get_vgmstream_samples_per_frame(vgmstream);
|
||||
|
||||
while (samples_written<sample_count) {
|
||||
int samples_to_do;
|
||||
int samples_this_block = data->segments[data->current_segment]->num_samples;
|
||||
|
||||
if (vgmstream->loop_flag && vgmstream_do_loop(vgmstream)) {
|
||||
//todo can only loop in a segment start
|
||||
// (for arbitrary values find loop segment from loop_start_sample, and skip N samples until loop start)
|
||||
data->current_segment = data->loop_segment;
|
||||
|
||||
reset_vgmstream(data->segments[data->current_segment]);
|
||||
|
||||
vgmstream->samples_into_block = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
samples_to_do = vgmstream_samples_to_do(samples_this_block, 1, vgmstream);
|
||||
|
||||
if (samples_written+samples_to_do > sample_count)
|
||||
samples_to_do=sample_count-samples_written;
|
||||
|
||||
if (samples_to_do == 0) {
|
||||
data->current_segment++;
|
||||
reset_vgmstream(data->segments[data->current_segment]);
|
||||
|
||||
vgmstream->samples_into_block = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
render_vgmstream(&buffer[samples_written*data->segments[data->current_segment]->channels],
|
||||
samples_to_do,data->segments[data->current_segment]);
|
||||
|
||||
samples_written += samples_to_do;
|
||||
vgmstream->current_sample += samples_to_do;
|
||||
vgmstream->samples_into_block+=samples_to_do;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
segmented_layout_data* init_layout_segmented(int segment_count) {
|
||||
segmented_layout_data *data = NULL;
|
||||
|
||||
if (segment_count <= 0 || segment_count > 255)
|
||||
goto fail;
|
||||
|
||||
data = calloc(1, sizeof(segmented_layout_data));
|
||||
if (!data) goto fail;
|
||||
|
||||
data->segment_count = segment_count;
|
||||
data->current_segment = 0;
|
||||
|
||||
data->segments = calloc(segment_count, sizeof(VGMSTREAM*));
|
||||
if (!data->segments) goto fail;
|
||||
|
||||
return data;
|
||||
fail:
|
||||
free_layout_segmented(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int setup_layout_segmented(segmented_layout_data* data) {
|
||||
int i;
|
||||
|
||||
/* setup each VGMSTREAM (roughly equivalent to vgmstream.c's init_vgmstream_internal stuff) */
|
||||
for (i = 0; i < data->segment_count; i++) {
|
||||
if (!data->segments[i])
|
||||
goto fail;
|
||||
|
||||
if (data->segments[i]->num_samples <= 0)
|
||||
goto fail;
|
||||
|
||||
/* shouldn't happen */
|
||||
if (data->segments[i]->loop_flag != 0) {
|
||||
VGM_LOG("segmented layout: segment %i is looped\n", i);
|
||||
data->segments[i]->loop_flag = 0;
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
if (data->segments[i]->channels != data->segments[i-1]->channels)
|
||||
goto fail;
|
||||
|
||||
/* a bit weird, but no matter */
|
||||
if (data->segments[i]->sample_rate != data->segments[i-1]->sample_rate) {
|
||||
VGM_LOG("segmented layout: segment %i has different sample rate\n", i);
|
||||
}
|
||||
|
||||
//if (data->segments[i]->coding_type != data->segments[i-1]->coding_type)
|
||||
// goto fail; /* perfectly acceptable */
|
||||
}
|
||||
|
||||
|
||||
/* save start things so we can restart for seeking/looping */
|
||||
memcpy(data->segments[i]->start_ch,data->segments[i]->ch,sizeof(VGMSTREAMCHANNEL)*data->segments[i]->channels);
|
||||
memcpy(data->segments[i]->start_vgmstream,data->segments[i],sizeof(VGMSTREAM));
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
fail:
|
||||
return 0; /* caller is expected to free */
|
||||
}
|
||||
|
||||
void free_layout_segmented(segmented_layout_data *data) {
|
||||
int i;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
if (data->segments) {
|
||||
for (i = 0; i < data->segment_count; i++) {
|
||||
close_vgmstream(data->segments[i]);
|
||||
}
|
||||
free(data->segments);
|
||||
}
|
||||
free(data);
|
||||
}
|
||||
|
||||
void reset_layout_segmented(segmented_layout_data *data) {
|
||||
int i;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
data->current_segment = 0;
|
||||
for (i = 0; i < data->segment_count; i++) {
|
||||
reset_vgmstream(data->segments[i]);
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void wsi_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
/* assume that all channels have the same size for this block */
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
/* current_block_size is the data size in this block, so subtract header */
|
||||
vgmstream->current_block_size = read_32bitBE(
|
||||
vgmstream->current_block_offset,
|
||||
vgmstream->ch[0].streamfile) - 0x10;
|
||||
vgmstream->next_block_offset =
|
||||
vgmstream->current_block_offset +
|
||||
(vgmstream->current_block_size + 0x10) * vgmstream->channels;
|
||||
|
||||
for (i=0;i<vgmstream->channels;i++) {
|
||||
vgmstream->ch[i].offset = vgmstream->current_block_offset +
|
||||
0x10 + (vgmstream->current_block_size+0x10)*i;
|
||||
}
|
||||
}
|
|
@ -1,673 +1,193 @@
|
|||
#include "meta.h"
|
||||
#include "aax_streamfile.h"
|
||||
#include "../layout/layout.h"
|
||||
#include "../coding/coding.h"
|
||||
#include "aax_utf.h"
|
||||
|
||||
struct utf_query
|
||||
{
|
||||
/* if 0 */
|
||||
const char *name;
|
||||
int index;
|
||||
};
|
||||
|
||||
struct offset_size_pair
|
||||
{
|
||||
uint32_t offset;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
struct utf_query_result
|
||||
{
|
||||
int valid; /* table is valid */
|
||||
int found;
|
||||
int type; /* one of COLUMN_TYPE_* */
|
||||
union
|
||||
{
|
||||
uint64_t value_u64;
|
||||
uint32_t value_u32;
|
||||
uint16_t value_u16;
|
||||
uint8_t value_u8;
|
||||
float value_float;
|
||||
struct offset_size_pair value_data;
|
||||
uint32_t value_string;
|
||||
} value;
|
||||
|
||||
/* info for the queried table */
|
||||
uint32_t rows;
|
||||
uint32_t name_offset;
|
||||
uint32_t string_table_offset;
|
||||
uint32_t data_offset;
|
||||
};
|
||||
|
||||
static struct utf_query_result analyze_utf(STREAMFILE *infile, long offset,
|
||||
const struct utf_query *query);
|
||||
|
||||
static struct utf_query_result query_utf(STREAMFILE *infile, long offset,
|
||||
const struct utf_query *query);
|
||||
|
||||
static struct utf_query_result query_utf_nofail(STREAMFILE *infile, const long offset,
|
||||
const struct utf_query *query, int *error);
|
||||
|
||||
static struct utf_query_result query_utf_key(STREAMFILE *infile, const long offset,
|
||||
int index, const char *name, int *error);
|
||||
|
||||
static uint8_t query_utf_1byte(STREAMFILE *infile, const long offset,
|
||||
int index, const char *name, int *error);
|
||||
|
||||
static struct offset_size_pair query_utf_data(STREAMFILE *infile, const long offset,
|
||||
int index, const char *name, int *error);
|
||||
|
||||
#define COLUMN_STORAGE_MASK 0xf0
|
||||
#define COLUMN_STORAGE_PERROW 0x50
|
||||
#define COLUMN_STORAGE_CONSTANT 0x30
|
||||
#define COLUMN_STORAGE_ZERO 0x10
|
||||
|
||||
#define COLUMN_TYPE_MASK 0x0f
|
||||
#define COLUMN_TYPE_DATA 0x0b
|
||||
#define COLUMN_TYPE_STRING 0x0a
|
||||
#define COLUMN_TYPE_FLOAT 0x08
|
||||
#define COLUMN_TYPE_8BYTE 0x06
|
||||
#define COLUMN_TYPE_4BYTE 0x04
|
||||
#define COLUMN_TYPE_2BYTE2 0x03
|
||||
#define COLUMN_TYPE_2BYTE 0x02
|
||||
#define COLUMN_TYPE_1BYTE2 0x01
|
||||
#define COLUMN_TYPE_1BYTE 0x00
|
||||
|
||||
struct utf_column_info
|
||||
{
|
||||
uint8_t type;
|
||||
const char *column_name;
|
||||
long constant_offset;
|
||||
};
|
||||
|
||||
struct utf_table_info
|
||||
{
|
||||
long table_offset;
|
||||
uint32_t table_size;
|
||||
uint32_t schema_offset;
|
||||
uint32_t rows_offset;
|
||||
uint32_t string_table_offset;
|
||||
uint32_t data_offset;
|
||||
const char *string_table;
|
||||
const char *table_name;
|
||||
uint16_t columns;
|
||||
uint16_t row_width;
|
||||
uint32_t rows;
|
||||
|
||||
const struct utf_column_info *schema;
|
||||
};
|
||||
static STREAMFILE* setup_aax_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, const char* fake_ext);
|
||||
|
||||
|
||||
/* AAX - segmented ADX [Padora's Tower (Wii)] */
|
||||
#define MAX_SEGMENTS 2 /* usually segment0=intro, segment1=loop/main */
|
||||
|
||||
/* AAX - segmented ADX [Bayonetta (PS3), Pandora's Tower (Wii), Catherine (X360), Binary Domain (PS3)] */
|
||||
VGMSTREAM * init_vgmstream_aax(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
STREAMFILE * streamFileAAX = NULL;
|
||||
STREAMFILE * streamFileADX = NULL;
|
||||
char filename[PATH_LIMIT];
|
||||
off_t *segment_offset = NULL;
|
||||
off_t *segment_size = NULL;
|
||||
int32_t sample_count;
|
||||
int is_hca;
|
||||
|
||||
int loop_flag = 0, channel_count = 0;
|
||||
int32_t sample_count, loop_start_sample = 0, loop_end_sample = 0;
|
||||
int segment_count, loop_segment = 0;
|
||||
|
||||
segmented_layout_data *data = NULL;
|
||||
int table_error = 0;
|
||||
|
||||
int loop_flag = 0;
|
||||
int32_t loop_start_sample=0;
|
||||
int32_t loop_end_sample=0;
|
||||
int loop_segment = 0;
|
||||
|
||||
aax_codec_data *data = NULL;
|
||||
|
||||
const long AAX_offset = 0;
|
||||
|
||||
int channel_count = 0, segment_count;
|
||||
int sample_rate = 0;
|
||||
|
||||
const long top_offset = 0x00;
|
||||
off_t segment_offset[MAX_SEGMENTS];
|
||||
size_t segment_size[MAX_SEGMENTS];
|
||||
int i;
|
||||
|
||||
|
||||
long aax_data_offset;
|
||||
/* checks */
|
||||
if (!check_extensions(streamFile, "aax"))
|
||||
goto fail;
|
||||
if (read_32bitBE(0x00,streamFile) != 0x40555446) /* "@UTF" */
|
||||
goto fail;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("aax",filename_extension(filename))) goto fail;
|
||||
|
||||
/* get AAX entry count, data offset */
|
||||
|
||||
/* get segment count, offsets and sizes */
|
||||
{
|
||||
struct utf_query_result result;
|
||||
long aax_string_table_offset;
|
||||
long aax_string_table_size;
|
||||
|
||||
result = query_utf_nofail(streamFile, AAX_offset, NULL, &table_error);
|
||||
long aax_data_offset;
|
||||
|
||||
result = query_utf_nofail(streamFile, top_offset, NULL, &table_error);
|
||||
if (table_error) goto fail;
|
||||
|
||||
segment_count = result.rows;
|
||||
aax_string_table_offset = AAX_offset + 8 + result.string_table_offset;
|
||||
aax_data_offset = AAX_offset + 8 + result.data_offset;
|
||||
if (segment_count > MAX_SEGMENTS) goto fail;
|
||||
|
||||
aax_string_table_offset = top_offset+0x08 + result.string_table_offset;
|
||||
aax_data_offset = top_offset+0x08 + result.data_offset;
|
||||
aax_string_table_size = aax_data_offset - aax_string_table_offset;
|
||||
|
||||
if (result.name_offset+4 > aax_string_table_size) goto fail;
|
||||
if (read_32bitBE(aax_string_table_offset + result.name_offset,
|
||||
streamFile) != 0x41415800) /* "AAX\0" */
|
||||
if (result.name_offset+0x04 > aax_string_table_size)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
segment_offset = calloc(segment_count,sizeof(off_t));
|
||||
if (!segment_offset)
|
||||
goto fail;
|
||||
segment_size = calloc(segment_count,sizeof(off_t));
|
||||
if (!segment_size)
|
||||
goto fail;
|
||||
|
||||
/* get offsets of constituent ADXs */
|
||||
for (i = 0; i < segment_count; i++)
|
||||
{
|
||||
struct offset_size_pair offset_size;
|
||||
offset_size = query_utf_data(streamFile, AAX_offset, i, "data", &table_error);
|
||||
if (table_error) goto fail;
|
||||
segment_offset[i] = aax_data_offset + offset_size.offset;
|
||||
segment_size[i] = offset_size.size;
|
||||
}
|
||||
|
||||
streamFileAAX = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
if (!streamFileAAX) goto fail;
|
||||
|
||||
data = malloc(sizeof(aax_codec_data));
|
||||
if (!data) goto fail;
|
||||
data->segment_count = segment_count;
|
||||
data->adxs = malloc(sizeof(STREAMFILE *)*segment_count);
|
||||
if (!data->adxs) goto fail;
|
||||
for (i=0;i<segment_count;i++) {
|
||||
data->adxs[i] = NULL;
|
||||
}
|
||||
data->sample_counts = calloc(segment_count,sizeof(int32_t));
|
||||
if (!data->sample_counts) goto fail;
|
||||
|
||||
/* for each segment */
|
||||
for (i = 0; i < segment_count; i++)
|
||||
{
|
||||
VGMSTREAM *adx;
|
||||
/*printf("try opening segment %d/%d %x\n",i,segment_count,segment_offset[i]);*/
|
||||
streamFileADX = open_aax_with_STREAMFILE(streamFileAAX,segment_offset[i],segment_size[i]);
|
||||
if (!streamFileADX) goto fail;
|
||||
adx = data->adxs[i] = init_vgmstream_adx(streamFileADX);
|
||||
if (!adx)
|
||||
goto fail;
|
||||
data->sample_counts[i] = adx->num_samples;
|
||||
close_streamfile(streamFileADX); streamFileADX = NULL;
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
channel_count = adx->channels;
|
||||
sample_rate = adx->sample_rate;
|
||||
}
|
||||
if (read_32bitBE(aax_string_table_offset + result.name_offset, streamFile) == 0x41415800) /* "AAX\0" */
|
||||
is_hca = 0;
|
||||
else if (read_32bitBE(aax_string_table_offset + result.name_offset, streamFile) == 0x48434100) /* "HCA\0" */
|
||||
is_hca = 1;
|
||||
else
|
||||
{
|
||||
if (channel_count != adx->channels)
|
||||
goto fail;
|
||||
if (sample_rate != adx->sample_rate)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (adx->loop_flag != 0)
|
||||
goto fail;
|
||||
|
||||
/* save start things so we can restart for seeking/looping */
|
||||
/* copy the channels */
|
||||
memcpy(adx->start_ch,adx->ch,sizeof(VGMSTREAMCHANNEL)*adx->channels);
|
||||
/* copy the whole VGMSTREAM */
|
||||
memcpy(adx->start_vgmstream,adx,sizeof(VGMSTREAM));
|
||||
/* get offsets of constituent segments */
|
||||
for (i = 0; i < segment_count; i++) {
|
||||
struct offset_size_pair offset_size;
|
||||
|
||||
offset_size = query_utf_data(streamFile, top_offset, i, "data", &table_error);
|
||||
if (table_error) goto fail;
|
||||
|
||||
segment_offset[i] = aax_data_offset + offset_size.offset;
|
||||
segment_size[i] = offset_size.size;
|
||||
}
|
||||
}
|
||||
|
||||
/* init layout */
|
||||
data = init_layout_segmented(segment_count);
|
||||
if (!data) goto fail;
|
||||
|
||||
/* open each segment subfile */
|
||||
for (i = 0; i < segment_count; i++) {
|
||||
STREAMFILE* temp_streamFile = setup_aax_streamfile(streamFile, segment_offset[i],segment_size[i], (is_hca ? "hca" : "adx"));
|
||||
if (!temp_streamFile) goto fail;
|
||||
|
||||
data->segments[i] = is_hca ?
|
||||
init_vgmstream_hca(temp_streamFile) :
|
||||
init_vgmstream_adx(temp_streamFile);
|
||||
|
||||
close_streamfile(temp_streamFile);
|
||||
|
||||
if (!data->segments[i]) goto fail;
|
||||
}
|
||||
|
||||
/* setup segmented VGMSTREAMs */
|
||||
if (!setup_layout_segmented(data))
|
||||
goto fail;
|
||||
|
||||
/* get looping and samples */
|
||||
sample_count = 0;
|
||||
loop_flag = 0;
|
||||
for (i = 0; i < segment_count; i++)
|
||||
{
|
||||
int segment_loop_flag = query_utf_1byte(streamFile, AAX_offset, i,
|
||||
"lpflg", &table_error);
|
||||
for (i = 0; i < segment_count; i++) {
|
||||
int segment_loop_flag = query_utf_1byte(streamFile, top_offset, i, "lpflg", &table_error);
|
||||
if (table_error) segment_loop_flag = 0;
|
||||
|
||||
if (!loop_flag && segment_loop_flag)
|
||||
{
|
||||
if (!loop_flag && segment_loop_flag) {
|
||||
loop_start_sample = sample_count;
|
||||
loop_segment = i;
|
||||
}
|
||||
|
||||
sample_count += data->sample_counts[i];
|
||||
sample_count += data->segments[i]->num_samples;
|
||||
|
||||
if (!loop_flag && segment_loop_flag)
|
||||
{
|
||||
if (!loop_flag && segment_loop_flag) {
|
||||
loop_end_sample = sample_count;
|
||||
loop_flag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
channel_count = data->segments[0]->channels;
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->sample_rate = data->segments[0]->sample_rate;
|
||||
vgmstream->num_samples = sample_count;
|
||||
vgmstream->sample_rate = sample_rate;
|
||||
|
||||
vgmstream->loop_start_sample = loop_start_sample;
|
||||
vgmstream->loop_end_sample = loop_end_sample;
|
||||
|
||||
vgmstream->coding_type = data->adxs[0]->coding_type;
|
||||
vgmstream->layout_type = layout_aax;
|
||||
vgmstream->meta_type = meta_AAX;
|
||||
vgmstream->coding_type = data->segments[0]->coding_type;
|
||||
vgmstream->layout_type = layout_segmented;
|
||||
|
||||
vgmstream->ch[0].streamfile = streamFileAAX;
|
||||
data->current_segment = 0;
|
||||
vgmstream->layout_data = data;
|
||||
data->loop_segment = loop_segment;
|
||||
|
||||
vgmstream->codec_data = data;
|
||||
free(segment_offset);
|
||||
free(segment_size);
|
||||
|
||||
return vgmstream;
|
||||
|
||||
/* clean up anything we may have opened */
|
||||
fail:
|
||||
if (streamFileAAX) close_streamfile(streamFileAAX);
|
||||
if (streamFileADX) close_streamfile(streamFileADX);
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
if (segment_offset) free(segment_offset);
|
||||
if (segment_size) free(segment_size);
|
||||
if (data) {
|
||||
if (data->adxs)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<data->segment_count;i++)
|
||||
if (data->adxs)
|
||||
close_vgmstream(data->adxs[i]);
|
||||
free(data->adxs);
|
||||
}
|
||||
if (data->sample_counts)
|
||||
{
|
||||
free(data->sample_counts);
|
||||
}
|
||||
free(data);
|
||||
}
|
||||
close_vgmstream(vgmstream);
|
||||
free_layout_segmented(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* @UTF table reading, abridged */
|
||||
static struct utf_query_result analyze_utf(STREAMFILE *infile, const long offset, const struct utf_query *query)
|
||||
{
|
||||
unsigned char buf[4];
|
||||
struct utf_table_info table_info;
|
||||
char *string_table = NULL;
|
||||
struct utf_column_info * schema = NULL;
|
||||
struct utf_query_result result;
|
||||
uint32_t table_name_string;
|
||||
int string_table_size;
|
||||
|
||||
result.valid = 0;
|
||||
static STREAMFILE* setup_aax_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, const char* fake_ext) {
|
||||
STREAMFILE *temp_streamFile = NULL, *new_streamFile = NULL;
|
||||
|
||||
table_info.table_offset = offset;
|
||||
/* setup subfile */
|
||||
new_streamFile = open_wrap_streamfile(streamFile);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
/* check header */
|
||||
{
|
||||
static const char UTF_signature[4] = "@UTF"; /* intentionally unterminated */
|
||||
if (4 != read_streamfile(buf, offset, 4, infile)) goto cleanup_error;
|
||||
if (memcmp(buf, UTF_signature, sizeof(UTF_signature)))
|
||||
{
|
||||
goto cleanup_error;
|
||||
}
|
||||
}
|
||||
new_streamFile = open_clamp_streamfile(temp_streamFile, subfile_offset,subfile_size);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
/* get table size */
|
||||
table_info.table_size = read_32bitBE(offset+4, infile);
|
||||
new_streamFile = open_fakename_streamfile(temp_streamFile, NULL,fake_ext);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
table_info.schema_offset = 0x20;
|
||||
table_info.rows_offset = read_32bitBE(offset+8, infile);
|
||||
table_info.string_table_offset = read_32bitBE(offset+0xc,infile);
|
||||
table_info.data_offset = read_32bitBE(offset+0x10,infile);
|
||||
table_name_string = read_32bitBE(offset+0x14,infile);
|
||||
table_info.columns = read_16bitBE(offset+0x18,infile);
|
||||
table_info.row_width = read_16bitBE(offset+0x1a,infile);
|
||||
table_info.rows = read_32bitBE(offset+0x1c,infile);
|
||||
return temp_streamFile;
|
||||
|
||||
/* allocate for string table */
|
||||
string_table_size = table_info.data_offset-table_info.string_table_offset;
|
||||
string_table = malloc(string_table_size+1);
|
||||
if (!string_table) goto cleanup_error;
|
||||
table_info.string_table = string_table;
|
||||
memset(string_table, 0, string_table_size+1);
|
||||
|
||||
/* load schema */
|
||||
schema = malloc(sizeof(struct utf_column_info) * table_info.columns);
|
||||
if (!schema) goto cleanup_error;
|
||||
|
||||
{
|
||||
int i;
|
||||
long schema_current_offset = table_info.schema_offset;
|
||||
for (i = 0; i < table_info.columns; i++)
|
||||
{
|
||||
schema[i].type = read_8bit(schema_current_offset,infile);
|
||||
schema_current_offset ++;
|
||||
schema[i].column_name = string_table + read_32bitBE(schema_current_offset,infile);
|
||||
schema_current_offset += 4;
|
||||
|
||||
if ((schema[i].type & COLUMN_STORAGE_MASK) == COLUMN_STORAGE_CONSTANT)
|
||||
{
|
||||
schema[i].constant_offset = schema_current_offset;
|
||||
switch (schema[i].type & COLUMN_TYPE_MASK)
|
||||
{
|
||||
case COLUMN_TYPE_8BYTE:
|
||||
case COLUMN_TYPE_DATA:
|
||||
schema_current_offset+=8;
|
||||
break;
|
||||
case COLUMN_TYPE_STRING:
|
||||
case COLUMN_TYPE_FLOAT:
|
||||
case COLUMN_TYPE_4BYTE:
|
||||
schema_current_offset+=4;
|
||||
break;
|
||||
case COLUMN_TYPE_2BYTE2:
|
||||
case COLUMN_TYPE_2BYTE:
|
||||
schema_current_offset+=2;
|
||||
break;
|
||||
case COLUMN_TYPE_1BYTE2:
|
||||
case COLUMN_TYPE_1BYTE:
|
||||
schema_current_offset++;
|
||||
break;
|
||||
default:
|
||||
goto cleanup_error;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table_info.schema = schema;
|
||||
|
||||
/* read string table */
|
||||
read_streamfile((unsigned char *)string_table,
|
||||
table_info.string_table_offset+8+offset,
|
||||
string_table_size, infile);
|
||||
table_info.table_name = table_info.string_table+table_name_string;
|
||||
|
||||
/* fill in the default stuff */
|
||||
result.found = 0;
|
||||
result.rows = table_info.rows;
|
||||
result.name_offset = table_name_string;
|
||||
result.string_table_offset = table_info.string_table_offset;
|
||||
result.data_offset = table_info.data_offset;
|
||||
|
||||
/* explore the values */
|
||||
if (query) {
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < table_info.rows; i++)
|
||||
{
|
||||
uint32_t row_offset =
|
||||
table_info.table_offset + 8 + table_info.rows_offset +
|
||||
i * table_info.row_width;
|
||||
const uint32_t row_start_offset = row_offset;
|
||||
|
||||
if (query && i != query->index) continue;
|
||||
|
||||
for (j = 0; j < table_info.columns; j++)
|
||||
{
|
||||
uint8_t type = table_info.schema[j].type;
|
||||
long constant_offset = table_info.schema[j].constant_offset;
|
||||
int constant = 0;
|
||||
|
||||
int qthis = (query && i == query->index &&
|
||||
!strcmp(table_info.schema[j].column_name, query->name));
|
||||
|
||||
if (qthis)
|
||||
{
|
||||
result.found = 1;
|
||||
result.type = schema[j].type & COLUMN_TYPE_MASK;
|
||||
}
|
||||
|
||||
switch (schema[j].type & COLUMN_STORAGE_MASK)
|
||||
{
|
||||
case COLUMN_STORAGE_PERROW:
|
||||
break;
|
||||
case COLUMN_STORAGE_CONSTANT:
|
||||
constant = 1;
|
||||
break;
|
||||
case COLUMN_STORAGE_ZERO:
|
||||
if (qthis)
|
||||
{
|
||||
memset(&result.value, 0,
|
||||
sizeof(result.value));
|
||||
}
|
||||
continue;
|
||||
default:
|
||||
goto cleanup_error;
|
||||
}
|
||||
|
||||
if (1)
|
||||
{
|
||||
long data_offset;
|
||||
int bytes_read;
|
||||
|
||||
if (constant)
|
||||
{
|
||||
data_offset = constant_offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
data_offset = row_offset;
|
||||
}
|
||||
|
||||
switch (type & COLUMN_TYPE_MASK)
|
||||
{
|
||||
case COLUMN_TYPE_STRING:
|
||||
{
|
||||
uint32_t string_offset;
|
||||
string_offset = read_32bitBE(data_offset, infile);
|
||||
bytes_read = 4;
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_string = string_offset;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case COLUMN_TYPE_DATA:
|
||||
{
|
||||
uint32_t vardata_offset, vardata_size;
|
||||
|
||||
vardata_offset = read_32bitBE(data_offset, infile);
|
||||
vardata_size = read_32bitBE(data_offset+4, infile);
|
||||
bytes_read = 8;
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_data.offset = vardata_offset;
|
||||
result.value.value_data.size = vardata_size;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case COLUMN_TYPE_8BYTE:
|
||||
{
|
||||
uint64_t value =
|
||||
read_32bitBE(data_offset, infile);
|
||||
value <<= 32;
|
||||
value |=
|
||||
read_32bitBE(data_offset+4, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_u64 = value;
|
||||
}
|
||||
bytes_read = 8;
|
||||
break;
|
||||
}
|
||||
case COLUMN_TYPE_4BYTE:
|
||||
{
|
||||
uint32_t value =
|
||||
read_32bitBE(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_u32 = value;
|
||||
}
|
||||
bytes_read = 4;
|
||||
}
|
||||
break;
|
||||
case COLUMN_TYPE_2BYTE2:
|
||||
case COLUMN_TYPE_2BYTE:
|
||||
{
|
||||
uint16_t value =
|
||||
read_16bitBE(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_u16 = value;
|
||||
}
|
||||
bytes_read = 2;
|
||||
}
|
||||
break;
|
||||
case COLUMN_TYPE_FLOAT:
|
||||
if (sizeof(float) == 4)
|
||||
{
|
||||
union {
|
||||
float float_value;
|
||||
uint32_t int_value;
|
||||
} int_float;
|
||||
|
||||
int_float.int_value = read_32bitBE(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_float = int_float.float_value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
read_32bitBE(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
goto cleanup_error;
|
||||
}
|
||||
}
|
||||
bytes_read = 4;
|
||||
break;
|
||||
case COLUMN_TYPE_1BYTE2:
|
||||
case COLUMN_TYPE_1BYTE:
|
||||
{
|
||||
uint8_t value =
|
||||
read_8bit(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_u8 = value;
|
||||
}
|
||||
bytes_read = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto cleanup_error;
|
||||
}
|
||||
|
||||
if (!constant)
|
||||
{
|
||||
row_offset += bytes_read;
|
||||
}
|
||||
} /* useless if end */
|
||||
} /* column for loop end */
|
||||
|
||||
if (row_offset - row_start_offset != table_info.row_width)
|
||||
goto cleanup_error;
|
||||
|
||||
if (query && i >= query->index) break;
|
||||
} /* row for loop end */
|
||||
} /* explore values block end */
|
||||
|
||||
//cleanup:
|
||||
|
||||
result.valid = 1;
|
||||
cleanup_error:
|
||||
|
||||
if (string_table)
|
||||
{
|
||||
free(string_table);
|
||||
string_table = NULL;
|
||||
}
|
||||
|
||||
if (schema)
|
||||
{
|
||||
free(schema);
|
||||
schema = NULL;
|
||||
}
|
||||
|
||||
return result;
|
||||
fail:
|
||||
close_streamfile(temp_streamFile);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct utf_query_result query_utf(STREAMFILE *infile, const long offset, const struct utf_query *query)
|
||||
{
|
||||
return analyze_utf(infile, offset, query);
|
||||
}
|
||||
|
||||
static struct utf_query_result query_utf_nofail(STREAMFILE *infile, const long offset, const struct utf_query *query, int *error)
|
||||
{
|
||||
const struct utf_query_result result = query_utf(infile, offset, query);
|
||||
|
||||
if (error)
|
||||
{
|
||||
*error = 0;
|
||||
if (!result.valid) *error = 1;
|
||||
if (query && !result.found) *error = 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static struct utf_query_result query_utf_key(STREAMFILE *infile, const long offset, int index, const char *name, int *error)
|
||||
{
|
||||
struct utf_query query;
|
||||
query.index = index;
|
||||
query.name = name;
|
||||
|
||||
return query_utf_nofail(infile, offset, &query, error);
|
||||
}
|
||||
|
||||
static uint8_t query_utf_1byte(STREAMFILE *infile, const long offset, int index, const char *name, int *error)
|
||||
{
|
||||
struct utf_query_result result = query_utf_key(infile, offset, index, name, error);
|
||||
if (error)
|
||||
{
|
||||
if (result.type != COLUMN_TYPE_1BYTE) *error = 1;
|
||||
}
|
||||
return result.value.value_u8;
|
||||
}
|
||||
|
||||
static uint32_t query_utf_4byte(STREAMFILE *infile, const long offset, int index, const char *name, int *error)
|
||||
{
|
||||
struct utf_query_result result = query_utf_key(infile, offset, index, name, error);
|
||||
if (error)
|
||||
{
|
||||
if (result.type != COLUMN_TYPE_4BYTE) *error = 1;
|
||||
}
|
||||
return result.value.value_u32;
|
||||
}
|
||||
|
||||
static struct offset_size_pair query_utf_data(STREAMFILE *infile, const long offset,
|
||||
int index, const char *name, int *error)
|
||||
{
|
||||
struct utf_query_result result = query_utf_key(infile, offset, index, name, error);
|
||||
if (error)
|
||||
{
|
||||
if (result.type != COLUMN_TYPE_DATA) *error = 1;
|
||||
}
|
||||
return result.value.value_data;
|
||||
}
|
||||
|
||||
/* CRI's UTF wrapper around DSP */
|
||||
/* CRI's UTF wrapper around DSP [Sonic Colors sfx (Wii), NiGHTS: Journey of Dreams sfx (Wii)] */
|
||||
VGMSTREAM * init_vgmstream_utf_dsp(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[PATH_LIMIT];
|
||||
int table_error = 0;
|
||||
off_t start_offset;
|
||||
size_t channel_size;
|
||||
|
||||
int loop_flag = 0;
|
||||
|
||||
const long top_offset = 0;
|
||||
|
||||
int channel_count;
|
||||
int sample_rate;
|
||||
int loop_flag = 0, channel_count, sample_rate;
|
||||
long sample_count;
|
||||
|
||||
int table_error = 0;
|
||||
const long top_offset = 0x00;
|
||||
long top_data_offset, segment_count;
|
||||
long body_offset, body_size;
|
||||
long header_offset, header_size;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
//if (strcasecmp("aax",filename_extension(filename))) goto fail;
|
||||
|
||||
/* get entry count, data offset */
|
||||
/* checks */
|
||||
/* files don't have extension, we accept "" for CLI and .aax for plugins (they aren't exactly .aax though) */
|
||||
if (!check_extensions(streamFile, "aax,"))
|
||||
goto fail;
|
||||
if (read_32bitBE(0x00,streamFile) != 0x40555446) /* "@UTF" */
|
||||
goto fail;
|
||||
|
||||
/* get segment count, offsets and sizes*/
|
||||
{
|
||||
struct utf_query_result result;
|
||||
long top_string_table_offset;
|
||||
|
@ -676,8 +196,10 @@ VGMSTREAM * init_vgmstream_utf_dsp(STREAMFILE *streamFile) {
|
|||
|
||||
result = query_utf_nofail(streamFile, top_offset, NULL, &table_error);
|
||||
if (table_error) goto fail;
|
||||
|
||||
segment_count = result.rows;
|
||||
if (segment_count != 1) goto fail; // only simple stuff for now
|
||||
if (segment_count != 1) goto fail; /* only simple stuff for now (multisegment not known) */
|
||||
|
||||
top_string_table_offset = top_offset + 8 + result.string_table_offset;
|
||||
top_data_offset = top_offset + 8 + result.data_offset;
|
||||
top_string_table_size = top_data_offset - top_string_table_offset;
|
||||
|
@ -685,12 +207,13 @@ VGMSTREAM * init_vgmstream_utf_dsp(STREAMFILE *streamFile) {
|
|||
if (result.name_offset+10 > top_string_table_size) goto fail;
|
||||
|
||||
name_offset = top_string_table_offset + result.name_offset;
|
||||
if (read_32bitBE(name_offset, streamFile) != 0x41445043 ||// "ADPC"
|
||||
read_32bitBE(name_offset+4, streamFile) != 0x4D5F5749 ||// "M_WI"
|
||||
read_16bitBE(name_offset+8, streamFile) != 0x4900) // "I\0"
|
||||
if (read_32bitBE(name_offset+0x00, streamFile) != 0x41445043 || /* "ADPC" */
|
||||
read_32bitBE(name_offset+0x04, streamFile) != 0x4D5F5749 || /* "M_WI" */
|
||||
read_16bitBE(name_offset+0x08, streamFile) != 0x4900) /* "I\0" */
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* get sizes */
|
||||
{
|
||||
struct offset_size_pair offset_size;
|
||||
|
||||
|
@ -712,36 +235,29 @@ VGMSTREAM * init_vgmstream_utf_dsp(STREAMFILE *streamFile) {
|
|||
if (channel_count != 1 && channel_count != 2) goto fail;
|
||||
if (header_size != channel_count * 0x60) goto fail;
|
||||
|
||||
start_offset = body_offset;
|
||||
channel_size = (body_size+7) / 8 * 8 / channel_count;
|
||||
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->num_samples = sample_count;
|
||||
vgmstream->sample_rate = sample_rate;
|
||||
vgmstream->num_samples = sample_count;
|
||||
|
||||
vgmstream->coding_type = coding_NGC_DSP;
|
||||
vgmstream->layout_type = layout_none;
|
||||
vgmstream->meta_type = meta_UTF_DSP;
|
||||
vgmstream->coding_type = coding_NGC_DSP;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = channel_size;
|
||||
|
||||
{
|
||||
int i,j;
|
||||
long channel_size = (body_size+7)/8*8/channel_count;
|
||||
for (i = 0; i < channel_count; i++)
|
||||
{
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
if (!vgmstream->ch[i].streamfile) goto fail;
|
||||
vgmstream->ch[i].channel_start_offset =
|
||||
vgmstream->ch[i].offset = body_offset + i * channel_size;
|
||||
for (j=0;j<16;j++)
|
||||
{
|
||||
vgmstream->ch[i].adpcm_coef[j] =
|
||||
read_16bitBE(header_offset + 0x60*i + 0x1c + j*2, streamFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
dsp_read_coefs_be(vgmstream, streamFile, header_offset+0x1c, 0x60);
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
return vgmstream;
|
||||
|
||||
/* clean up anything we may have opened */
|
||||
fail:
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
#ifndef _AAX_STREAMFILE_H_
|
||||
#define _AAX_STREAMFILE_H_
|
||||
#include "../streamfile.h"
|
||||
|
||||
/* a streamfile representing a subfile inside another */
|
||||
|
||||
typedef struct _AAXSTREAMFILE {
|
||||
STREAMFILE sf;
|
||||
STREAMFILE *real_file;
|
||||
off_t start_physical_offset;
|
||||
size_t file_size;
|
||||
} AAXSTREAMFILE;
|
||||
|
||||
static size_t read_aax(AAXSTREAMFILE *streamfile,uint8_t *dest,off_t offset,size_t length) {
|
||||
/* truncate at end of logical file */
|
||||
if (offset+length > streamfile->file_size) {
|
||||
long signed_length = length;
|
||||
signed_length = streamfile->file_size - offset;
|
||||
if (signed_length < 0) signed_length = 0;
|
||||
length = signed_length;
|
||||
}
|
||||
return read_streamfile(dest, streamfile->start_physical_offset+offset, length,streamfile->real_file);
|
||||
}
|
||||
|
||||
static void close_aax(AAXSTREAMFILE *streamfile) {
|
||||
free(streamfile);
|
||||
return;
|
||||
}
|
||||
|
||||
static size_t get_size_aax(AAXSTREAMFILE *streamfile) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static size_t get_offset_aax(AAXSTREAMFILE *streamfile) {
|
||||
long offset = streamfile->real_file->get_offset(streamfile->real_file);
|
||||
offset -= streamfile->start_physical_offset;
|
||||
if (offset < 0) offset = 0;
|
||||
if (offset > streamfile->file_size) offset = streamfile->file_size;
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
static void get_name_aax(AAXSTREAMFILE *streamfile,char *buffer,size_t length) {
|
||||
strncpy(buffer,"ARBITRARY.ADX",length);
|
||||
buffer[length-1]='\0';
|
||||
}
|
||||
|
||||
static STREAMFILE *open_aax_impl(AAXSTREAMFILE *streamfile,const char * const filename,size_t buffersize) {
|
||||
AAXSTREAMFILE *newfile;
|
||||
if (strcmp(filename,"ARBITRARY.ADX"))
|
||||
return NULL;
|
||||
|
||||
newfile = malloc(sizeof(AAXSTREAMFILE));
|
||||
if (!newfile)
|
||||
return NULL;
|
||||
memcpy(newfile,streamfile,sizeof(AAXSTREAMFILE));
|
||||
return &newfile->sf;
|
||||
}
|
||||
|
||||
static STREAMFILE *open_aax_with_STREAMFILE(STREAMFILE *file,off_t start_offset,size_t file_size) {
|
||||
AAXSTREAMFILE *streamfile = malloc(sizeof(AAXSTREAMFILE));
|
||||
|
||||
if (!streamfile)
|
||||
return NULL;
|
||||
|
||||
/* success, set our pointers */
|
||||
|
||||
streamfile->sf.read = (void*)read_aax;
|
||||
streamfile->sf.get_size = (void*)get_size_aax;
|
||||
streamfile->sf.get_offset = (void*)get_offset_aax;
|
||||
streamfile->sf.get_name = (void*)get_name_aax;
|
||||
streamfile->sf.get_realname = (void*)get_name_aax;
|
||||
streamfile->sf.open = (void*)open_aax_impl;
|
||||
streamfile->sf.close = (void*)close_aax;
|
||||
|
||||
streamfile->real_file = file;
|
||||
streamfile->start_physical_offset = start_offset;
|
||||
streamfile->file_size = file_size;
|
||||
|
||||
return &streamfile->sf;
|
||||
}
|
||||
|
||||
#endif /* _AAX_STREAMFILE_H_ */
|
|
@ -0,0 +1,442 @@
|
|||
#ifndef _AAX_UTF_H_
|
||||
#define _AAX_UTF_H_
|
||||
|
||||
struct utf_query
|
||||
{
|
||||
/* if 0 */
|
||||
const char *name;
|
||||
int index;
|
||||
};
|
||||
|
||||
struct offset_size_pair
|
||||
{
|
||||
uint32_t offset;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
struct utf_query_result
|
||||
{
|
||||
int valid; /* table is valid */
|
||||
int found;
|
||||
int type; /* one of COLUMN_TYPE_* */
|
||||
union
|
||||
{
|
||||
uint64_t value_u64;
|
||||
uint32_t value_u32;
|
||||
uint16_t value_u16;
|
||||
uint8_t value_u8;
|
||||
float value_float;
|
||||
struct offset_size_pair value_data;
|
||||
uint32_t value_string;
|
||||
} value;
|
||||
|
||||
/* info for the queried table */
|
||||
uint32_t rows;
|
||||
uint32_t name_offset;
|
||||
uint32_t string_table_offset;
|
||||
uint32_t data_offset;
|
||||
};
|
||||
|
||||
|
||||
#define COLUMN_STORAGE_MASK 0xf0
|
||||
#define COLUMN_STORAGE_PERROW 0x50
|
||||
#define COLUMN_STORAGE_CONSTANT 0x30
|
||||
#define COLUMN_STORAGE_ZERO 0x10
|
||||
|
||||
#define COLUMN_TYPE_MASK 0x0f
|
||||
#define COLUMN_TYPE_DATA 0x0b
|
||||
#define COLUMN_TYPE_STRING 0x0a
|
||||
#define COLUMN_TYPE_FLOAT 0x08
|
||||
#define COLUMN_TYPE_8BYTE 0x06
|
||||
#define COLUMN_TYPE_4BYTE 0x04
|
||||
#define COLUMN_TYPE_2BYTE2 0x03
|
||||
#define COLUMN_TYPE_2BYTE 0x02
|
||||
#define COLUMN_TYPE_1BYTE2 0x01
|
||||
#define COLUMN_TYPE_1BYTE 0x00
|
||||
|
||||
struct utf_column_info
|
||||
{
|
||||
uint8_t type;
|
||||
const char *column_name;
|
||||
long constant_offset;
|
||||
};
|
||||
|
||||
struct utf_table_info
|
||||
{
|
||||
long table_offset;
|
||||
uint32_t table_size;
|
||||
uint32_t schema_offset;
|
||||
uint32_t rows_offset;
|
||||
uint32_t string_table_offset;
|
||||
uint32_t data_offset;
|
||||
const char *string_table;
|
||||
const char *table_name;
|
||||
uint16_t columns;
|
||||
uint16_t row_width;
|
||||
uint32_t rows;
|
||||
|
||||
const struct utf_column_info *schema;
|
||||
};
|
||||
|
||||
/* @UTF table reading, abridged */
|
||||
static struct utf_query_result analyze_utf(STREAMFILE *infile, const long offset, const struct utf_query *query)
|
||||
{
|
||||
unsigned char buf[4];
|
||||
struct utf_table_info table_info;
|
||||
char *string_table = NULL;
|
||||
struct utf_column_info * schema = NULL;
|
||||
struct utf_query_result result;
|
||||
uint32_t table_name_string;
|
||||
int string_table_size;
|
||||
|
||||
result.valid = 0;
|
||||
|
||||
table_info.table_offset = offset;
|
||||
|
||||
/* check header */
|
||||
{
|
||||
static const char UTF_signature[4] = "@UTF"; /* intentionally unterminated */
|
||||
if (4 != read_streamfile(buf, offset, 4, infile)) goto cleanup_error;
|
||||
if (memcmp(buf, UTF_signature, sizeof(UTF_signature)))
|
||||
{
|
||||
goto cleanup_error;
|
||||
}
|
||||
}
|
||||
|
||||
/* get table size */
|
||||
table_info.table_size = read_32bitBE(offset+4, infile);
|
||||
|
||||
table_info.schema_offset = 0x20;
|
||||
table_info.rows_offset = read_32bitBE(offset+8, infile);
|
||||
table_info.string_table_offset = read_32bitBE(offset+0xc,infile);
|
||||
table_info.data_offset = read_32bitBE(offset+0x10,infile);
|
||||
table_name_string = read_32bitBE(offset+0x14,infile);
|
||||
table_info.columns = read_16bitBE(offset+0x18,infile);
|
||||
table_info.row_width = read_16bitBE(offset+0x1a,infile);
|
||||
table_info.rows = read_32bitBE(offset+0x1c,infile);
|
||||
|
||||
/* allocate for string table */
|
||||
string_table_size = table_info.data_offset-table_info.string_table_offset;
|
||||
string_table = malloc(string_table_size+1);
|
||||
if (!string_table) goto cleanup_error;
|
||||
table_info.string_table = string_table;
|
||||
memset(string_table, 0, string_table_size+1);
|
||||
|
||||
/* load schema */
|
||||
schema = malloc(sizeof(struct utf_column_info) * table_info.columns);
|
||||
if (!schema) goto cleanup_error;
|
||||
|
||||
{
|
||||
int i;
|
||||
long schema_current_offset = table_info.schema_offset;
|
||||
for (i = 0; i < table_info.columns; i++)
|
||||
{
|
||||
schema[i].type = read_8bit(schema_current_offset,infile);
|
||||
schema_current_offset ++;
|
||||
schema[i].column_name = string_table + read_32bitBE(schema_current_offset,infile);
|
||||
schema_current_offset += 4;
|
||||
|
||||
if ((schema[i].type & COLUMN_STORAGE_MASK) == COLUMN_STORAGE_CONSTANT)
|
||||
{
|
||||
schema[i].constant_offset = schema_current_offset;
|
||||
switch (schema[i].type & COLUMN_TYPE_MASK)
|
||||
{
|
||||
case COLUMN_TYPE_8BYTE:
|
||||
case COLUMN_TYPE_DATA:
|
||||
schema_current_offset+=8;
|
||||
break;
|
||||
case COLUMN_TYPE_STRING:
|
||||
case COLUMN_TYPE_FLOAT:
|
||||
case COLUMN_TYPE_4BYTE:
|
||||
schema_current_offset+=4;
|
||||
break;
|
||||
case COLUMN_TYPE_2BYTE2:
|
||||
case COLUMN_TYPE_2BYTE:
|
||||
schema_current_offset+=2;
|
||||
break;
|
||||
case COLUMN_TYPE_1BYTE2:
|
||||
case COLUMN_TYPE_1BYTE:
|
||||
schema_current_offset++;
|
||||
break;
|
||||
default:
|
||||
goto cleanup_error;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table_info.schema = schema;
|
||||
|
||||
/* read string table */
|
||||
read_streamfile((unsigned char *)string_table,
|
||||
table_info.string_table_offset+8+offset,
|
||||
string_table_size, infile);
|
||||
table_info.table_name = table_info.string_table+table_name_string;
|
||||
|
||||
/* fill in the default stuff */
|
||||
result.found = 0;
|
||||
result.rows = table_info.rows;
|
||||
result.name_offset = table_name_string;
|
||||
result.string_table_offset = table_info.string_table_offset;
|
||||
result.data_offset = table_info.data_offset;
|
||||
|
||||
/* explore the values */
|
||||
if (query) {
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < table_info.rows; i++)
|
||||
{
|
||||
uint32_t row_offset =
|
||||
table_info.table_offset + 8 + table_info.rows_offset +
|
||||
i * table_info.row_width;
|
||||
const uint32_t row_start_offset = row_offset;
|
||||
|
||||
if (query && i != query->index) continue;
|
||||
|
||||
for (j = 0; j < table_info.columns; j++)
|
||||
{
|
||||
uint8_t type = table_info.schema[j].type;
|
||||
long constant_offset = table_info.schema[j].constant_offset;
|
||||
int constant = 0;
|
||||
|
||||
int qthis = (query && i == query->index &&
|
||||
!strcmp(table_info.schema[j].column_name, query->name));
|
||||
|
||||
if (qthis)
|
||||
{
|
||||
result.found = 1;
|
||||
result.type = schema[j].type & COLUMN_TYPE_MASK;
|
||||
}
|
||||
|
||||
switch (schema[j].type & COLUMN_STORAGE_MASK)
|
||||
{
|
||||
case COLUMN_STORAGE_PERROW:
|
||||
break;
|
||||
case COLUMN_STORAGE_CONSTANT:
|
||||
constant = 1;
|
||||
break;
|
||||
case COLUMN_STORAGE_ZERO:
|
||||
if (qthis)
|
||||
{
|
||||
memset(&result.value, 0,
|
||||
sizeof(result.value));
|
||||
}
|
||||
continue;
|
||||
default:
|
||||
goto cleanup_error;
|
||||
}
|
||||
|
||||
if (1)
|
||||
{
|
||||
long data_offset;
|
||||
int bytes_read;
|
||||
|
||||
if (constant)
|
||||
{
|
||||
data_offset = constant_offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
data_offset = row_offset;
|
||||
}
|
||||
|
||||
switch (type & COLUMN_TYPE_MASK)
|
||||
{
|
||||
case COLUMN_TYPE_STRING:
|
||||
{
|
||||
uint32_t string_offset;
|
||||
string_offset = read_32bitBE(data_offset, infile);
|
||||
bytes_read = 4;
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_string = string_offset;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case COLUMN_TYPE_DATA:
|
||||
{
|
||||
uint32_t vardata_offset, vardata_size;
|
||||
|
||||
vardata_offset = read_32bitBE(data_offset, infile);
|
||||
vardata_size = read_32bitBE(data_offset+4, infile);
|
||||
bytes_read = 8;
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_data.offset = vardata_offset;
|
||||
result.value.value_data.size = vardata_size;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case COLUMN_TYPE_8BYTE:
|
||||
{
|
||||
uint64_t value =
|
||||
read_32bitBE(data_offset, infile);
|
||||
value <<= 32;
|
||||
value |=
|
||||
read_32bitBE(data_offset+4, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_u64 = value;
|
||||
}
|
||||
bytes_read = 8;
|
||||
break;
|
||||
}
|
||||
case COLUMN_TYPE_4BYTE:
|
||||
{
|
||||
uint32_t value =
|
||||
read_32bitBE(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_u32 = value;
|
||||
}
|
||||
bytes_read = 4;
|
||||
}
|
||||
break;
|
||||
case COLUMN_TYPE_2BYTE2:
|
||||
case COLUMN_TYPE_2BYTE:
|
||||
{
|
||||
uint16_t value =
|
||||
read_16bitBE(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_u16 = value;
|
||||
}
|
||||
bytes_read = 2;
|
||||
}
|
||||
break;
|
||||
case COLUMN_TYPE_FLOAT:
|
||||
if (sizeof(float) == 4)
|
||||
{
|
||||
union {
|
||||
float float_value;
|
||||
uint32_t int_value;
|
||||
} int_float;
|
||||
|
||||
int_float.int_value = read_32bitBE(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_float = int_float.float_value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
read_32bitBE(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
goto cleanup_error;
|
||||
}
|
||||
}
|
||||
bytes_read = 4;
|
||||
break;
|
||||
case COLUMN_TYPE_1BYTE2:
|
||||
case COLUMN_TYPE_1BYTE:
|
||||
{
|
||||
uint8_t value =
|
||||
read_8bit(data_offset, infile);
|
||||
if (qthis)
|
||||
{
|
||||
result.value.value_u8 = value;
|
||||
}
|
||||
bytes_read = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto cleanup_error;
|
||||
}
|
||||
|
||||
if (!constant)
|
||||
{
|
||||
row_offset += bytes_read;
|
||||
}
|
||||
} /* useless if end */
|
||||
} /* column for loop end */
|
||||
|
||||
if (row_offset - row_start_offset != table_info.row_width)
|
||||
goto cleanup_error;
|
||||
|
||||
if (query && i >= query->index) break;
|
||||
} /* row for loop end */
|
||||
} /* explore values block end */
|
||||
|
||||
//cleanup:
|
||||
|
||||
result.valid = 1;
|
||||
cleanup_error:
|
||||
|
||||
if (string_table)
|
||||
{
|
||||
free(string_table);
|
||||
string_table = NULL;
|
||||
}
|
||||
|
||||
if (schema)
|
||||
{
|
||||
free(schema);
|
||||
schema = NULL;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static struct utf_query_result query_utf(STREAMFILE *infile, const long offset, const struct utf_query *query)
|
||||
{
|
||||
return analyze_utf(infile, offset, query);
|
||||
}
|
||||
|
||||
/*static*/ struct utf_query_result query_utf_nofail(STREAMFILE *infile, const long offset, const struct utf_query *query, int *error)
|
||||
{
|
||||
const struct utf_query_result result = query_utf(infile, offset, query);
|
||||
|
||||
if (error)
|
||||
{
|
||||
*error = 0;
|
||||
if (!result.valid) *error = 1;
|
||||
if (query && !result.found) *error = 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static struct utf_query_result query_utf_key(STREAMFILE *infile, const long offset, int index, const char *name, int *error)
|
||||
{
|
||||
struct utf_query query;
|
||||
query.index = index;
|
||||
query.name = name;
|
||||
|
||||
return query_utf_nofail(infile, offset, &query, error);
|
||||
}
|
||||
|
||||
/*static*/ uint8_t query_utf_1byte(STREAMFILE *infile, const long offset, int index, const char *name, int *error)
|
||||
{
|
||||
struct utf_query_result result = query_utf_key(infile, offset, index, name, error);
|
||||
if (error)
|
||||
{
|
||||
if (result.type != COLUMN_TYPE_1BYTE) *error = 1;
|
||||
}
|
||||
return result.value.value_u8;
|
||||
}
|
||||
|
||||
/*static*/ uint32_t query_utf_4byte(STREAMFILE *infile, const long offset, int index, const char *name, int *error)
|
||||
{
|
||||
struct utf_query_result result = query_utf_key(infile, offset, index, name, error);
|
||||
if (error)
|
||||
{
|
||||
if (result.type != COLUMN_TYPE_4BYTE) *error = 1;
|
||||
}
|
||||
return result.value.value_u32;
|
||||
}
|
||||
|
||||
/*static*/ struct offset_size_pair query_utf_data(STREAMFILE *infile, const long offset,
|
||||
int index, const char *name, int *error)
|
||||
{
|
||||
struct utf_query_result result = query_utf_key(infile, offset, index, name, error);
|
||||
if (error)
|
||||
{
|
||||
if (result.type != COLUMN_TYPE_DATA) *error = 1;
|
||||
}
|
||||
return result.value.value_data;
|
||||
}
|
||||
|
||||
|
||||
#endif /* SRC_META_AAX_UTF_H_ */
|
|
@ -1,66 +1,49 @@
|
|||
#include "../vgmstream.h"
|
||||
#include "meta.h"
|
||||
#include "../util.h"
|
||||
#include "../coding/coding.h"
|
||||
#include "../coding/acm_decoder.h"
|
||||
|
||||
/* InterPlay ACM */
|
||||
/* The real work is done by libacm */
|
||||
/* ACM - InterPlay infinity engine games [Planescape: Torment (PC), Baldur's Gate (PC)] */
|
||||
VGMSTREAM * init_vgmstream_acm(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
ACMStream *acm_stream = NULL;
|
||||
mus_acm_codec_data *data;
|
||||
int loop_flag = 0, channel_count, sample_rate, num_samples;
|
||||
acm_codec_data *data = NULL;
|
||||
|
||||
char filename[PATH_LIMIT];
|
||||
|
||||
int loop_flag = 0;
|
||||
int channel_count;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("acm",filename_extension(filename))) goto fail;
|
||||
|
||||
/* check header */
|
||||
if (read_32bitBE(0x0,streamFile) != 0x97280301)
|
||||
goto fail;
|
||||
|
||||
data = calloc(1,sizeof(mus_acm_codec_data));
|
||||
if (!data) goto fail;
|
||||
|
||||
data->files = calloc(1,sizeof(ACMStream *));
|
||||
if (!data->files) {
|
||||
free(data); data = NULL;
|
||||
/* checks */
|
||||
if (!check_extensions(streamFile, "acm"))
|
||||
goto fail;
|
||||
if (read_32bitBE(0x0,streamFile) != 0x97280301) /* header id */
|
||||
goto fail;
|
||||
|
||||
|
||||
/* init decoder */
|
||||
{
|
||||
data = init_acm(streamFile);
|
||||
if (!data) goto fail;
|
||||
|
||||
channel_count = data->file->info.channels;
|
||||
sample_rate = data->file->info.rate;
|
||||
num_samples = data->file->total_values / data->file->info.channels;
|
||||
}
|
||||
|
||||
/* gonna do this a little backwards, open and parse the file
|
||||
before creating the vgmstream */
|
||||
|
||||
if (acm_open_decoder(&acm_stream,streamFile,filename) != ACM_OK) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
channel_count = acm_stream->info.channels;
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = acm_stream->info.rate;
|
||||
vgmstream->coding_type = coding_ACM;
|
||||
vgmstream->num_samples = acm_stream->total_values / acm_stream->info.channels;
|
||||
vgmstream->layout_type = layout_acm;
|
||||
vgmstream->meta_type = meta_ACM;
|
||||
vgmstream->sample_rate = sample_rate;
|
||||
vgmstream->num_samples = num_samples;
|
||||
|
||||
data->file_count = 1;
|
||||
data->current_file = 0;
|
||||
data->files[0] = acm_stream;
|
||||
/*data->end_file = -1;*/
|
||||
vgmstream->meta_type = meta_ACM;
|
||||
vgmstream->coding_type = coding_ACM;
|
||||
vgmstream->layout_type = layout_none;
|
||||
|
||||
vgmstream->codec_data = data;
|
||||
|
||||
return vgmstream;
|
||||
|
||||
/* clean up anything we may have opened */
|
||||
fail:
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
free_acm(data);
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -28,8 +28,10 @@ VGMSTREAM * init_vgmstream_adx(STREAMFILE *streamFile) {
|
|||
uint16_t xor_start=0,xor_mult=0,xor_add=0;
|
||||
|
||||
|
||||
/* check extension, case insensitive */
|
||||
if (!check_extensions(streamFile,"adx")) goto fail;
|
||||
/* checks*/
|
||||
/* .adx: standard, .adp: Headhunter (DC) */
|
||||
if (!check_extensions(streamFile,"adx,adp"))
|
||||
goto fail;
|
||||
|
||||
/* check first 2 bytes */
|
||||
if ((uint16_t)read_16bitBE(0x00,streamFile)!=0x8000) goto fail;
|
||||
|
|
|
@ -26,7 +26,7 @@ static const adxkey_info adxkey8_list[] = {
|
|||
{0x49e1,0x4a57,0x553d, "karaage",0},
|
||||
|
||||
/* Grasshopper Manufacture 0 (Blood+) */
|
||||
{0x5f5d,0x58bd,0x55ed, NULL,0}, // estimated
|
||||
{0x5f5d,0x58bd,0x55ed, NULL,0}, // estimated (keystring not in ELF?)
|
||||
|
||||
/* Grasshopper Manufacture 1 (Killer7) */
|
||||
{0x50fb,0x5803,0x5701, "GHM",0},
|
||||
|
@ -132,7 +132,7 @@ static const adxkey_info adxkey8_list[] = {
|
|||
{0x6731,0x645d,0x566b, NULL,0}, // confirmed unique with guessadx
|
||||
|
||||
/* Shakugan no Shana (2006)(Vridge)(Media Works)[PS2] */
|
||||
{0x5fc5,0x63d9,0x599f, NULL,0}, // confirmed unique with guessadx
|
||||
{0x5fc5,0x63d9,0x599f, "FUZETSU",0},
|
||||
|
||||
/* Uragiri wa Boku no Namae o Shitteiru (2010)(Kadokawa Shoten)[PS2] */
|
||||
{0x4c73,0x4d8d,0x5827, NULL,0}, // confirmed unique with guessadx
|
||||
|
@ -207,6 +207,9 @@ static const adxkey_info adxkey9_list[] = {
|
|||
// Super Robot Wars X-Omega (voices) [iOS/Android]
|
||||
{0x5152,0x7979,0x152b, NULL,165521992944278}, // 0000968A97978A96
|
||||
|
||||
// AKA to BLUE (Android)
|
||||
{0x03fc,0x0749,0x12EF, NULL,0}, // guessed with VGAudio (possible key: 1FE0748978 / 136909719928)
|
||||
//{0x0c03,0x0749,0x1459, NULL,0}, // 2nd guess (possible key: 6018748A2D / 412727151149)
|
||||
};
|
||||
|
||||
static const int adxkey8_list_count = sizeof(adxkey8_list) / sizeof(adxkey8_list[0]);
|
||||
|
|
|
@ -148,7 +148,6 @@ static STREAMFILE *open_aix_impl(AIXSTREAMFILE *streamfile,const char * const fi
|
|||
streamfile->sf.get_size = (void*)get_size_aix;
|
||||
streamfile->sf.get_offset = (void*)get_offset_aix;
|
||||
streamfile->sf.get_name = (void*)get_name_aix;
|
||||
streamfile->sf.get_realname = (void*)get_name_aix;
|
||||
streamfile->sf.open = (void*)open_aix_impl;
|
||||
streamfile->sf.close = (void*)close_aix;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#if defined(VGM_USE_MP4V2) && defined(VGM_USE_FDKAAC)
|
||||
/* AKB (AAC only) - found in SQEX iOS games */
|
||||
VGMSTREAM * init_vgmstream_akb(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * init_vgmstream_akb_mp4(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
|
||||
size_t filesize;
|
||||
|
@ -34,74 +34,99 @@ fail:
|
|||
|
||||
|
||||
/* AKB - found in SQEX iOS games */
|
||||
VGMSTREAM * init_vgmstream_akb_multi(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * init_vgmstream_akb(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset, extra_data_offset = 0;
|
||||
size_t file_size, header_size, extra_header_size = 0, extra_data_size = 0;
|
||||
int loop_flag = 0, channel_count, codec;
|
||||
off_t start_offset, extradata_offset = 0;
|
||||
size_t stream_size, header_size, subheader_size = 0, extradata_size = 0;
|
||||
int loop_flag = 0, channel_count, codec, sample_rate;
|
||||
int num_samples, loop_start, loop_end;
|
||||
|
||||
/* check extensions */
|
||||
|
||||
/* checks */
|
||||
/* .akb.bytes is the usual extension in later games */
|
||||
if ( !check_extensions(streamFile, "akb") )
|
||||
if ( !check_extensions(streamFile, "akb,bytes") )
|
||||
goto fail;
|
||||
|
||||
/* check header */
|
||||
if (read_32bitBE(0x00,streamFile) != 0x414B4220) /* "AKB " */
|
||||
goto fail;
|
||||
if (read_32bitLE(0x08,streamFile) != get_streamfile_size(streamFile))
|
||||
goto fail;
|
||||
|
||||
channel_count = read_8bit(0x0d,streamFile);
|
||||
loop_flag = read_32bitLE(0x18,streamFile) > 0; /* loop end */
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
/* 0x04 (2): version (iPad/IPhone?) */
|
||||
/* 0x04(2): version? (iPad/IPhone?) */
|
||||
header_size = read_16bitLE(0x06,streamFile);
|
||||
file_size = read_32bitLE(0x08,streamFile);
|
||||
codec = read_8bit(0x0c,streamFile);
|
||||
vgmstream->sample_rate = (uint16_t)read_16bitLE(0x0e,streamFile);
|
||||
vgmstream->num_samples = read_32bitLE(0x10,streamFile);
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x14,streamFile);
|
||||
vgmstream->loop_end_sample = read_32bitLE(0x18,streamFile);
|
||||
vgmstream->meta_type = meta_AKB;
|
||||
|
||||
/* should be ok but not exact (probably more complex, see AKB2) */
|
||||
if ( header_size >= 0x44) { /* v2 */
|
||||
/* 0x10+: config? (pan, volume), 0x24: file_id? */
|
||||
extra_data_size = read_16bitLE(0x1c,streamFile);
|
||||
extra_header_size = read_16bitLE(0x28,streamFile);
|
||||
extra_data_offset = header_size + extra_header_size;
|
||||
start_offset = extra_data_offset + extra_data_size;
|
||||
/* ~num_samples at extra_data_offset + 0x04/0x0c? */
|
||||
codec = read_8bit(0x0c,streamFile);
|
||||
channel_count = read_8bit(0x0d,streamFile);
|
||||
sample_rate = (uint16_t)read_16bitLE(0x0e,streamFile);
|
||||
num_samples = read_32bitLE(0x10,streamFile);
|
||||
loop_start = read_32bitLE(0x14,streamFile);
|
||||
loop_end = read_32bitLE(0x18,streamFile);
|
||||
|
||||
/* possibly more complex, see AKB2 */
|
||||
if (header_size >= 0x44) { /* v2 */
|
||||
extradata_size = read_16bitLE(0x1c,streamFile);
|
||||
subheader_size = read_16bitLE(0x28,streamFile);
|
||||
/* 0x20+: config? (pan, volume), 0x24: file_id? */
|
||||
extradata_offset = header_size + subheader_size;
|
||||
start_offset = extradata_offset + extradata_size;
|
||||
}
|
||||
else { /* v0 */
|
||||
start_offset = header_size;
|
||||
}
|
||||
|
||||
stream_size = get_streamfile_size(streamFile) - start_offset;
|
||||
loop_flag = read_32bitLE(0x18,streamFile) > 0; /* loop end */
|
||||
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->sample_rate = sample_rate;
|
||||
vgmstream->meta_type = meta_AKB;
|
||||
|
||||
|
||||
switch (codec) {
|
||||
case 0x02: { /* MSAPDCM [various SFX] */
|
||||
case 0x02: { /* MSAPDCM [Dragon Quest II (iOS) sfx] */
|
||||
vgmstream->coding_type = coding_MSADPCM;
|
||||
vgmstream->layout_type = layout_none;
|
||||
vgmstream->interleave_block_size = read_16bitLE(extra_data_offset + 0x02,streamFile);
|
||||
vgmstream->interleave_block_size = read_16bitLE(extradata_offset + 0x02,streamFile);
|
||||
|
||||
/* adjusted samples; bigger or smaller than base samples, but seems more accurate
|
||||
* (base samples may have more than possible and read over file size otherwise, very strange)
|
||||
* loop_end seems to exist even with loop disabled */
|
||||
vgmstream->num_samples = read_32bitLE(extra_data_offset + 0x04, streamFile);
|
||||
vgmstream->loop_start_sample = read_32bitLE(extra_data_offset + 0x08, streamFile);
|
||||
vgmstream->loop_end_sample = read_32bitLE(extra_data_offset + 0x0c, streamFile);
|
||||
vgmstream->num_samples = read_32bitLE(extradata_offset + 0x04, streamFile);
|
||||
vgmstream->loop_start_sample = read_32bitLE(extradata_offset + 0x08, streamFile);
|
||||
vgmstream->loop_end_sample = read_32bitLE(extradata_offset + 0x0c, streamFile);
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef VGM_USE_FFMPEG
|
||||
case 0x05: { /* Ogg Vorbis [Final Fantasy VI, Dragon Quest II-VI] */
|
||||
/* Starting from an offset in the current libvorbis code is a bit hard so just use FFmpeg.
|
||||
* Decoding seems to produce the same output with (inaudible) +-1 lower byte differences due to rounding. */
|
||||
#ifdef VGM_USE_VORBIS
|
||||
case 0x05: { /* Ogg Vorbis [Final Fantasy VI (iOS), Dragon Quest II-VI (iOS)] */
|
||||
VGMSTREAM *ogg_vgmstream = NULL;
|
||||
ogg_vorbis_meta_info_t ovmi = {0};
|
||||
|
||||
ovmi.meta_type = vgmstream->meta_type;
|
||||
ovmi.stream_size = stream_size;
|
||||
|
||||
ogg_vgmstream = init_vgmstream_ogg_vorbis_callbacks(streamFile, NULL, start_offset, &ovmi);
|
||||
if (ogg_vgmstream) {
|
||||
close_vgmstream(vgmstream);
|
||||
return ogg_vgmstream;
|
||||
}
|
||||
else {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
#elif defined(VGM_USE_FFMPEG)
|
||||
/* Alt decoding without libvorbis (minor number of beginning samples difference).
|
||||
* Otherwise same output with (inaudible) +-1 lower byte differences due to rounding. */
|
||||
case 0x05: { /* Ogg Vorbis [Final Fantasy VI (iOS), Dragon Quest II-VI (iOS)] */
|
||||
ffmpeg_codec_data *ffmpeg_data;
|
||||
|
||||
ffmpeg_data = init_ffmpeg_offset(streamFile, start_offset,file_size-start_offset);
|
||||
ffmpeg_data = init_ffmpeg_offset(streamFile, start_offset,stream_size);
|
||||
if ( !ffmpeg_data ) goto fail;
|
||||
|
||||
vgmstream->codec_data = ffmpeg_data;
|
||||
|
@ -109,20 +134,30 @@ VGMSTREAM * init_vgmstream_akb_multi(STREAMFILE *streamFile) {
|
|||
vgmstream->layout_type = layout_none;
|
||||
/* These oggs have loop info in the comments, too */
|
||||
|
||||
vgmstream->num_samples = num_samples;
|
||||
vgmstream->loop_start_sample = loop_start;
|
||||
vgmstream->loop_end_sample = loop_end;
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VGM_USE_FFMPEG
|
||||
case 0x06: { /* aac [The World Ends with You (iPad)] */
|
||||
/* init_vgmstream_akb above has priority, but this works fine too */
|
||||
/* init_vgmstream_akb_mp4 above has priority, but this works fine too */
|
||||
ffmpeg_codec_data *ffmpeg_data;
|
||||
|
||||
ffmpeg_data = init_ffmpeg_offset(streamFile, start_offset,file_size-start_offset);
|
||||
ffmpeg_data = init_ffmpeg_offset(streamFile, start_offset,stream_size-start_offset);
|
||||
if ( !ffmpeg_data ) goto fail;
|
||||
|
||||
vgmstream->codec_data = ffmpeg_data;
|
||||
vgmstream->coding_type = coding_FFmpeg;
|
||||
vgmstream->layout_type = layout_none;
|
||||
|
||||
vgmstream->num_samples = num_samples;
|
||||
vgmstream->loop_start_sample = loop_start;
|
||||
vgmstream->loop_end_sample = loop_end;
|
||||
|
||||
/* remove encoder delay from the "global" sample values */
|
||||
vgmstream->num_samples -= ffmpeg_data->skipSamples;
|
||||
vgmstream->loop_start_sample -= ffmpeg_data->skipSamples;
|
||||
|
@ -149,80 +184,134 @@ fail:
|
|||
|
||||
|
||||
/* AKB2 - found in later SQEX iOS games */
|
||||
VGMSTREAM * init_vgmstream_akb2_multi(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * init_vgmstream_akb2(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset, header_offset;
|
||||
size_t datasize;
|
||||
int loop_flag = 0, channel_count, codec;
|
||||
int akb_header_size, sound_index = 0, sound_offset_data, sound, sound_header_size, material_offset_data, material_index = 0, material, extradata, encryption_flag;
|
||||
off_t start_offset, material_offset, extradata_offset;
|
||||
size_t material_size, extradata_size, stream_size;
|
||||
int loop_flag = 0, channel_count, encryption_flag, codec, sample_rate, num_samples, loop_start, loop_end;
|
||||
int total_subsongs, target_subsong = streamFile->stream_index;
|
||||
|
||||
/* check extensions */
|
||||
/* .akb.bytes is the usual extension in later games */
|
||||
if ( !check_extensions(streamFile, "akb") )
|
||||
if ( !check_extensions(streamFile, "akb,bytes") )
|
||||
goto fail;
|
||||
|
||||
/* check header */
|
||||
/* checks */
|
||||
if (read_32bitBE(0x00,streamFile) != 0x414B4232) /* "AKB2" */
|
||||
goto fail;
|
||||
if (read_32bitLE(0x08,streamFile) != get_streamfile_size(streamFile))
|
||||
goto fail;
|
||||
|
||||
akb_header_size = read_16bitLE(0x06, streamFile);
|
||||
sound_offset_data = akb_header_size + sound_index * 0x10;
|
||||
sound = read_32bitLE(sound_offset_data + 0x04, streamFile);
|
||||
sound_header_size = read_16bitLE(sound + 0x02, streamFile);
|
||||
material_offset_data = sound + sound_header_size + material_index * 0x10;
|
||||
material = sound + read_32bitLE(material_offset_data + 0x04, streamFile);
|
||||
encryption_flag = read_8bit(material + 0x03, streamFile) & 0x08;
|
||||
extradata = material + read_16bitLE(material + 0x04, streamFile);
|
||||
/* parse tables */
|
||||
{
|
||||
off_t table_offset;
|
||||
size_t table_size, entry_size;
|
||||
off_t akb_header_size = read_16bitLE(0x06, streamFile);
|
||||
int table_count = read_8bit(0x0c, streamFile);
|
||||
|
||||
start_offset = material + read_16bitLE(material + 0x04, streamFile) + read_32bitLE(material + 0x18, streamFile);
|
||||
header_offset = material;
|
||||
/* probably each table has its type somewhere, but only seen last table = sound table */
|
||||
if (table_count > 2) /* 2 only seen in some Mobius FF sound banks */
|
||||
goto fail;
|
||||
entry_size = 0x10; /* technically every entry/table has its own size but to simplify... */
|
||||
|
||||
table_offset = read_32bitLE(akb_header_size + (table_count-1)*entry_size + 0x04, streamFile);
|
||||
table_size = read_16bitLE(table_offset + 0x02, streamFile);
|
||||
|
||||
total_subsongs = read_8bit(table_offset + 0x0f, streamFile); /* can contain 0 entries too */
|
||||
if (target_subsong == 0) target_subsong = 1;
|
||||
if (target_subsong < 0 || target_subsong > total_subsongs || total_subsongs < 1) goto fail;
|
||||
|
||||
material_offset = table_offset + read_32bitLE(table_offset + table_size + (target_subsong-1)*entry_size + 0x04, streamFile);
|
||||
}
|
||||
|
||||
/** stream header **/
|
||||
/* 0x00: 0? */
|
||||
codec = read_8bit(material_offset+0x01,streamFile);
|
||||
channel_count = read_8bit(material_offset+0x02,streamFile);
|
||||
encryption_flag = read_8bit(material_offset+0x03,streamFile);
|
||||
material_size = read_16bitLE(material_offset+0x04,streamFile);
|
||||
sample_rate = (uint16_t)read_16bitLE(material_offset+0x06,streamFile);
|
||||
stream_size = read_32bitLE(material_offset+0x08,streamFile);
|
||||
num_samples = read_32bitLE(material_offset+0x0c,streamFile);
|
||||
|
||||
loop_start = read_32bitLE(material_offset+0x10,streamFile);
|
||||
loop_end = read_32bitLE(material_offset+0x14,streamFile);
|
||||
extradata_size = read_32bitLE(material_offset+0x18,streamFile);
|
||||
/* rest: ? (empty or 0x3f80) */
|
||||
|
||||
loop_flag = (loop_end > 0);
|
||||
extradata_offset = material_offset + material_size;
|
||||
start_offset = material_offset + material_size + extradata_size;
|
||||
|
||||
channel_count = read_8bit(header_offset+0x02,streamFile);
|
||||
loop_flag = read_32bitLE(header_offset+0x14,streamFile) > 0; /* loop end */
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
/* 0x04: version? 0x08: filesize, 0x28: file_id?, others: no idea */
|
||||
codec = read_8bit(header_offset+0x01,streamFile);
|
||||
datasize = read_32bitLE(header_offset+0x08,streamFile);
|
||||
vgmstream->sample_rate = (uint16_t)read_16bitLE(header_offset+0x06,streamFile);
|
||||
/* When loop_flag num_samples may be much larger than real num_samples (it's fine when looping is off)
|
||||
* Actual num_samples would be loop_end_sample+1, but more testing is needed */
|
||||
vgmstream->num_samples = read_32bitLE(header_offset+0x0c,streamFile);
|
||||
vgmstream->loop_start_sample = read_32bitLE(header_offset+0x10,streamFile);
|
||||
vgmstream->loop_end_sample = read_32bitLE(header_offset+0x14,streamFile);
|
||||
vgmstream->sample_rate = sample_rate;
|
||||
vgmstream->num_streams = total_subsongs;
|
||||
vgmstream->stream_size = stream_size;
|
||||
|
||||
vgmstream->meta_type = meta_AKB;
|
||||
|
||||
switch (codec) {
|
||||
case 0x02: { /* MSAPDCM [The Irregular at Magic High School Lost Zero (Android)] */
|
||||
if (encryption_flag) goto fail;
|
||||
case 0x02: { /* MSADPCM [The Irregular at Magic High School Lost Zero (Android)] */
|
||||
if (encryption_flag & 0x08) goto fail;
|
||||
vgmstream->coding_type = coding_MSADPCM;
|
||||
vgmstream->layout_type = layout_none;
|
||||
vgmstream->interleave_block_size = read_16bitLE(extradata + 0x02, streamFile);
|
||||
vgmstream->interleave_block_size = read_16bitLE(extradata_offset + 0x02, streamFile);
|
||||
|
||||
/* adjusted samples; bigger or smaller than base samples, but seems more accurate
|
||||
* (base samples may have more than possible and read over file size otherwise, very strange)
|
||||
* loop_end seems to exist even with loop disabled */
|
||||
vgmstream->num_samples = read_32bitLE(extradata + 0x04, streamFile);
|
||||
vgmstream->loop_start_sample = read_32bitLE(extradata + 0x08, streamFile);
|
||||
vgmstream->loop_end_sample = read_32bitLE(extradata + 0x0c, streamFile);
|
||||
vgmstream->num_samples = read_32bitLE(extradata_offset + 0x04, streamFile);
|
||||
vgmstream->loop_start_sample = read_32bitLE(extradata_offset + 0x08, streamFile);
|
||||
vgmstream->loop_end_sample = read_32bitLE(extradata_offset + 0x0c, streamFile);
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef VGM_USE_FFMPEG
|
||||
case 0x05: { /* ogg vorbis [The World Ends with You (iPhone / latest update)] */
|
||||
#ifdef VGM_USE_VORBIS
|
||||
case 0x05: { /* Ogg Vorbis [The World Ends with You (iOS / latest update)] */
|
||||
VGMSTREAM *ogg_vgmstream = NULL;
|
||||
ogg_vorbis_meta_info_t ovmi = {0};
|
||||
|
||||
ovmi.meta_type = vgmstream->meta_type;
|
||||
ovmi.total_subsongs = total_subsongs;
|
||||
ovmi.stream_size = stream_size;
|
||||
|
||||
ogg_vgmstream = init_vgmstream_ogg_vorbis_callbacks(streamFile, NULL, start_offset, &ovmi);
|
||||
if (ogg_vgmstream) {
|
||||
ogg_vgmstream->num_streams = vgmstream->num_streams;
|
||||
ogg_vgmstream->stream_size = vgmstream->stream_size;
|
||||
|
||||
close_vgmstream(vgmstream);
|
||||
return ogg_vgmstream;
|
||||
}
|
||||
else {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
#elif defined(VGM_USE_FFMPEG)
|
||||
/* Alt decoding without libvorbis (minor number of beginning samples difference).
|
||||
* Otherwise same output with (inaudible) +-1 lower byte differences due to rounding. */
|
||||
case 0x05: { /* Ogg Vorbis [The World Ends with You (iOS / latest update)] */
|
||||
ffmpeg_codec_data *ffmpeg_data;
|
||||
|
||||
ffmpeg_data = init_ffmpeg_offset(streamFile, start_offset,datasize);
|
||||
ffmpeg_data = init_ffmpeg_offset(streamFile, start_offset,stream_size);
|
||||
if ( !ffmpeg_data ) goto fail;
|
||||
|
||||
vgmstream->codec_data = ffmpeg_data;
|
||||
vgmstream->coding_type = coding_FFmpeg;
|
||||
vgmstream->layout_type = layout_none;
|
||||
|
||||
/* When loop_flag num_samples may be much larger than real num_samples (it's fine when looping is off)
|
||||
* Actual num_samples would be loop_end_sample+1, but more testing is needed */
|
||||
vgmstream->num_samples = num_samples;
|
||||
vgmstream->loop_start_sample = loop_start;
|
||||
vgmstream->loop_end_sample = loop_end;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,170 +1,160 @@
|
|||
#include "meta.h"
|
||||
#include "../util.h"
|
||||
|
||||
/* Apple Core Audio Format */
|
||||
#include "../coding/coding.h"
|
||||
|
||||
/* Apple Core Audio Format File - from iOS games [Vectros (iOS), Ridge Racer Accelerated (iOS)] */
|
||||
VGMSTREAM * init_vgmstream_apple_caff(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[PATH_LIMIT];
|
||||
off_t start_offset = 0, chunk_offset;
|
||||
size_t file_size, data_size = 0;
|
||||
int loop_flag, channel_count = 0, sample_rate = 0;
|
||||
|
||||
off_t start_offset = 0;
|
||||
off_t data_size = 0;
|
||||
off_t sample_count = 0;
|
||||
off_t interleave = 0;
|
||||
int sample_rate = -1, unused_frames = 0;
|
||||
int channel_count = 0;
|
||||
|
||||
off_t file_length;
|
||||
off_t chunk_offset = 8;
|
||||
int found_desc = 0, found_pakt = 0, found_data = 0;
|
||||
int found_desc = 0 /*, found_pakt = 0*/, found_data = 0;
|
||||
uint32_t codec = 0 /*, codec_flags = 0*/;
|
||||
uint32_t bytes_per_packet = 0, samples_per_packet = 0, channels_per_packet = 0, bits_per_sample = 0;
|
||||
int valid_samples = 0 /*, priming_samples = 0, unused_samples = 0*/;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("caf",filename_extension(filename))) goto fail;
|
||||
|
||||
/* check "caff" id */
|
||||
if (read_32bitBE(0,streamFile)!=0x63616666) goto fail;
|
||||
/* check version, flags */
|
||||
if (read_32bitBE(4,streamFile)!=0x00010000) goto fail;
|
||||
/* checks */
|
||||
if (!check_extensions(streamFile, "caf"))
|
||||
goto fail;
|
||||
|
||||
file_length = (off_t)get_streamfile_size(streamFile);
|
||||
if (read_32bitBE(0x00,streamFile) != 0x63616666) /* "caff" */
|
||||
goto fail;
|
||||
if (read_32bitBE(0x04,streamFile) != 0x00010000) /* version/flags */
|
||||
goto fail;
|
||||
|
||||
while (chunk_offset < file_length)
|
||||
{
|
||||
/* high half of size (expect 0s) */
|
||||
if (read_32bitBE(chunk_offset+4,streamFile) != 0) goto fail;
|
||||
file_size = get_streamfile_size(streamFile);
|
||||
chunk_offset = 0x08;
|
||||
|
||||
/* handle chunk type */
|
||||
switch (read_32bitBE(chunk_offset,streamFile))
|
||||
{
|
||||
case 0x64657363: /* desc */
|
||||
while (chunk_offset < file_size) {
|
||||
uint32_t chunk_type = read_32bitBE(chunk_offset+0x00,streamFile);
|
||||
uint32_t chunk_size = (uint32_t)read_64bitBE(chunk_offset+0x04,streamFile);
|
||||
chunk_offset += 0x0c;
|
||||
|
||||
switch (chunk_type) {
|
||||
|
||||
case 0x64657363: /* "desc" */
|
||||
found_desc = 1;
|
||||
{
|
||||
/* rather than put a convoluted conversion here for
|
||||
portability, just look it up */
|
||||
uint32_t sratefloat = read_32bitBE(chunk_offset+0x0c, streamFile);
|
||||
if (read_32bitBE(chunk_offset+0x10, streamFile) != 0) goto fail;
|
||||
switch (sratefloat)
|
||||
{
|
||||
case 0x40D19400:
|
||||
sample_rate = 18000;
|
||||
break;
|
||||
case 0x40D58880:
|
||||
sample_rate = 22050;
|
||||
break;
|
||||
case 0x40DF4000:
|
||||
sample_rate = 32000;
|
||||
break;
|
||||
case 0x40E58880:
|
||||
sample_rate = 44100;
|
||||
break;
|
||||
case 0x40E77000:
|
||||
sample_rate = 48000;
|
||||
break;
|
||||
default:
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
uint32_t bytes_per_packet, frames_per_packet, channels_per_frame, bits_per_channel;
|
||||
uint32_t codec_4cc = read_32bitBE(chunk_offset+0x14, streamFile);
|
||||
/* only supporting ima4 for now */
|
||||
if (codec_4cc != 0x696d6134) goto fail;
|
||||
uint64_t sample_long = (uint64_t)read_64bitBE(chunk_offset+0x00, streamFile);
|
||||
double* sample_double; /* double sample rate, double the fun */
|
||||
|
||||
/* format flags */
|
||||
if (read_32bitBE(chunk_offset+0x18, streamFile) != 0) goto fail;
|
||||
bytes_per_packet = read_32bitBE(chunk_offset+0x1c, streamFile);
|
||||
frames_per_packet = read_32bitBE(chunk_offset+0x20, streamFile);
|
||||
channels_per_frame = read_32bitBE(chunk_offset+0x24, streamFile);
|
||||
bits_per_channel = read_32bitBE(chunk_offset+0x28, streamFile);
|
||||
|
||||
interleave = bytes_per_packet / channels_per_frame;
|
||||
channel_count = channels_per_frame;
|
||||
if (channels_per_frame != 1 && channels_per_frame != 2)
|
||||
goto fail;
|
||||
/* ima4-specific */
|
||||
if (frames_per_packet != 64) goto fail;
|
||||
if ((frames_per_packet / 2 + 2) * channels_per_frame !=
|
||||
bytes_per_packet) goto fail;
|
||||
if (bits_per_channel != 0) goto fail;
|
||||
sample_double = (double*)&sample_long;
|
||||
sample_rate = (int)(*sample_double);
|
||||
}
|
||||
|
||||
codec = read_32bitBE(chunk_offset+0x08, streamFile);
|
||||
//codec_flags = read_32bitBE(chunk_offset+0x0c, streamFile);
|
||||
bytes_per_packet = read_32bitBE(chunk_offset+0x10, streamFile);
|
||||
samples_per_packet = read_32bitBE(chunk_offset+0x14, streamFile);
|
||||
channels_per_packet = read_32bitBE(chunk_offset+0x18, streamFile);
|
||||
bits_per_sample = read_32bitBE(chunk_offset+0x1C, streamFile);
|
||||
break;
|
||||
case 0x70616b74: /* pakt */
|
||||
found_pakt = 1;
|
||||
/* 64-bit packet table size, 0 for constant bitrate */
|
||||
if (
|
||||
read_32bitBE(chunk_offset+0x0c,streamFile) != 0 ||
|
||||
read_32bitBE(chunk_offset+0x10,streamFile) != 0) goto fail;
|
||||
/* high half of valid frames count */
|
||||
if (read_32bitBE(chunk_offset+0x14,streamFile) != 0) goto fail;
|
||||
/* frame count */
|
||||
sample_count = read_32bitBE(chunk_offset+0x18,streamFile);
|
||||
/* priming frames */
|
||||
if (read_32bitBE(chunk_offset+0x1c,streamFile) != 0) goto fail;
|
||||
/* remainder (unused) frames */
|
||||
unused_frames = read_32bitBE(chunk_offset+0x20,streamFile);
|
||||
|
||||
case 0x70616b74: /* "pakt" */
|
||||
//found_pakt = 1;
|
||||
|
||||
//packets_table_size = (uint32_t)read_64bitBE(chunk_offset+0x00,streamFile); /* 0 for constant bitrate */
|
||||
valid_samples = (uint32_t)read_64bitBE(chunk_offset+0x08,streamFile);
|
||||
//priming_samples = read_32bitBE(chunk_offset+0x10,streamFile); /* encoder delay samples */
|
||||
//unused_samples = read_32bitBE(chunk_offset+0x14,streamFile); /* footer samples */
|
||||
break;
|
||||
case 0x66726565: /* free */
|
||||
/* padding, ignore */
|
||||
break;
|
||||
case 0x64617461: /* data */
|
||||
if (read_32bitBE(chunk_offset+12,streamFile) != 1) goto fail;
|
||||
|
||||
case 0x64617461: /* "data" */
|
||||
found_data = 1;
|
||||
start_offset = chunk_offset + 16;
|
||||
data_size = read_32bitBE(chunk_offset+8,streamFile) - 4;
|
||||
|
||||
/* 0x00: version? 0x00/0x01 */
|
||||
start_offset = chunk_offset + 0x04;
|
||||
data_size = chunk_size - 0x4;
|
||||
break;
|
||||
|
||||
default: /* "free" "kuki" "info" "chan" etc: ignore */
|
||||
break;
|
||||
default:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* done with chunk */
|
||||
chunk_offset += 12 + read_32bitBE(chunk_offset+8,streamFile);
|
||||
chunk_offset += chunk_size;
|
||||
}
|
||||
|
||||
if (!found_pakt || !found_desc || !found_data) goto fail;
|
||||
if (start_offset == 0 || data_size == 0 || sample_count == 0 ||
|
||||
sample_rate == -1 || channel_count == 0) goto fail;
|
||||
if (!found_desc || !found_data)
|
||||
goto fail;
|
||||
if (start_offset == 0 || data_size == 0)
|
||||
goto fail;
|
||||
|
||||
/* ima4-specific */
|
||||
/* check for full packets */
|
||||
if (data_size % (interleave*channel_count) != 0) goto fail;
|
||||
if ((sample_count+unused_frames)%((interleave-2)*2) != 0) goto fail;
|
||||
/* check that all packets are accounted for */
|
||||
if (data_size/interleave/channel_count !=
|
||||
(sample_count+unused_frames)/((interleave-2)*2)) goto fail;
|
||||
|
||||
vgmstream = allocate_vgmstream(channel_count,0);
|
||||
loop_flag = 0;
|
||||
channel_count = channels_per_packet;
|
||||
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = sample_rate;
|
||||
vgmstream->num_samples = sample_count;
|
||||
/* ima4-specific */
|
||||
vgmstream->coding_type = coding_APPLE_IMA4;
|
||||
if (channel_count == 2)
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
else
|
||||
vgmstream->layout_type = layout_none;
|
||||
vgmstream->interleave_block_size = interleave;
|
||||
vgmstream->meta_type = meta_CAFF;
|
||||
|
||||
/* open the file for reading by each channel */
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<channel_count;i++)
|
||||
{
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
if (!vgmstream->ch[i].streamfile) goto fail;
|
||||
switch(codec) {
|
||||
case 0x6C70636D: /* "lpcm" */
|
||||
vgmstream->num_samples = valid_samples;
|
||||
if (!vgmstream->num_samples)
|
||||
vgmstream->num_samples = pcm_bytes_to_samples(data_size, channel_count, bits_per_sample);
|
||||
|
||||
vgmstream->ch[i].offset =
|
||||
vgmstream->ch[i].channel_start_offset =
|
||||
start_offset + interleave * i;
|
||||
}
|
||||
//todo check codec_flags for BE/LE, signed/etc
|
||||
if (bits_per_sample == 8) {
|
||||
vgmstream->coding_type = coding_PCM8;
|
||||
}
|
||||
else {
|
||||
goto fail;
|
||||
}
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = bytes_per_packet / channels_per_packet;
|
||||
|
||||
break;
|
||||
|
||||
case 0x696D6134: /* "ima4" [Vectros (iOS), Dragon Quest (iOS)] */
|
||||
vgmstream->num_samples = valid_samples;
|
||||
if (!vgmstream->num_samples) /* rare [Endless Fables 2 (iOS) */
|
||||
vgmstream->num_samples = apple_ima4_bytes_to_samples(data_size, channel_count);
|
||||
|
||||
vgmstream->coding_type = coding_APPLE_IMA4;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = bytes_per_packet / channels_per_packet;
|
||||
|
||||
/* ima4 defaults */
|
||||
//if (channels_per_packet != 1 && channels_per_packet != 2)
|
||||
// goto fail;
|
||||
if (samples_per_packet != 64)
|
||||
goto fail;
|
||||
if ((samples_per_packet / 2 + 2) * channels_per_packet != bytes_per_packet)
|
||||
goto fail;
|
||||
if (bits_per_sample != 0 && bits_per_sample != 4) /* 4 is rare too [Endless Fables 2 (iOS) */
|
||||
goto fail;
|
||||
|
||||
/* check for full packets and that all packets are accounted for */
|
||||
//if (found_pakt) {
|
||||
// if (data_size % (vgmstream->interleave_block_size*channel_count) != 0)
|
||||
// goto fail;
|
||||
// if ((valid_samples+unused_samples)%((vgmstream->interleave_block_size-2)*2) != 0)
|
||||
// goto fail;
|
||||
// if (data_size/vgmstream->interleave_block_size/channel_count !=
|
||||
// (valid_samples+unused_samples)/((vgmstream->interleave_block_size-2)*2))
|
||||
// goto fail;
|
||||
//}
|
||||
|
||||
break;
|
||||
|
||||
case 0x61616320: /* "aac " [Ridge Racer Accelerated (iOS)] */
|
||||
case 0x616C6163: /* "alac" [Chrono Trigger v1 (iOS)] */
|
||||
default: /* should be parsed by FFMpeg in its meta (involves parsing complex chunks) */
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ VGMSTREAM * init_vgmstream_ast(STREAMFILE *streamFile) {
|
|||
vgmstream->loop_end_sample = read_32bitBE(0x1c,streamFile);
|
||||
|
||||
vgmstream->coding_type = coding_type;
|
||||
vgmstream->layout_type = layout_ast_blocked;
|
||||
vgmstream->layout_type = layout_blocked_ast;
|
||||
vgmstream->meta_type = meta_AST;
|
||||
|
||||
/* open the file for reading by each channel */
|
||||
|
@ -80,7 +80,7 @@ VGMSTREAM * init_vgmstream_ast(STREAMFILE *streamFile) {
|
|||
}
|
||||
|
||||
/* start me up */
|
||||
ast_block_update(0x40,vgmstream);
|
||||
block_update_ast(0x40,vgmstream);
|
||||
|
||||
return vgmstream;
|
||||
|
||||
|
|
|
@ -0,0 +1,168 @@
|
|||
#include "meta.h"
|
||||
#include "../coding/coding.h"
|
||||
|
||||
static STREAMFILE* setup_atsl_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, const char* fake_ext);
|
||||
typedef enum { ATRAC3, ATRAC9, KOVS, KTSS } atsl_codec;
|
||||
|
||||
/* .ATSL - Koei Tecmo audio container [One Piece Pirate Warriors (PS3), Warriors All-Stars (PC)] */
|
||||
VGMSTREAM * init_vgmstream_atsl(STREAMFILE *streamFile) {
|
||||
VGMSTREAM *vgmstream = NULL;
|
||||
STREAMFILE *temp_streamFile = NULL;
|
||||
int total_subsongs, target_subsong = streamFile->stream_index;
|
||||
int type, big_endian = 0, entries;
|
||||
atsl_codec codec;
|
||||
const char* fake_ext;
|
||||
off_t subfile_offset = 0;
|
||||
size_t subfile_size = 0, header_size;
|
||||
int32_t (*read_32bit)(off_t,STREAMFILE*) = NULL;
|
||||
|
||||
|
||||
/* checks */
|
||||
/* .atsl: header id (for G1L extractions), .atsl3: PS3 games, .atsl4: PS4 games */
|
||||
if ( !check_extensions(streamFile,"atsl,atsl3,atsl4"))
|
||||
goto fail;
|
||||
if (read_32bitBE(0x00,streamFile) != 0x4154534C) /* "ATSL" */
|
||||
goto fail;
|
||||
|
||||
/* main header (LE) */
|
||||
header_size = read_32bitLE(0x04,streamFile);
|
||||
/* 0x08/0c: flags?, 0x10: fixed? (0x03E8) */
|
||||
entries = read_32bitLE(0x14,streamFile);
|
||||
/* 0x18: 0x28, or 0x30 (rarer) */
|
||||
/* 0x1c: null, 0x20: subheader size, 0x24/28: null */
|
||||
|
||||
/* Type byte may be wrong (could need header id tests instead). Example flags at 0x08/0x0c:
|
||||
* - 00010101 00020001 .atsl3 from One Piece Pirate Warriors (PS3)[ATRAC3]
|
||||
* - 00000201 00020001 .atsl3 from Fist of North Star: Ken's Rage 2 (PS3)[ATRAC3]
|
||||
* 00000301 00020101 (same)
|
||||
* - 01040301 00060301 .atsl4 from Nobunaga's Ambition: Sphere of Influence (PS4)[ATRAC9]
|
||||
* - 00060301 00040301 atsl in G1L from One Piece Pirate Warriors 3 (Vita)[ATRAC9]
|
||||
* - 00060301 00010301 atsl in G1L from One Piece Pirate Warriors 3 (PC)[KOVS]
|
||||
* - 000A0301 00010501 atsl in G1L from Warriors All-Stars (PC)[KOVS]
|
||||
* - 000B0301 00080601 atsl in G1l from Sengoku Musou Sanada Maru (Switch)[KTSS]
|
||||
*/
|
||||
type = read_8bit(0x0d, streamFile);
|
||||
switch(type) {
|
||||
case 0x01:
|
||||
codec = KOVS;
|
||||
fake_ext = "kvs";
|
||||
break;
|
||||
case 0x02:
|
||||
codec = ATRAC3;
|
||||
fake_ext = "at3";
|
||||
big_endian = 1;
|
||||
break;
|
||||
case 0x04:
|
||||
case 0x06:
|
||||
codec = ATRAC9;
|
||||
fake_ext = "at9";
|
||||
break;
|
||||
case 0x08:
|
||||
codec = KTSS;
|
||||
fake_ext = "ktss";
|
||||
break;
|
||||
default:
|
||||
VGM_LOG("ATSL: unknown type %x\n", type);
|
||||
goto fail;
|
||||
}
|
||||
read_32bit = big_endian ? read_32bitBE : read_32bitLE;
|
||||
|
||||
|
||||
/* entries can point to the same file, count unique only */
|
||||
{
|
||||
int i,j;
|
||||
|
||||
total_subsongs = 0;
|
||||
if (target_subsong == 0) target_subsong = 1;
|
||||
|
||||
/* parse entry header (in machine endianness) */
|
||||
for (i = 0; i < entries; i++) {
|
||||
int is_unique = 1;
|
||||
|
||||
off_t entry_offset = read_32bit(header_size + i*0x28 + 0x04,streamFile);
|
||||
size_t entry_size = read_32bit(header_size + i*0x28 + 0x08,streamFile);
|
||||
/* 0x00: id?, 0x08+: sample rate/num_samples/loop_start/etc, matching subfile header */
|
||||
|
||||
/* check if current entry was repeated in a prev entry */
|
||||
for (j = 0; j < i; j++) {
|
||||
off_t prev_offset = read_32bit(header_size + j*0x28 + 0x04,streamFile);
|
||||
if (prev_offset == entry_offset) {
|
||||
is_unique = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!is_unique)
|
||||
continue;
|
||||
|
||||
total_subsongs++;
|
||||
|
||||
/* target GET, but keep going to count subsongs */
|
||||
if (!subfile_offset && target_subsong == total_subsongs) {
|
||||
subfile_offset = entry_offset;
|
||||
subfile_size = entry_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target_subsong > total_subsongs || total_subsongs <= 0) goto fail;
|
||||
if (!subfile_offset || !subfile_size) goto fail;
|
||||
|
||||
|
||||
/* some kind of seek/switch table may follow (optional, found in .atsl3) */
|
||||
|
||||
|
||||
temp_streamFile = setup_atsl_streamfile(streamFile, subfile_offset,subfile_size, fake_ext);
|
||||
if (!temp_streamFile) goto fail;
|
||||
|
||||
/* init the VGMSTREAM */
|
||||
switch(codec) {
|
||||
case ATRAC3:
|
||||
case ATRAC9:
|
||||
vgmstream = init_vgmstream_riff(temp_streamFile);
|
||||
if (!vgmstream) goto fail;
|
||||
break;
|
||||
case KOVS:
|
||||
vgmstream = init_vgmstream_ogg_vorbis(temp_streamFile);
|
||||
if (!vgmstream) goto fail;
|
||||
break;
|
||||
case KTSS:
|
||||
vgmstream = init_vgmstream_ktss(temp_streamFile);
|
||||
if (!vgmstream) goto fail;
|
||||
break;
|
||||
default:
|
||||
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_atsl_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, const char* fake_ext) {
|
||||
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,fake_ext);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
return temp_streamFile;
|
||||
|
||||
fail:
|
||||
close_streamfile(temp_streamFile);
|
||||
return NULL;
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
#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;
|
||||
}
|
|
@ -49,7 +49,7 @@ static STREAMFILE* setup_atx_streamfile(STREAMFILE *streamFile) {
|
|||
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);
|
||||
get_streamfile_filename(streamFile, filename,PATH_LIMIT);
|
||||
filename_len = strlen(filename);
|
||||
if (filename_len < 7 || filename[filename_len - 5] != '1') goto fail;
|
||||
|
||||
|
@ -59,7 +59,7 @@ static STREAMFILE* setup_atx_streamfile(STREAMFILE *streamFile) {
|
|||
size_t subfile_size;
|
||||
|
||||
filename[filename_len - 5] = ('0'+i+1); /* ghetto digit conversion */
|
||||
new_streamFile = open_stream_name(streamFile, filename);
|
||||
new_streamFile = open_streamfile_by_filename(streamFile, filename);
|
||||
if (!new_streamFile) goto fail;
|
||||
segment_streamFiles[i] = new_streamFile;
|
||||
|
||||
|
@ -96,12 +96,16 @@ static STREAMFILE* setup_atx_streamfile(STREAMFILE *streamFile) {
|
|||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
/* if all this worked we'll have this frankenstein streamfile:
|
||||
* fakename( clamp( multifile( segment0=clamp(standard(FILE)), segment1=clamp(standard(FILE)) ) ) ) */
|
||||
|
||||
return temp_streamFile;
|
||||
|
||||
fail:
|
||||
if (!temp_streamFile) {
|
||||
for (i = 0; i < num_segments; i++)
|
||||
for (i = 0; i < num_segments; i++) {
|
||||
close_streamfile(segment_streamFiles[i]);
|
||||
}
|
||||
} else {
|
||||
close_streamfile(temp_streamFile); /* closes all segments */
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "meta.h"
|
||||
#include "../coding/coding.h"
|
||||
#include "../layout/layout.h"
|
||||
#include "awc_xma_streamfile.h"
|
||||
|
||||
typedef struct {
|
||||
int big_endian;
|
||||
|
@ -17,7 +18,7 @@ typedef struct {
|
|||
int block_chunk;
|
||||
|
||||
off_t stream_offset;
|
||||
off_t stream_size;
|
||||
size_t stream_size;
|
||||
|
||||
} awc_header;
|
||||
|
||||
|
@ -64,6 +65,76 @@ VGMSTREAM * init_vgmstream_awc(STREAMFILE *streamFile) {
|
|||
vgmstream->codec_endian = awc.big_endian;
|
||||
break;
|
||||
|
||||
#ifdef VGM_USE_FFMPEG
|
||||
case 0x05: { /* XMA2 (X360) */
|
||||
uint8_t buf[0x100];
|
||||
size_t bytes, block_size, block_count, substream_size;
|
||||
off_t substream_offset;
|
||||
|
||||
if (awc.is_music) {
|
||||
/* 1ch XMAs in blocks, we'll use layered layout + custom IO to get multi-FFmpegs working */
|
||||
int i;
|
||||
layered_layout_data * data = NULL;
|
||||
|
||||
/* init layout */
|
||||
data = init_layout_layered(awc.channel_count);
|
||||
if (!data) goto fail;
|
||||
vgmstream->layout_data = data;
|
||||
vgmstream->layout_type = layout_layered;
|
||||
vgmstream->coding_type = coding_FFmpeg;
|
||||
|
||||
/* open each layer subfile */
|
||||
for (i = 0; i < awc.channel_count; i++) {
|
||||
STREAMFILE* temp_streamFile;
|
||||
int layer_channels = 1;
|
||||
|
||||
/* build the layer VGMSTREAM */
|
||||
data->layers[i] = allocate_vgmstream(layer_channels, 0);
|
||||
if (!data->layers[i]) goto fail;
|
||||
|
||||
data->layers[i]->sample_rate = awc.sample_rate;
|
||||
data->layers[i]->meta_type = meta_AWC;
|
||||
data->layers[i]->coding_type = coding_FFmpeg;
|
||||
data->layers[i]->layout_type = layout_none;
|
||||
data->layers[i]->num_samples = awc.num_samples;
|
||||
|
||||
/* setup custom IO streamfile, pass to FFmpeg and hope it's fooled */
|
||||
temp_streamFile = setup_awc_xma_streamfile(streamFile, awc.stream_offset, awc.stream_size, awc.block_chunk, awc.channel_count, i);
|
||||
if (!temp_streamFile) goto fail;
|
||||
|
||||
substream_offset = 0; /* where FFmpeg thinks data starts, which our custom streamFile will clamp */
|
||||
substream_size = get_streamfile_size(temp_streamFile); /* data of one XMA substream without blocks */
|
||||
block_size = 0x8000; /* no idea */
|
||||
block_count = substream_size / block_size; /* not accurate but not needed */
|
||||
|
||||
bytes = ffmpeg_make_riff_xma2(buf, 0x100, awc.num_samples, substream_size, layer_channels, awc.sample_rate, block_count, block_size);
|
||||
data->layers[i]->codec_data = init_ffmpeg_header_offset(temp_streamFile, buf,bytes, substream_offset,substream_size);
|
||||
|
||||
close_streamfile(temp_streamFile);
|
||||
if (!data->layers[i]->codec_data) goto fail;
|
||||
}
|
||||
|
||||
/* setup layered VGMSTREAMs */
|
||||
if (!setup_layout_layered(data))
|
||||
goto fail;
|
||||
}
|
||||
else {
|
||||
/* regular XMA for sfx */
|
||||
block_size = 0x8000; /* no idea */
|
||||
block_count = awc.stream_size / block_size; /* not accurate but not needed */
|
||||
|
||||
bytes = ffmpeg_make_riff_xma2(buf, 0x100, awc.num_samples, awc.stream_size, awc.channel_count, awc.sample_rate, block_count, block_size);
|
||||
vgmstream->codec_data = init_ffmpeg_header_offset(streamFile, buf,bytes, awc.stream_offset,awc.stream_size);
|
||||
if (!vgmstream->codec_data) goto fail;
|
||||
vgmstream->coding_type = coding_FFmpeg;
|
||||
vgmstream->layout_type = layout_none;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#ifdef VGM_USE_MPEG
|
||||
case 0x07: { /* MPEG (PS3) */
|
||||
mpeg_custom_config cfg;
|
||||
|
@ -80,7 +151,6 @@ VGMSTREAM * init_vgmstream_awc(STREAMFILE *streamFile) {
|
|||
}
|
||||
#endif
|
||||
|
||||
case 0x05: /* XMA2 (X360) */
|
||||
default:
|
||||
VGM_LOG("AWC: unknown codec 0x%02x\n", awc.codec);
|
||||
goto fail;
|
||||
|
@ -187,12 +257,15 @@ static int parse_awc_header(STREAMFILE* streamFile, awc_header* awc) {
|
|||
|
||||
/* get stream tags */
|
||||
for (i = 0; i < tag_count; i++) {
|
||||
uint64_t tag_header, tag, size, offset;
|
||||
uint64_t tag_header;
|
||||
uint8_t tag;
|
||||
size_t size;
|
||||
off_t offset;
|
||||
|
||||
tag_header = (uint64_t)read_64bit(off + 0x08*i,streamFile);
|
||||
tag = (tag_header >> 56) & 0xFF; /* 8b */
|
||||
size = (tag_header >> 28) & 0x0FFFFFFF; /* 28b */
|
||||
offset = (tag_header >> 0) & 0x0FFFFFFF; /* 28b */
|
||||
tag = (uint8_t)((tag_header >> 56) & 0xFF); /* 8b */
|
||||
size = (size_t)((tag_header >> 28) & 0x0FFFFFFF); /* 28b */
|
||||
offset = (off_t)((tag_header >> 0) & 0x0FFFFFFF); /* 28b */
|
||||
|
||||
/* Tags are apparently part of a hash derived from a word ("data", "format", etc).
|
||||
* If music + 1ch, the header and data chunks can repeat for no reason (sometimes not even pointed). */
|
||||
|
|
|
@ -0,0 +1,257 @@
|
|||
#ifndef _AWC_XMA_STREAMFILE_H_
|
||||
#define _AWC_XMA_STREAMFILE_H_
|
||||
#include "../streamfile.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* config */
|
||||
off_t stream_offset;
|
||||
size_t stream_size;
|
||||
int channel_count;
|
||||
int channel;
|
||||
size_t chunk_size;
|
||||
|
||||
/* state */
|
||||
off_t logical_offset; /* offset that corresponds to physical_offset */
|
||||
off_t physical_offset; /* actual file offset */
|
||||
off_t next_block_offset; /* physical offset of the next block start */
|
||||
off_t last_offset; /* physical offset of where the last block ended */
|
||||
size_t current_data_size;
|
||||
size_t current_consumed_size;
|
||||
|
||||
size_t total_size; /* size of the resulting XMA data */
|
||||
} awc_xma_io_data;
|
||||
|
||||
|
||||
static size_t get_block_header_size(STREAMFILE *streamFile, off_t offset, awc_xma_io_data *data);
|
||||
static size_t get_repeated_data_size(STREAMFILE *streamFile, off_t new_offset, off_t last_offset);
|
||||
static size_t get_block_skip_count(STREAMFILE *streamFile, off_t offset, int channel);
|
||||
|
||||
/* Reads plain XMA data of a single stream. Each block has a header and channels have different num_samples/frames.
|
||||
* Channel data is separate within the block (first all frames of ch0, then ch1, etc), padded, and sometimes
|
||||
* the last few frames of a channel are repeated in the new block (marked with the "discard samples" field). */
|
||||
static size_t awc_xma_io_read(STREAMFILE *streamfile, uint8_t *dest, off_t offset, size_t length, awc_xma_io_data* data) {
|
||||
size_t total_read = 0;
|
||||
size_t frame_size = 0x800;
|
||||
|
||||
/* ignore bad reads */
|
||||
if (offset < 0 || offset > data->total_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* previous offset: re-start as we can't map logical<>physical offsets
|
||||
* (kinda slow as it trashes buffers, but shouldn't happen often) */
|
||||
if (offset < data->logical_offset) {
|
||||
data->logical_offset = 0x00;
|
||||
data->physical_offset = data->stream_offset;
|
||||
data->next_block_offset = 0;
|
||||
data->last_offset = 0;
|
||||
data->current_data_size = 0;
|
||||
data->current_consumed_size = 0;
|
||||
}
|
||||
|
||||
/* read from block, moving to next when all data is consumed */
|
||||
while (length > 0) {
|
||||
size_t to_read, bytes_read;
|
||||
|
||||
/* new block */
|
||||
if (data->current_data_size == 0) {
|
||||
size_t header_size = get_block_header_size(streamfile, data->physical_offset, data);
|
||||
/* header table entries = frames... I hope */
|
||||
size_t skip_size = get_block_skip_count(streamfile, data->physical_offset, data->channel) * frame_size;
|
||||
//size_t skip_size = read_32bitBE(data->physical_offset + 0x10*data->channel + 0x00, streamfile) * frame_size;
|
||||
size_t data_size = read_32bitBE(data->physical_offset + 0x10*data->channel + 0x04, streamfile) * frame_size;
|
||||
size_t repeat_samples = read_32bitBE(data->physical_offset + 0x10*data->channel + 0x08, streamfile);
|
||||
size_t repeat_size = 0;
|
||||
|
||||
/* if there are repeat samples current block repeats some frames from last block, find out size */
|
||||
if (repeat_samples && data->last_offset) {
|
||||
off_t data_offset = data->physical_offset + header_size + skip_size;
|
||||
repeat_size = get_repeated_data_size(streamfile, data_offset, data->last_offset);
|
||||
}
|
||||
|
||||
data->next_block_offset = data->physical_offset + data->chunk_size;
|
||||
data->physical_offset += header_size + skip_size + repeat_size; /* data start */
|
||||
data->current_data_size = data_size - repeat_size; /* readable max in this block */
|
||||
data->current_consumed_size = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* block end, go next */
|
||||
if (data->current_consumed_size == data->current_data_size) {
|
||||
data->last_offset = data->physical_offset; /* where last block ended */
|
||||
data->physical_offset = data->next_block_offset;
|
||||
data->current_data_size = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* requested offset is further along, pretend we consumed data and try again */
|
||||
if (offset > data->logical_offset) {
|
||||
size_t to_consume = offset - data->logical_offset;
|
||||
if (to_consume > data->current_data_size - data->current_consumed_size)
|
||||
to_consume = data->current_data_size - data->current_consumed_size;
|
||||
|
||||
data->physical_offset += to_consume;
|
||||
data->logical_offset += to_consume;
|
||||
data->current_consumed_size += to_consume;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* clamp reads up to this block's end */
|
||||
to_read = (data->current_data_size - data->current_consumed_size);
|
||||
if (to_read > length)
|
||||
to_read = length;
|
||||
if (to_read == 0)
|
||||
return total_read; /* should never happen... */
|
||||
|
||||
/* finally read and move buffer/offsets */
|
||||
bytes_read = read_streamfile(dest, data->physical_offset, to_read, streamfile);
|
||||
total_read += bytes_read;
|
||||
if (bytes_read != to_read)
|
||||
return total_read; /* couldn't read fully */
|
||||
|
||||
dest += bytes_read;
|
||||
offset += bytes_read;
|
||||
length -= bytes_read;
|
||||
|
||||
data->physical_offset += bytes_read;
|
||||
data->logical_offset += bytes_read;
|
||||
data->current_consumed_size += bytes_read;
|
||||
}
|
||||
|
||||
return total_read;
|
||||
}
|
||||
|
||||
static size_t awc_xma_io_size(STREAMFILE *streamfile, awc_xma_io_data* data) {
|
||||
off_t physical_offset, max_physical_offset, last_offset;
|
||||
size_t frame_size = 0x800;
|
||||
size_t total_size = 0;
|
||||
|
||||
if (data->total_size)
|
||||
return data->total_size;
|
||||
|
||||
physical_offset = data->stream_offset;
|
||||
max_physical_offset = data->stream_offset + data->stream_size;
|
||||
last_offset = 0;
|
||||
|
||||
/* read blocks and sum final size */
|
||||
while (physical_offset < max_physical_offset) {
|
||||
size_t header_size = get_block_header_size(streamfile, physical_offset, data);
|
||||
/* header table entries = frames... I hope */
|
||||
size_t skip_size = get_block_skip_count(streamfile, physical_offset, data->channel) * frame_size;
|
||||
//size_t skip_size = read_32bitBE(physical_offset + 0x10*data->channel + 0x00, streamfile) * frame_size;
|
||||
size_t data_size = read_32bitBE(physical_offset + 0x10*data->channel + 0x04, streamfile) * frame_size;
|
||||
size_t repeat_samples = read_32bitBE(physical_offset + 0x10*data->channel + 0x08, streamfile);
|
||||
size_t repeat_size = 0;
|
||||
|
||||
/* if there are repeat samples current block repeats some frames from last block, find out size */
|
||||
if (repeat_samples && last_offset) {
|
||||
off_t data_offset = physical_offset + header_size + skip_size;
|
||||
repeat_size = get_repeated_data_size(streamfile, data_offset, last_offset);
|
||||
}
|
||||
|
||||
last_offset = physical_offset + header_size + skip_size + data_size;
|
||||
total_size += data_size - repeat_size;
|
||||
physical_offset += data->chunk_size;
|
||||
}
|
||||
|
||||
data->total_size = total_size;
|
||||
return data->total_size;
|
||||
}
|
||||
|
||||
|
||||
/* Prepares custom IO for AWC XMA, which is interleaved XMA in AWC blocks */
|
||||
static STREAMFILE* setup_awc_xma_streamfile(STREAMFILE *streamFile, off_t stream_offset, size_t stream_size, size_t chunk_size, int channel_count, int channel) {
|
||||
STREAMFILE *temp_streamFile = NULL, *new_streamFile = NULL;
|
||||
awc_xma_io_data io_data = {0};
|
||||
size_t io_data_size = sizeof(awc_xma_io_data);
|
||||
|
||||
io_data.stream_offset = stream_offset;
|
||||
io_data.stream_size = stream_size;
|
||||
io_data.chunk_size = chunk_size;
|
||||
io_data.channel_count = channel_count;
|
||||
io_data.channel = channel;
|
||||
io_data.physical_offset = stream_offset;
|
||||
|
||||
/* setup subfile */
|
||||
new_streamFile = open_wrap_streamfile(streamFile);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
new_streamFile = open_io_streamfile(temp_streamFile, &io_data,io_data_size, awc_xma_io_read,awc_xma_io_size);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
//todo maybe should force to read filesize once
|
||||
return temp_streamFile;
|
||||
|
||||
fail:
|
||||
close_streamfile(temp_streamFile);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* block header size, aligned/padded to 0x800 */
|
||||
static size_t get_block_header_size(STREAMFILE *streamFile, off_t offset, awc_xma_io_data *data) {
|
||||
size_t header_size = 0;
|
||||
int i;
|
||||
int entries = data->channel_count;
|
||||
|
||||
for (i = 0; i < entries; i++) {
|
||||
header_size += 0x10;
|
||||
header_size += read_32bitBE(offset + 0x10*i + 0x04, streamFile) * 0x04; /* entries in the table */
|
||||
}
|
||||
|
||||
if (header_size % 0x800) /* padded */
|
||||
header_size += 0x800 - (header_size % 0x800);
|
||||
|
||||
return header_size;
|
||||
}
|
||||
|
||||
|
||||
/* find data that repeats in the beginning of a new block at the end of last block */
|
||||
static size_t get_repeated_data_size(STREAMFILE *streamFile, off_t new_offset, off_t last_offset) {
|
||||
uint8_t new_frame[0x800];/* buffer to avoid fseek back and forth */
|
||||
size_t frame_size = 0x800;
|
||||
off_t offset;
|
||||
int i;
|
||||
|
||||
/* read block first frame */
|
||||
if (read_streamfile(new_frame,new_offset, frame_size,streamFile) != frame_size)
|
||||
goto fail;
|
||||
|
||||
/* find the frame in last bytes of prev block */
|
||||
offset = last_offset - 0x4000; /* typical max is 1 frame of ~0x800, no way to know exact size */
|
||||
while (offset < last_offset) {
|
||||
/* compare frame vs prev block data */
|
||||
for (i = 0; i < frame_size; i++) {
|
||||
if ((uint8_t)read_8bit(offset+i,streamFile) != new_frame[i])
|
||||
break;
|
||||
}
|
||||
|
||||
/* frame fully compared? */
|
||||
if (i == frame_size)
|
||||
return last_offset - offset;
|
||||
else
|
||||
offset += i+1;
|
||||
}
|
||||
|
||||
fail:
|
||||
VGM_LOG("AWC: can't find repeat size, new=0x%08lx, last=0x%08lx\n", new_offset, last_offset);
|
||||
return 0; /* keep on truckin' */
|
||||
}
|
||||
|
||||
/* header has a skip value, but somehow it's sometimes bigger than expected (WHY!?!?) so just sum all */
|
||||
static size_t get_block_skip_count(STREAMFILE *streamFile, off_t offset, int channel) {
|
||||
size_t skip_count = 0;
|
||||
int i;
|
||||
|
||||
//skip_size = read_32bitBE(offset + 0x10*channel + 0x00, streamFile); /* wrong! */
|
||||
for (i = 0; i < channel; i++) {
|
||||
skip_count += read_32bitBE(offset + 0x10*i + 0x04, streamFile); /* number of frames of this channel */
|
||||
}
|
||||
|
||||
return skip_count;
|
||||
}
|
||||
|
||||
|
||||
#endif /* _AWC_XMA_STREAMFILE_H_ */
|
|
@ -41,11 +41,7 @@ static size_t get_offset_bar(BARSTREAMFILE *streamFile) {
|
|||
}
|
||||
|
||||
static void get_name_bar(BARSTREAMFILE *streamFile, char *name, size_t length) {
|
||||
return streamFile->real_file->get_name(streamFile->real_file, name, length);
|
||||
}
|
||||
|
||||
static void get_realname_bar(BARSTREAMFILE *streamFile, char *name, size_t length) {
|
||||
return streamFile->real_file->get_realname(streamFile->real_file, name, length);
|
||||
streamFile->real_file->get_name(streamFile->real_file, name, length);
|
||||
}
|
||||
|
||||
STREAMFILE *open_bar(BARSTREAMFILE *streamFile, const char * const filename, size_t buffersize) {
|
||||
|
@ -75,7 +71,6 @@ static void close_bar(BARSTREAMFILE *streamFile) {
|
|||
streamfile->sf.get_size = (void*)get_size_bar;
|
||||
streamfile->sf.get_offset = (void*)get_offset_bar;
|
||||
streamfile->sf.get_name = (void*)get_name_bar;
|
||||
streamfile->sf.get_realname = (void*)get_realname_bar;
|
||||
streamfile->sf.open = (void*)open_bar;
|
||||
streamfile->sf.close = (void*)close_bar;
|
||||
|
||||
|
|
|
@ -112,22 +112,14 @@ VGMSTREAM * init_vgmstream_bcstm(STREAMFILE *streamFile) {
|
|||
}
|
||||
|
||||
vgmstream->coding_type = coding_type;
|
||||
if (channel_count == 1)
|
||||
vgmstream->layout_type = layout_none;
|
||||
else
|
||||
{
|
||||
if (ima)
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
else
|
||||
vgmstream->layout_type = layout_interleave_shortblock;
|
||||
}
|
||||
vgmstream->layout_type = (channel_count == 1) ? layout_none : layout_interleave;
|
||||
vgmstream->meta_type = meta_CSTM;
|
||||
|
||||
if (ima)
|
||||
if (ima) {
|
||||
vgmstream->interleave_block_size = 0x200;
|
||||
else {
|
||||
} else {
|
||||
vgmstream->interleave_block_size = read_32bitLE(info_offset + 0x34, streamFile);
|
||||
vgmstream->interleave_smallblock_size = read_32bitLE(info_offset + 0x44, streamFile);
|
||||
vgmstream->interleave_last_block_size = read_32bitLE(info_offset + 0x44, streamFile);
|
||||
}
|
||||
|
||||
if (vgmstream->coding_type == coding_NGC_DSP) {
|
||||
|
|
|
@ -121,22 +121,14 @@ VGMSTREAM * init_vgmstream_bfstm(STREAMFILE *streamFile) {
|
|||
}
|
||||
|
||||
vgmstream->coding_type = coding_type;
|
||||
if (channel_count == 1)
|
||||
vgmstream->layout_type = layout_none;
|
||||
else
|
||||
{
|
||||
if (ima)
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
else
|
||||
vgmstream->layout_type = layout_interleave_shortblock;
|
||||
}
|
||||
vgmstream->layout_type = (channel_count == 1) ? layout_none : layout_interleave;
|
||||
vgmstream->meta_type = meta_FSTM;
|
||||
|
||||
if (ima)
|
||||
vgmstream->interleave_block_size = 0x200;
|
||||
else {
|
||||
vgmstream->interleave_block_size = read_32bit(info_offset + 0x34, streamFile);
|
||||
vgmstream->interleave_smallblock_size = read_32bit(info_offset + 0x44, streamFile);
|
||||
vgmstream->interleave_last_block_size = read_32bit(info_offset + 0x44, streamFile);
|
||||
}
|
||||
|
||||
if (vgmstream->coding_type == coding_NGC_DSP) {
|
||||
|
|
|
@ -1,150 +1,133 @@
|
|||
#include "meta.h"
|
||||
#include "../util.h"
|
||||
#include "../coding/coding.h"
|
||||
|
||||
/* FWAV - Nintendo streams */
|
||||
VGMSTREAM * init_vgmstream_bfwav(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[PATH_LIMIT];
|
||||
|
||||
coding_t coding_type;
|
||||
coding_t coding_PCM16;
|
||||
int32_t (*read_32bit)(off_t,STREAMFILE*) = NULL;
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = NULL;
|
||||
|
||||
/*int ima = 0;*/
|
||||
int nsmbu_flag = 0;
|
||||
|
||||
off_t data_offset;
|
||||
off_t head_offset;
|
||||
int codec_number;
|
||||
int channel_count;
|
||||
int loop_flag;
|
||||
|
||||
off_t start_offset;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile, filename, sizeof(filename));
|
||||
if (strcasecmp("bfwav", filename_extension(filename)) && strcasecmp("fwav", filename_extension(filename))) {
|
||||
if (strcasecmp("bfwavnsmbu",filename_extension(filename))) goto fail;
|
||||
else nsmbu_flag = 1;
|
||||
}
|
||||
/* check header */
|
||||
if ((uint32_t)read_32bitBE(0, streamFile) != 0x46574156) /* "FWAV" */
|
||||
goto fail;
|
||||
|
||||
if ((uint16_t)read_16bitBE(4, streamFile) == 0xFEFF) { /* endian marker (BE most common) */
|
||||
read_32bit = read_32bitBE;
|
||||
read_16bit = read_16bitBE;
|
||||
coding_PCM16 = coding_PCM16BE;
|
||||
} else if ((uint16_t)read_16bitBE(4, streamFile) == 0xFFFE) { /* LE endian marker */
|
||||
read_32bit = read_32bitLE;
|
||||
read_16bit = read_16bitLE;
|
||||
coding_PCM16 = coding_PCM16LE;
|
||||
} else {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* get head offset, check */
|
||||
head_offset = read_32bit(0x18, streamFile);
|
||||
data_offset = read_32bit(0x24, streamFile);
|
||||
|
||||
if ((uint32_t)read_32bitBE(head_offset, streamFile) != 0x494E464F) /* "INFO" (FWAV)*/
|
||||
goto fail;
|
||||
|
||||
|
||||
/* check type details */
|
||||
codec_number = read_8bit(head_offset + 0x8, streamFile);
|
||||
loop_flag = read_8bit(head_offset + 0x9, streamFile);
|
||||
channel_count = read_32bit(head_offset + 0x1C, streamFile);
|
||||
|
||||
switch (codec_number) {
|
||||
case 0:
|
||||
coding_type = coding_PCM8;
|
||||
break;
|
||||
case 1:
|
||||
coding_type = coding_PCM16;
|
||||
break;
|
||||
case 2:
|
||||
coding_type = coding_NGC_DSP;
|
||||
break;
|
||||
default:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (channel_count < 1) goto fail;
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
|
||||
vgmstream = allocate_vgmstream(channel_count, loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
/* fill in the vital statistics */
|
||||
vgmstream->num_samples = read_32bit(head_offset + 0x14, streamFile);
|
||||
if (nsmbu_flag)
|
||||
vgmstream->sample_rate = 16000;
|
||||
else
|
||||
vgmstream->sample_rate = (uint16_t)read_32bit(head_offset + 0xC, streamFile);
|
||||
/* channels and loop flag are set by allocate_vgmstream */
|
||||
|
||||
vgmstream->loop_start_sample = read_32bit(head_offset + 0x10, streamFile);
|
||||
vgmstream->loop_end_sample = vgmstream->num_samples;
|
||||
|
||||
vgmstream->coding_type = coding_type;
|
||||
if (channel_count == 1)
|
||||
vgmstream->layout_type = layout_none;
|
||||
else
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset;
|
||||
off_t info_offset, data_offset;
|
||||
int channel_count, loop_flag, codec;
|
||||
int big_endian;
|
||||
size_t interleave = 0;
|
||||
int32_t (*read_32bit)(off_t,STREAMFILE*) = NULL;
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = NULL;
|
||||
int nsmbu_flag = 0;
|
||||
|
||||
|
||||
vgmstream->meta_type = meta_FWAV;
|
||||
/* checks */
|
||||
/* .bfwavnsmbu: fake extension to detect New Super Mario Bros U files with weird sample rate */
|
||||
if (!check_extensions(streamFile, "bfwav,fwav,bfwavnsmbu"))
|
||||
goto fail;
|
||||
nsmbu_flag = check_extensions(streamFile, "bfwavnsmbu");
|
||||
|
||||
vgmstream->interleave_block_size = read_32bit(read_32bit(0x6c, streamFile) + 0x60, streamFile) - 0x18;
|
||||
|
||||
/* FWAV header */
|
||||
if (read_32bitBE(0x00, streamFile) != 0x46574156) /* "FWAV" */
|
||||
goto fail;
|
||||
/* 0x06(2): header size (0x40), 0x08: version (0x00010200), 0x0c: file size 0x10(2): sections (2) */
|
||||
|
||||
start_offset = data_offset + 0x20;
|
||||
if ((uint16_t)read_16bitBE(0x04, streamFile) == 0xFEFF) { /* BE BOM check */
|
||||
read_32bit = read_32bitBE;
|
||||
read_16bit = read_16bitBE;
|
||||
big_endian = 1;
|
||||
} else if ((uint16_t)read_16bitBE(0x04, streamFile) == 0xFFFE) { /* LE BOM check */
|
||||
read_32bit = read_32bitLE;
|
||||
read_16bit = read_16bitLE;
|
||||
big_endian = 0;
|
||||
} else {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (vgmstream->coding_type == coding_NGC_DSP) {
|
||||
int i, j;
|
||||
info_offset = read_32bit(0x18, streamFile); /* 0x14(2): info mark (0x7000), 0x1c: info size */
|
||||
data_offset = read_32bit(0x24, streamFile); /* 0x20(2): data mark (0x7001), 0x28: data size */
|
||||
|
||||
for (j = 0; j<vgmstream->channels; j++) {
|
||||
for (i = 0; i<16; i++) {
|
||||
off_t coeffheader = head_offset + 0x1C + read_32bit(head_offset + 0x24 + (j*8), streamFile);
|
||||
off_t coef_offset;
|
||||
if ((uint32_t)read_16bit(coeffheader, streamFile) != 0x1F00) goto fail;
|
||||
/* INFO section */
|
||||
if (read_32bitBE(info_offset, streamFile) != 0x494E464F) /* "INFO" */
|
||||
goto fail;
|
||||
codec = read_8bit(info_offset + 0x08, streamFile);
|
||||
loop_flag = read_8bit(info_offset + 0x09, streamFile);
|
||||
channel_count = read_32bit(info_offset + 0x1C, streamFile);
|
||||
|
||||
coef_offset = read_32bit(coeffheader + 0xC, streamFile) + coeffheader;
|
||||
vgmstream->ch[j].adpcm_coef[i] = read_16bit(coef_offset + i * 2, streamFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* parse channel table */
|
||||
{
|
||||
off_t channel1_info, data_start;
|
||||
int i;
|
||||
|
||||
channel1_info = info_offset + 0x1c + read_32bit(info_offset+0x20+0x08*0+0x04, streamFile);
|
||||
data_start = read_32bit(channel1_info+0x04, streamFile); /* within "DATA" after 0x08 */
|
||||
|
||||
/* channels use absolute offsets but should be ok as interleave */
|
||||
interleave = 0;
|
||||
if (channel_count > 1) {
|
||||
off_t channel2_info = info_offset + 0x1c + read_32bit(info_offset+0x20+0x08*1+0x04, streamFile);
|
||||
interleave = read_32bit(channel2_info+0x04, streamFile) - data_start;
|
||||
}
|
||||
|
||||
start_offset = data_offset + 0x08 + data_start;
|
||||
|
||||
/* validate all channels just in case of multichannel with non-constant interleave */
|
||||
for (i = 0; i < channel_count; i++) {
|
||||
/* channel table, 0x00: flag (0x7100), 0x04: channel info offset */
|
||||
off_t channel_info = info_offset + 0x1c + read_32bit(info_offset+0x20+0x08*i+0x04, streamFile);
|
||||
/* channel info, 0x00(2): flag (0x1f00), 0x04: offset, 0x08(2): ADPCM flag (0x0300), 0x0c: ADPCM offset */
|
||||
if ((uint16_t)read_16bit(channel_info+0x00, streamFile) != 0x1F00)
|
||||
goto fail;
|
||||
if (read_32bit(channel_info+0x04, streamFile) != data_start + interleave*i)
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count, loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
/* open the file for reading by each channel */
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i<channel_count; i++) {
|
||||
if (vgmstream->layout_type == layout_interleave_shortblock)
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile, filename,
|
||||
vgmstream->interleave_block_size);
|
||||
else if (vgmstream->layout_type == layout_interleave)
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile, filename,
|
||||
STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
else
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile, filename,
|
||||
0x1000);
|
||||
vgmstream->sample_rate = read_32bit(info_offset + 0x0C, streamFile);
|
||||
if (nsmbu_flag)
|
||||
vgmstream->sample_rate = 16000;
|
||||
|
||||
if (!vgmstream->ch[i].streamfile) goto fail;
|
||||
vgmstream->num_samples = read_32bit(info_offset + 0x14, streamFile);
|
||||
vgmstream->loop_start_sample = read_32bit(info_offset + 0x10, streamFile);
|
||||
vgmstream->loop_end_sample = vgmstream->num_samples;
|
||||
|
||||
vgmstream->ch[i].channel_start_offset =
|
||||
vgmstream->ch[i].offset =
|
||||
start_offset + i*vgmstream->interleave_block_size;
|
||||
}
|
||||
}
|
||||
vgmstream->meta_type = meta_FWAV;
|
||||
vgmstream->layout_type = (channel_count == 1) ? layout_none : layout_interleave;
|
||||
vgmstream->interleave_block_size = interleave;
|
||||
|
||||
return vgmstream;
|
||||
switch (codec) {
|
||||
case 0x00:
|
||||
vgmstream->coding_type = coding_PCM8;
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
vgmstream->coding_type = big_endian ? coding_PCM16BE : coding_PCM16LE;
|
||||
break;
|
||||
|
||||
case 0x02:
|
||||
vgmstream->coding_type = coding_NGC_DSP;
|
||||
{
|
||||
int i, c;
|
||||
off_t coef_header, coef_offset;
|
||||
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
for (c = 0; c < 16; c++) {
|
||||
coef_header = info_offset + 0x1C + read_32bit(info_offset + 0x24 + (i*0x08), streamFile);
|
||||
coef_offset = read_32bit(coef_header + 0x0c, streamFile) + coef_header;
|
||||
vgmstream->ch[i].adpcm_coef[c] = read_16bit(coef_offset + c*2, streamFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default: /* 0x03: IMA? */
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
return vgmstream;
|
||||
|
||||
/* clean up anything we may have opened */
|
||||
fail:
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ static STREAMFILE* setup_bgw_atrac3_streamfile(STREAMFILE *streamFile, off_t sub
|
|||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
new_streamFile = open_io_streamfile(temp_streamFile, &io_data,io_data_size, bgw_decryption_read);
|
||||
new_streamFile = open_io_streamfile(temp_streamFile, &io_data,io_data_size, bgw_decryption_read,NULL);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
|
|
|
@ -91,10 +91,7 @@ VGMSTREAM * init_vgmstream_brstm(STREAMFILE *streamFile) {
|
|||
vgmstream->loop_end_sample = vgmstream->num_samples;
|
||||
|
||||
vgmstream->coding_type = coding_type;
|
||||
if (channel_count==1)
|
||||
vgmstream->layout_type = layout_none;
|
||||
else
|
||||
vgmstream->layout_type = layout_interleave_shortblock;
|
||||
vgmstream->layout_type = (channel_count == 1) ? layout_none : layout_interleave;
|
||||
vgmstream->meta_type = meta_RSTM;
|
||||
if (atlus_shrunken_head)
|
||||
vgmstream->meta_type = meta_RSTM_shrunken;
|
||||
|
@ -105,7 +102,7 @@ VGMSTREAM * init_vgmstream_brstm(STREAMFILE *streamFile) {
|
|||
}
|
||||
|
||||
vgmstream->interleave_block_size = read_32bitBE(head_offset+0x38,streamFile);
|
||||
vgmstream->interleave_smallblock_size = read_32bitBE(head_offset+0x48,streamFile);
|
||||
vgmstream->interleave_last_block_size = read_32bitBE(head_offset+0x48,streamFile);
|
||||
|
||||
if (vgmstream->coding_type == coding_NGC_DSP) {
|
||||
off_t coef_offset;
|
||||
|
@ -139,12 +136,7 @@ VGMSTREAM * init_vgmstream_brstm(STREAMFILE *streamFile) {
|
|||
{
|
||||
int i;
|
||||
for (i=0;i<channel_count;i++) {
|
||||
if (vgmstream->layout_type==layout_interleave_shortblock)
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,
|
||||
vgmstream->interleave_block_size);
|
||||
else
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,
|
||||
0x1000);
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
|
||||
if (!vgmstream->ch[i].streamfile) goto fail;
|
||||
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
#include "meta.h"
|
||||
#include "../layout/layout.h"
|
||||
#include "../util.h"
|
||||
|
||||
/* CAF - from tri-Crescendo games [Baten Kaitos 1/2 (GC), Fragile (Wii)] */
|
||||
VGMSTREAM * init_vgmstream_caf(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset, offset;
|
||||
size_t file_size;
|
||||
int channel_count, loop_flag;
|
||||
int32_t num_samples = 0;
|
||||
uint32_t loop_start = -1;
|
||||
|
||||
|
||||
/* checks */
|
||||
/* .caf: header id, .cfn: fake extension? , "" is accepted as files don't have extensions in the disc */
|
||||
if (!check_extensions(streamFile,"caf,cfn,"))
|
||||
goto fail;
|
||||
if (read_32bitBE(0x00,streamFile) != 0x43414620) /* "CAF " */
|
||||
goto fail;
|
||||
|
||||
/* get total samples */
|
||||
offset = 0;
|
||||
file_size = get_streamfile_size(streamFile);
|
||||
while (offset < file_size) {
|
||||
off_t next_block = read_32bitBE(offset+0x04,streamFile);
|
||||
num_samples += read_32bitBE(offset+0x14,streamFile)/8*14;
|
||||
|
||||
if(read_32bitBE(offset+0x20,streamFile)==read_32bitBE(offset+0x08,streamFile)) {
|
||||
loop_start = num_samples - read_32bitBE(offset+0x14,streamFile)/8*14;
|
||||
}
|
||||
offset += next_block;
|
||||
}
|
||||
|
||||
start_offset = 0x00;
|
||||
channel_count = 2; /* always stereo */
|
||||
loop_flag = (loop_start!=-1);
|
||||
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->sample_rate = 32000;
|
||||
vgmstream->num_samples = num_samples;
|
||||
if (loop_flag) {
|
||||
vgmstream->loop_start_sample = loop_start;
|
||||
vgmstream->loop_end_sample = num_samples;
|
||||
}
|
||||
|
||||
vgmstream->meta_type = meta_CAF;
|
||||
vgmstream->coding_type = coding_NGC_DSP;
|
||||
vgmstream->layout_type = layout_blocked_caf;
|
||||
|
||||
if ( !vgmstream_open_stream(vgmstream,streamFile,start_offset) )
|
||||
goto fail;
|
||||
|
||||
block_update_caf(start_offset,vgmstream);
|
||||
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
|
@ -92,7 +92,7 @@ VGMSTREAM * init_vgmstream_dc_dcsw_dcs(STREAMFILE *streamFile) {
|
|||
vgmstream->interleave_block_size = 0x4000;
|
||||
}
|
||||
|
||||
vgmstream->coding_type = coding_AICA;
|
||||
vgmstream->coding_type = coding_AICA_int;
|
||||
vgmstream->meta_type = meta_DC_DCSW_DCS;
|
||||
|
||||
/* open the file for reading by each channel */
|
||||
|
|
|
@ -5,9 +5,12 @@
|
|||
VGMSTREAM * init_vgmstream_dc_idvi(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset;
|
||||
size_t data_size;
|
||||
int loop_flag, channel_count;
|
||||
|
||||
/* check extension (.dvi: original, .idvi: renamed to header id) */
|
||||
|
||||
/* checks*/
|
||||
/* .dvi: original, .idvi: renamed to header id */
|
||||
if ( !check_extensions(streamFile,"dvi,idvi") )
|
||||
goto fail;
|
||||
|
||||
|
@ -18,28 +21,24 @@ VGMSTREAM * init_vgmstream_dc_idvi(STREAMFILE *streamFile) {
|
|||
loop_flag = (read_32bitLE(0x0C,streamFile) != 0);
|
||||
channel_count = read_32bitLE(0x04,streamFile); /* always 2? */
|
||||
start_offset = 0x800;
|
||||
data_size = get_streamfile_size(streamFile) - start_offset;
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitLE(0x08,streamFile);
|
||||
vgmstream->num_samples = ima_bytes_to_samples(get_streamfile_size(streamFile) - start_offset, channel_count);
|
||||
vgmstream->num_samples = ima_bytes_to_samples(data_size, channel_count);
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x0C,streamFile);
|
||||
vgmstream->loop_end_sample = ima_bytes_to_samples(get_streamfile_size(streamFile) - start_offset, channel_count);
|
||||
vgmstream->loop_end_sample = vgmstream->num_samples;
|
||||
|
||||
vgmstream->coding_type = coding_DVI_IMA_int;
|
||||
vgmstream->meta_type = meta_DC_IDVI;
|
||||
|
||||
/* Calculating the short block... */
|
||||
if (channel_count > 1) {
|
||||
vgmstream->interleave_block_size = 0x400;
|
||||
vgmstream->interleave_smallblock_size = ((get_streamfile_size(streamFile)-start_offset)%(vgmstream->channels*vgmstream->interleave_block_size))/vgmstream->channels;
|
||||
vgmstream->layout_type = layout_interleave_shortblock;
|
||||
} else {
|
||||
vgmstream->layout_type = layout_none;
|
||||
}
|
||||
vgmstream->coding_type = coding_DVI_IMA_int;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = 0x400;
|
||||
if (vgmstream->interleave_block_size)
|
||||
vgmstream->interleave_last_block_size = (data_size % (vgmstream->interleave_block_size*vgmstream->channels)) / vgmstream->channels;
|
||||
|
||||
/* open the file for reading */
|
||||
if ( !vgmstream_open_stream(vgmstream, streamFile, start_offset) )
|
||||
|
|
|
@ -39,7 +39,7 @@ VGMSTREAM * init_vgmstream_dc_str(STREAMFILE *streamFile) {
|
|||
/* fill in the vital statistics */
|
||||
switch (samples) {
|
||||
case 4:
|
||||
vgmstream->coding_type = coding_AICA;
|
||||
vgmstream->coding_type = coding_AICA_int;
|
||||
vgmstream->num_samples = read_32bitLE(0x14,streamFile);
|
||||
if (loop_flag) {
|
||||
vgmstream->loop_start_sample = 0;
|
||||
|
|
|
@ -103,23 +103,23 @@ static int get_falcom_looping(STREAMFILE *streamFile, int *out_loop_start, int *
|
|||
|
||||
|
||||
/* try one of the many loop files */
|
||||
if ((streamText = open_stream_name(streamFile,"bgm.tbl")) != NULL) {
|
||||
if ((streamText = open_streamfile_by_filename(streamFile,"bgm.tbl")) != NULL) {
|
||||
type = XANADU_NEXT;
|
||||
}
|
||||
else if ((streamText = open_stream_name(streamFile,"bgm.scr")) != NULL) {
|
||||
else if ((streamText = open_streamfile_by_filename(streamFile,"bgm.scr")) != NULL) {
|
||||
type = ZWEI;
|
||||
}
|
||||
else if ((streamText = open_stream_name(streamFile,"loop.txt")) != NULL) { /* actual name in Shift JIS, 0x838B815B8376 */
|
||||
else if ((streamText = open_streamfile_by_filename(streamFile,"loop.txt")) != NULL) { /* actual name in Shift JIS, 0x838B815B8376 */
|
||||
type = DINOSAUR_RESURRECTION;
|
||||
}
|
||||
else if ((streamText = open_stream_name(streamFile,"map.itm")) != NULL) {
|
||||
else if ((streamText = open_streamfile_by_filename(streamFile,"map.itm")) != NULL) {
|
||||
type = GURUMIN;
|
||||
}
|
||||
else {
|
||||
goto end;
|
||||
}
|
||||
|
||||
get_streamfile_name(streamFile,filename,TXT_LINE_MAX);
|
||||
get_streamfile_filename(streamFile,filename,TXT_LINE_MAX);
|
||||
|
||||
/* read line by line */
|
||||
while (txt_offset < get_streamfile_size(streamText)) {
|
||||
|
|
|
@ -35,7 +35,7 @@ VGMSTREAM * init_vgmstream_dsp_bdsp(STREAMFILE *streamFile) {
|
|||
#endif
|
||||
|
||||
|
||||
vgmstream->layout_type = layout_dsp_bdsp_blocked;
|
||||
vgmstream->layout_type = layout_blocked_bdsp;
|
||||
vgmstream->interleave_block_size = 0x8;
|
||||
vgmstream->meta_type = meta_DSP_BDSP;
|
||||
|
||||
|
@ -64,17 +64,17 @@ VGMSTREAM * init_vgmstream_dsp_bdsp(STREAMFILE *streamFile) {
|
|||
|
||||
/* Calc num_samples */
|
||||
start_offset = 0x0;
|
||||
dsp_bdsp_block_update(start_offset,vgmstream);
|
||||
block_update_bdsp(start_offset,vgmstream);
|
||||
vgmstream->num_samples=0;
|
||||
|
||||
do
|
||||
{
|
||||
vgmstream->num_samples += vgmstream->current_block_size*14/8;
|
||||
dsp_bdsp_block_update(vgmstream->next_block_offset,vgmstream);
|
||||
block_update_bdsp(vgmstream->next_block_offset,vgmstream);
|
||||
}
|
||||
while (vgmstream->next_block_offset<get_streamfile_size(streamFile));
|
||||
|
||||
dsp_bdsp_block_update(start_offset,vgmstream);
|
||||
block_update_bdsp(start_offset,vgmstream);
|
||||
|
||||
|
||||
return vgmstream;
|
||||
|
|
|
@ -35,11 +35,11 @@ VGMSTREAM * init_vgmstream_ea_1snh(STREAMFILE *streamFile) {
|
|||
ea_header ea = {0};
|
||||
|
||||
|
||||
/* check extension (.asf/as4: common, cnk: some PS games) */
|
||||
if (!check_extensions(streamFile,"asf,as4,cnk"))
|
||||
/* checks */
|
||||
/* .asf/as4: common, cnk: some PS games, .sng: fake for plugins (to mimic EA SCHl's common extension) */
|
||||
if (!check_extensions(streamFile,"asf,as4,cnk,sng"))
|
||||
goto fail;
|
||||
|
||||
/* check header (first block) */
|
||||
if (read_32bitBE(0x00,streamFile) != 0x31534E68 && /* "1SNh" */
|
||||
read_32bitBE(0x00,streamFile) != 0x53454144) /* "SEAD" */
|
||||
goto fail;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "meta.h"
|
||||
#include "../layout/layout.h"
|
||||
#include "../coding/coding.h"
|
||||
#include "ea_eaac_streamfile.h"
|
||||
|
||||
/* EAAudioCore formats, EA's current audio middleware */
|
||||
|
||||
|
@ -29,7 +30,7 @@ VGMSTREAM * init_vgmstream_ea_snr_sns(STREAMFILE * streamFile) {
|
|||
if (!vgmstream) goto fail;
|
||||
}
|
||||
else {
|
||||
streamData = open_stream_ext(streamFile,"sns");
|
||||
streamData = open_streamfile_by_ext(streamFile,"sns");
|
||||
if (!streamData) goto fail;
|
||||
|
||||
vgmstream = init_vgmstream_eaaudiocore_header(streamFile, streamData, 0x00, 0x00, meta_EA_SNR_SNS);
|
||||
|
@ -107,6 +108,48 @@ fail:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* .SPS? - from Frostbite engine games? [Need for Speed Rivals (PS4)], v1 header */
|
||||
VGMSTREAM * init_vgmstream_ea_sps_fb(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset = 0, header_offset = 0, sps_offset, max_offset;
|
||||
|
||||
/* checks */
|
||||
/* assumed to be .sps (no extensions in the archives) */
|
||||
if (!check_extensions(streamFile,"sps"))
|
||||
goto fail;
|
||||
if (read_32bitBE(0x00,streamFile) != 0x011006C0)
|
||||
goto fail;
|
||||
|
||||
|
||||
/* file has some kind of data before .sps, exact offset unknown.
|
||||
* Actual offsets are probably somewhere but for now just manually search. */
|
||||
sps_offset = read_32bitBE(0x08, streamFile); /* points to some kind of table, number of entries unknown */
|
||||
max_offset = sps_offset + 0x3000;
|
||||
if (max_offset > get_streamfile_size(streamFile))
|
||||
max_offset = get_streamfile_size(streamFile);
|
||||
|
||||
/* find .sps start block */
|
||||
while (sps_offset < max_offset) {
|
||||
if ((read_32bitBE(sps_offset, streamFile) & 0xFFFFFF00) == 0x48000000) {
|
||||
header_offset = sps_offset + 0x04;
|
||||
start_offset = sps_offset + (read_32bitBE(sps_offset, streamFile) & 0x00FFFFFF);
|
||||
break;
|
||||
}
|
||||
sps_offset += 0x04;
|
||||
}
|
||||
|
||||
if (!start_offset)
|
||||
goto fail; /* not found */
|
||||
|
||||
vgmstream = init_vgmstream_eaaudiocore_header(streamFile, streamFile, header_offset, start_offset, meta_EA_SPS);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* EA newest header from RwAudioCore (RenderWare?) / EAAudioCore library (still generated by sx.exe).
|
||||
* Audio "assets" come in separate RAM headers (.SNR/SPH) and raw blocked streams (.SNS/SPS),
|
||||
|
@ -114,28 +157,30 @@ fail:
|
|||
* Some .SNR include stream data, while .SPS have headers so .SPH is optional. */
|
||||
static VGMSTREAM * init_vgmstream_eaaudiocore_header(STREAMFILE * streamHead, STREAMFILE * streamData, off_t header_offset, off_t start_offset, meta_t meta_type) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
STREAMFILE* temp_streamFile = NULL;
|
||||
int channel_count, loop_flag = 0, version, codec, channel_config, sample_rate, flags;
|
||||
uint32_t num_samples, loop_start = 0, loop_end = 0;
|
||||
|
||||
/* EA SNR/SPH header */
|
||||
version = (read_8bit(header_offset + 0x00,streamHead) >> 4) & 0xf;
|
||||
codec = (read_8bit(header_offset + 0x00,streamHead) >> 0) & 0xf;
|
||||
channel_config = read_8bit(header_offset + 0x01,streamHead);
|
||||
sample_rate = (uint16_t)read_16bitBE(header_offset + 0x02,streamHead);
|
||||
flags = (uint8_t)read_8bit(header_offset + 0x04,streamHead); /* upper nibble only? */
|
||||
num_samples = (uint32_t)read_32bitBE(header_offset + 0x04,streamHead) & 0x00FFFFFF;
|
||||
version = (read_8bit(header_offset + 0x00,streamHead) >> 4) & 0x0F;
|
||||
codec = (read_8bit(header_offset + 0x00,streamHead) >> 0) & 0x0F;
|
||||
channel_config = read_8bit(header_offset + 0x01,streamHead) & 0xFE;
|
||||
sample_rate = read_32bitBE(header_offset + 0x00,streamHead) & 0x1FFFF; /* some Dead Space 2 (PC) uses 96000 */
|
||||
flags = (uint8_t)read_8bit(header_offset + 0x04,streamHead) & 0xFE; //todo upper nibble only? (the first bit is part of size)
|
||||
num_samples = (uint32_t)read_32bitBE(header_offset + 0x04,streamHead) & 0x01FFFFFF;
|
||||
/* rest is optional, depends on flags header used (ex. SNU and SPS may have bigger headers):
|
||||
* &0x20: 1 int (usually 0x00), &0x00/40: nothing, &0x60: 2 ints (usually 0x00 and 0x14) */
|
||||
|
||||
/* V0: SNR+SNS, V1: SPR+SPS (not apparent differences) */
|
||||
/* V0: SNR+SNS, V1: SPR+SPS (not apparent differences, other than the block flags used) */
|
||||
if (version != 0 && version != 1) {
|
||||
VGM_LOG("EA SNS/SPS: unknown version\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* 0x40: stream asset, 0x20: full loop, 0x00: default/RAM asset, 0x01: loop? */
|
||||
/* 0x40: stream asset, 0x20: full loop, 0x00: default/RAM asset */
|
||||
if (flags != 0x60 && flags != 0x40 && flags != 0x20 && flags != 0x00) {
|
||||
VGM_LOG("EA SNS/SPS: unknown flag 0x%02x\n", flags);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* seen in sfx and Dead Space ambient tracks */
|
||||
|
@ -216,14 +261,20 @@ static VGMSTREAM * init_vgmstream_eaaudiocore_header(STREAMFILE * streamHead, ST
|
|||
case 0x06: /* "L32P": EALayer3 v2 "PCM" [Battlefield 1943 (PS3)] */
|
||||
case 0x07: { /* "L32S": EALayer3 v2 "Spike" [Dante's Inferno (PS3)] */
|
||||
mpeg_custom_config cfg = {0};
|
||||
off_t mpeg_start_offset = start_offset + 0x08;
|
||||
mpeg_custom_t type = (codec == 0x05 ? MPEG_EAL31b : (codec == 0x06) ? MPEG_EAL32P : MPEG_EAL32S);
|
||||
|
||||
/* layout is still blocks, but should work fine with the custom mpeg decoder */
|
||||
vgmstream->codec_data = init_mpeg_custom(streamData, mpeg_start_offset, &vgmstream->coding_type, vgmstream->channels, type, &cfg);
|
||||
if (!vgmstream->codec_data) goto fail;
|
||||
/* remove blocks on reads for some edge cases in L32P and to properly apply discard modes
|
||||
* (otherwise, and removing discards, it'd work with layout_blocked_ea_sns) */
|
||||
temp_streamFile = setup_eaac_streamfile(streamData, version, codec, start_offset, 0);
|
||||
if (!temp_streamFile) goto fail;
|
||||
|
||||
start_offset = 0x00; /* must point to the custom streamfile's beginning */
|
||||
|
||||
/* layout is still blocks, but should work fine with the custom mpeg decoder */
|
||||
vgmstream->codec_data = init_mpeg_custom(temp_streamFile, start_offset, &vgmstream->coding_type, vgmstream->channels, type, &cfg);
|
||||
if (!vgmstream->codec_data) goto fail;
|
||||
vgmstream->layout_type = layout_none;
|
||||
|
||||
vgmstream->layout_type = layout_blocked_ea_sns;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -234,22 +285,28 @@ static VGMSTREAM * init_vgmstream_eaaudiocore_header(STREAMFILE * streamHead, ST
|
|||
/* DSP coefs are read in the blocks */
|
||||
break;
|
||||
|
||||
#if 0 //todo buffered ATRAC9
|
||||
#ifdef VGM_USE_ATRAC9
|
||||
case 0x0a: { /* EATrax */
|
||||
atrac9_config cfg = {0};
|
||||
size_t total_size;
|
||||
|
||||
cfg.channels = vgmstream->channels;
|
||||
cfg.config_data = read_32bitBE(header_offset + 0x08,streamHead);
|
||||
/* 0x0c: data size without blocks?, 0x10: frame size? (same as config data?) */
|
||||
/* 0x10: frame size? (same as config data?) */
|
||||
total_size = read_32bitLE(header_offset + 0x0c,streamHead); /* actual data size without blocks, LE b/c why make sense */
|
||||
|
||||
vgmstream->codec_data = init_atrac9(&cfg);
|
||||
if (!vgmstream->codec_data) goto fail;
|
||||
vgmstream->coding_type = coding_ATRAC9;
|
||||
vgmstream->layout_type = layout_blocked_ea_sns;
|
||||
vgmstream->layout_type = layout_none;
|
||||
|
||||
/* EATrax is "buffered" ATRAC9, uses custom IO since it's kind of complex to add to the decoder */
|
||||
temp_streamFile = setup_eaac_streamfile(streamData, version, codec, start_offset, total_size);
|
||||
if (!temp_streamFile) goto fail;
|
||||
|
||||
start_offset = 0x00; /* must point to the custom streamfile's beginning */
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
case 0x00: /* "NONE" (internal 'codec not set' flag) */
|
||||
|
@ -266,16 +323,17 @@ static VGMSTREAM * init_vgmstream_eaaudiocore_header(STREAMFILE * streamHead, ST
|
|||
}
|
||||
|
||||
|
||||
/* open the file for reading by each channel */
|
||||
if (!vgmstream_open_stream(vgmstream,streamData,start_offset))
|
||||
if (!vgmstream_open_stream(vgmstream,temp_streamFile ? temp_streamFile : streamData,start_offset))
|
||||
goto fail;
|
||||
|
||||
if (vgmstream->layout_type == layout_blocked_ea_sns)
|
||||
block_update_ea_sns(start_offset, vgmstream);
|
||||
|
||||
close_streamfile(temp_streamFile);
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
close_streamfile(temp_streamFile);
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,218 @@
|
|||
#ifndef _EA_EAAC_STREAMFILE_H_
|
||||
#define _EA_EAAC_STREAMFILE_H_
|
||||
#include "../streamfile.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* state */
|
||||
off_t logical_offset; /* offset that corresponds to physical_offset */
|
||||
off_t physical_offset; /* actual file offset */
|
||||
|
||||
/* config */
|
||||
int version;
|
||||
int codec;
|
||||
off_t start_offset;
|
||||
size_t total_size; /* size of the resulting substream */
|
||||
} eaac_io_data;
|
||||
|
||||
|
||||
/* Reads skipping EA's block headers, so the resulting data is smaller or larger than physical data.
|
||||
* physical/logical_offset should always be at the start of a block and only advance when a block is fully done */
|
||||
static size_t eaac_io_read(STREAMFILE *streamfile, uint8_t *dest, off_t offset, size_t length, eaac_io_data* data) {
|
||||
size_t total_read = 0;
|
||||
|
||||
/* ignore bad reads */
|
||||
if (offset < 0 || offset > data->total_size) {
|
||||
return total_read;
|
||||
}
|
||||
|
||||
/* previous offset: re-start as we can't map logical<>physical offsets
|
||||
* (kinda slow as it trashes buffers, but shouldn't happen often) */
|
||||
if (offset < data->logical_offset) {
|
||||
data->physical_offset = data->start_offset;
|
||||
data->logical_offset = 0x00;
|
||||
}
|
||||
|
||||
/* read doing one EA block at a time */
|
||||
while (length > 0) {
|
||||
size_t to_read, bytes_read;
|
||||
off_t intrablock_offset, intradata_offset;
|
||||
uint32_t block_flag, block_size, data_size, skip_size;
|
||||
|
||||
block_flag = read_8bit(data->physical_offset+0x00,streamfile);
|
||||
block_size = read_32bitBE(data->physical_offset+0x00,streamfile) & 0x00FFFFFF;
|
||||
|
||||
if (data->version == 1 && block_flag == 0x48) {
|
||||
data->physical_offset += block_size;
|
||||
continue; /* skip header block */
|
||||
}
|
||||
if (data->version == 1 && block_flag == 0x45)
|
||||
return total_read; /* stop on last block (always empty) */
|
||||
|
||||
switch(data->codec) {
|
||||
#if 0
|
||||
case 0x03:
|
||||
data_size = block_size - ???;
|
||||
extra_size = (data_size % 0x800); /* deflated padding */
|
||||
|
||||
|
||||
skip_size = 0x08 + 0x04*data->stream_count;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 0x05: /* EALayer3 v1 */
|
||||
case 0x06: /* EALayer3 v2 "PCM" */
|
||||
case 0x07: /* EALayer3 v2 "Spike" */
|
||||
data_size = block_size - 0x08;
|
||||
skip_size = 0x08;
|
||||
break;
|
||||
|
||||
case 0x0a: /* EATrax */
|
||||
data_size = read_32bitBE(data->physical_offset+0x04,streamfile); /* should be block_size - 0x08 */
|
||||
skip_size = 0x08;
|
||||
break;
|
||||
|
||||
default:
|
||||
return total_read;
|
||||
}
|
||||
|
||||
/* requested offset is outside current block, try next */
|
||||
if (offset >= data->logical_offset + data_size) {
|
||||
data->physical_offset += block_size;
|
||||
data->logical_offset += data_size;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* reads could fall in the middle of the block */
|
||||
intradata_offset = offset - data->logical_offset;
|
||||
intrablock_offset = skip_size + intradata_offset;
|
||||
|
||||
/* clamp reads up to this block's end */
|
||||
to_read = (data_size - intradata_offset);
|
||||
if (to_read > length)
|
||||
to_read = length;
|
||||
if (to_read == 0)
|
||||
return total_read; /* should never happen... */
|
||||
|
||||
/* finally read and move buffer/offsets */
|
||||
bytes_read = read_streamfile(dest, data->physical_offset + intrablock_offset, to_read, streamfile);
|
||||
total_read += bytes_read;
|
||||
if (bytes_read != to_read)
|
||||
return total_read; /* couldn't read fully */
|
||||
|
||||
dest += bytes_read;
|
||||
offset += bytes_read;
|
||||
length -= bytes_read;
|
||||
|
||||
/* block fully read, go next */
|
||||
if (intradata_offset + bytes_read == data_size) {
|
||||
data->physical_offset += block_size;
|
||||
data->logical_offset += data_size;
|
||||
}
|
||||
|
||||
if (data->version == 0 && block_flag == 0x80)
|
||||
break; /* stop on last block */
|
||||
}
|
||||
|
||||
return total_read;
|
||||
}
|
||||
|
||||
static size_t eaac_io_size(STREAMFILE *streamfile, eaac_io_data* data) {
|
||||
off_t physical_offset, max_physical_offset;
|
||||
size_t total_size = 0;
|
||||
|
||||
if (data->total_size)
|
||||
return data->total_size;
|
||||
|
||||
physical_offset = data->start_offset;
|
||||
max_physical_offset = get_streamfile_size(streamfile) - data->start_offset;
|
||||
|
||||
/* get size of the underlying, non-blocked data */
|
||||
while (physical_offset < max_physical_offset) {
|
||||
uint32_t block_flag, block_size, data_size;
|
||||
|
||||
block_flag = read_8bit(physical_offset+0x00,streamfile);
|
||||
block_size = read_32bitBE(physical_offset+0x00,streamfile) & 0x00FFFFFF;
|
||||
|
||||
if (data->version == 0 && block_flag != 0x00 && block_flag != 0x80)
|
||||
break; /* data/end block expected */
|
||||
|
||||
if (data->version == 1 && block_flag == 0x48) {
|
||||
physical_offset += block_size;
|
||||
continue; /* skip header block */
|
||||
}
|
||||
if (data->version == 1 && block_flag == 0x45)
|
||||
break; /* stop on last block (always empty) */
|
||||
if (data->version == 1 && block_flag != 0x44)
|
||||
break; /* data block expected */
|
||||
|
||||
switch(data->codec) {
|
||||
#if 0
|
||||
case 0x03:
|
||||
data_size = block_size - ???;
|
||||
data_size += (data_size % 0x800); /* deflated padding */
|
||||
break;
|
||||
#endif
|
||||
case 0x05: /* EALayer3 v1 */
|
||||
case 0x06: /* EALayer3 v2 "PCM" */
|
||||
case 0x07: /* EALayer3 v2 "Spike" */
|
||||
data_size = block_size - 0x08;
|
||||
break;
|
||||
|
||||
case 0x0a: /* EATrax */
|
||||
data_size = read_32bitBE(physical_offset+0x04,streamfile); /* should be block_size - 0x08 */
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
physical_offset += block_size;
|
||||
total_size += data_size;
|
||||
|
||||
if (data->version == 0 && block_flag == 0x80)
|
||||
break; /* stop on last block */
|
||||
}
|
||||
|
||||
data->total_size = total_size;
|
||||
return data->total_size;
|
||||
}
|
||||
|
||||
|
||||
/* Prepares custom IO for some blocked EAAudioCore formats, that need clean reads without block headers:
|
||||
* - EA-XMA: deflated XMA in multistreams (separate 2ch frames)
|
||||
* - EALayer3: MPEG granule 1 can go in the next block (in V2"P" mainly, others could use layout blocked_sns)
|
||||
* - EATrax: ATRAC9 frames can be split between blooks
|
||||
*/
|
||||
static STREAMFILE* setup_eaac_streamfile(STREAMFILE *streamFile, int version, int codec, off_t start_offset, size_t total_size) {
|
||||
STREAMFILE *temp_streamFile = NULL, *new_streamFile = NULL;
|
||||
eaac_io_data io_data = {0};
|
||||
size_t io_data_size = sizeof(eaac_io_data);
|
||||
|
||||
io_data.version = version;
|
||||
io_data.codec = codec;
|
||||
io_data.start_offset = start_offset;
|
||||
io_data.total_size = total_size; /* optional */
|
||||
io_data.physical_offset = start_offset;
|
||||
|
||||
/* setup subfile */
|
||||
new_streamFile = open_wrap_streamfile(streamFile);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
new_streamFile = open_io_streamfile(temp_streamFile, &io_data,io_data_size, eaac_io_read,eaac_io_size);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
new_streamFile = open_buffer_streamfile(new_streamFile,0);
|
||||
if (!new_streamFile) goto fail;
|
||||
temp_streamFile = new_streamFile;
|
||||
|
||||
return temp_streamFile;
|
||||
|
||||
fail:
|
||||
close_streamfile(temp_streamFile);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* _EA_EAAC_STREAMFILE_H_ */
|
|
@ -82,21 +82,22 @@ static VGMSTREAM * init_vgmstream_ea_variable_header(STREAMFILE *streamFile, ea_
|
|||
VGMSTREAM * init_vgmstream_ea_schl(STREAMFILE *streamFile) {
|
||||
off_t start_offset, header_offset;
|
||||
size_t header_size;
|
||||
ea_header ea;
|
||||
ea_header ea = {0};
|
||||
|
||||
|
||||
/* check extension; exts don't seem enforced by EA's tools, but usually:
|
||||
* STR/ASF/MUS ~early, EAM ~mid, SNG/AUD ~late, rest uncommon/one game (ex. STRM: MySims Kingdom Wii) */
|
||||
if (!check_extensions(streamFile,"str,asf,mus,eam,sng,aud,sx,strm,xa,xsf,exa,stm,ast"))
|
||||
if (!check_extensions(streamFile,"str,asf,mus,eam,sng,aud,sx,strm,xa,xsf,exa,stm,ast,trj,trm"))
|
||||
goto fail;
|
||||
|
||||
/* check header */
|
||||
if (read_32bitBE(0x00,streamFile) != 0x5343486C && /* "SCHl" */
|
||||
read_32bitBE(0x00,streamFile) != 0x5348454E) /* "SHEN" */
|
||||
read_32bitBE(0x00,streamFile) != 0x5348454E && /* "SHEN" */
|
||||
read_32bitBE(0x00,streamFile) != 0x53484652) /* "SHFR" */
|
||||
goto fail;
|
||||
|
||||
/* stream is divided into blocks/chunks: SCHl=audio header, SCCl=count of SCDl, SCDl=data xN, SCLl=loop end, SCEl=end.
|
||||
* Video uses various blocks (MVhd/MV0K/etc) and sometimes alt audio blocks (SHEN/SDEN/SEEN).
|
||||
* Video uses various blocks (MVhd/MV0K/etc) and sometimes alt audio blocks (SHxx/SCxx/SDxx/SExx where XX=language, EN/FR).
|
||||
* The number/size is affected by: block rate setting, sample rate, channels, CPU location (SPU/main/DSP/others), etc */
|
||||
|
||||
header_size = read_32bitLE(0x04,streamFile);
|
||||
|
@ -120,7 +121,7 @@ fail:
|
|||
VGMSTREAM * init_vgmstream_ea_bnk(STREAMFILE *streamFile) {
|
||||
off_t start_offset, header_offset, offset, table_offset;
|
||||
size_t header_size;
|
||||
ea_header ea;
|
||||
ea_header ea = {0};
|
||||
int32_t (*read_32bit)(off_t,STREAMFILE*) = NULL;
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = NULL;
|
||||
int i, bnk_version;
|
||||
|
@ -284,7 +285,11 @@ static VGMSTREAM * init_vgmstream_ea_variable_header(STREAMFILE *streamFile, ea_
|
|||
break;
|
||||
|
||||
case EA_CODEC2_S16LE: /* PCM16LE */
|
||||
vgmstream->coding_type = coding_PCM16LE;
|
||||
if (ea->version > 0) {
|
||||
vgmstream->coding_type = coding_PCM16LE;
|
||||
} else { /* Need for Speed III: Hot Pursuit (PC) */
|
||||
vgmstream->coding_type = coding_PCM16_int;
|
||||
}
|
||||
break;
|
||||
|
||||
case EA_CODEC2_VAG: /* PS-ADPCM */
|
||||
|
@ -449,7 +454,6 @@ static int parse_variable_header(STREAMFILE* streamFile, ea_header* ea, off_t be
|
|||
uint32_t platform_id;
|
||||
int is_header_end = 0;
|
||||
|
||||
memset(ea,0,sizeof(ea_header));
|
||||
|
||||
/* null defaults as 0 can be valid */
|
||||
ea->version = EA_VERSION_NONE;
|
||||
|
@ -467,7 +471,7 @@ static int parse_variable_header(STREAMFILE* streamFile, ea_header* ea, off_t be
|
|||
offset += 4 + 4; /* GSTRs have an extra field (config?): ex. 0x01000000, 0x010000D8 BE */
|
||||
}
|
||||
else if ((platform_id & 0xFFFF0000) == 0x50540000) { /* "PT" = PlaTform */
|
||||
ea->platform = (uint8_t)read_16bitLE(offset + 2,streamFile);
|
||||
ea->platform = (uint16_t)read_16bitLE(offset + 2,streamFile);
|
||||
offset += 4;
|
||||
}
|
||||
else {
|
||||
|
@ -769,7 +773,7 @@ static int get_ea_stream_total_samples(STREAMFILE* streamFile, off_t start_offse
|
|||
|
||||
block_samples = 0;
|
||||
|
||||
if (id == 0x5343446C || id == 0x5344454E) { /* "SCDl" "SDEN" audio data */
|
||||
if (id == 0x5343446C || id == 0x5344454E || id == 0x53444652) { /* "SCDl" "SDEN" "SDFR" audio data */
|
||||
switch (ea->codec2) {
|
||||
case EA_CODEC2_VAG:
|
||||
block_samples = ps_bytes_to_samples(block_size-0x10, ea->channels);
|
||||
|
@ -785,7 +789,7 @@ static int get_ea_stream_total_samples(STREAMFILE* streamFile, off_t start_offse
|
|||
block_size = 0x04;
|
||||
}
|
||||
|
||||
if (id == 0x5343486C || id == 0x5348454E) { /* "SCHl" "SHEN" end block */
|
||||
if (id == 0x5343486C || id == 0x5348454E || id == 0x53484652) { /* "SCHl" "SHEN" "SHFR" end block */
|
||||
new_schl = 1;
|
||||
}
|
||||
}
|
||||
|
@ -800,8 +804,8 @@ static int get_ea_stream_total_samples(STREAMFILE* streamFile, off_t start_offse
|
|||
num_samples += block_samples;
|
||||
block_offset += block_size;
|
||||
|
||||
/* "SCEl" are aligned to 0x80 usually, but causes problems if not 32b-aligned (ex. Need for Speed 2 PC) */
|
||||
if ((id == 0x5343456C || id == 0x5345454E) && block_offset % 0x04) {
|
||||
/* "SCEl" "SEEN" "SEFR" are aligned to 0x80 usually, but causes problems if not 32b-aligned (ex. Need for Speed 2 PC) */
|
||||
if ((id == 0x5343456C || id == 0x5345454E || id == 0x53454652) && block_offset % 0x04) {
|
||||
VGM_LOG_ONCE("EA SCHl: mis-aligned end offset found\n");
|
||||
block_offset += 0x04 - (block_offset % 0x04);
|
||||
}
|
||||
|
@ -832,10 +836,10 @@ static off_t get_ea_stream_mpeg_start_offset(STREAMFILE* streamFile, off_t start
|
|||
if (block_size > 0x00F00000) /* size is always LE, except in early SAT/MAC */
|
||||
block_size = read_32bitBE(block_offset+0x04,streamFile);
|
||||
|
||||
if (id == 0x5343446C) { /* "SCDl" data block found */
|
||||
if (id == 0x5343446C || id == 0x5344454E || id == 0x53444652) { /* "SCDl/SDEN/SDFR" data block found */
|
||||
off_t offset = read_32bit(block_offset+0x0c,streamFile); /* first value seems ok, second is something else in EALayer3 */
|
||||
return block_offset + 0x0c + ea->channels*0x04 + offset;
|
||||
} else if (id == 0x5343436C) { /* "SCCl" data count found */
|
||||
} else if (id == 0x5343436C || id == 0x5343454E || id == 0x53434652) { /* "SCCl/SCEN/SCFR" data count found */
|
||||
block_offset += block_size; /* size includes header */
|
||||
continue;
|
||||
} else {
|
||||
|
|
|
@ -3,68 +3,151 @@
|
|||
#include "../coding/coding.h"
|
||||
|
||||
|
||||
/* SWVR - from EA games [Future Cop L.A.P.D. (PS/PC), Freekstyle (PS2/GC), EA Sports Supercross (PS)] */
|
||||
/* SWVR - from EA games, demuxed from .av/trk/mis/etc [Future Cop L.A.P.D. (PS/PC), Freekstyle (PS2/GC), EA Sports Supercross (PS)] */
|
||||
VGMSTREAM * init_vgmstream_ea_swvr(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset;
|
||||
int loop_flag = 0, channel_count;
|
||||
int big_endian;
|
||||
int loop_flag = 0, channel_count, sample_rate, big_endian;
|
||||
coding_t coding;
|
||||
uint32_t block_id;
|
||||
int32_t (*read_32bit)(off_t,STREAMFILE*) = NULL;
|
||||
int16_t (*read_16bit)(off_t,STREAMFILE*) = NULL;
|
||||
int total_subsongs, target_subsong = streamFile->stream_index;
|
||||
|
||||
|
||||
/* check extension */
|
||||
if (!check_extensions(streamFile,"str"))
|
||||
/* checks */
|
||||
/* .stream: common (found inside files), .str: shortened, probably unnecessary */
|
||||
if (!check_extensions(streamFile,"stream,str"))
|
||||
goto fail;
|
||||
|
||||
/* check header */
|
||||
if (read_32bitBE(0x00,streamFile) == 0x53575652) { /* "SWVR" (GC) */
|
||||
big_endian = 1;
|
||||
read_32bit = read_32bitBE;
|
||||
}
|
||||
else if (read_32bitBE(0x00,streamFile) == 0x52565753) { /* "RVWS" (PS/PS2) */
|
||||
/* blocks ids are in machine endianness */
|
||||
if (read_32bitBE(0x00,streamFile) == 0x52565753) { /* "RVWS" (PS1/PS2/PC) */
|
||||
big_endian = 0;
|
||||
read_32bit = read_32bitLE;
|
||||
read_16bit = read_16bitLE;
|
||||
start_offset = read_32bit(0x04, streamFile);
|
||||
}
|
||||
else if (read_32bitBE(0x00,streamFile) == 0x53575652) { /* "SWVR" (GC) */
|
||||
big_endian = 1;
|
||||
read_32bit = read_32bitBE;
|
||||
read_16bit = read_16bitBE;
|
||||
start_offset = read_32bit(0x04, streamFile);
|
||||
}
|
||||
else if (read_32bitBE(0x00,streamFile) == 0x4D474156) { /* "MGAV", Freekstyle (PS2) raw movies */
|
||||
big_endian = 0;
|
||||
read_32bit = read_32bitLE;
|
||||
read_16bit = read_16bitLE;
|
||||
start_offset = 0x00;
|
||||
}
|
||||
else if (read_32bitBE(0x00,streamFile) == 0x4453504D) { /* "DSPM", Freekstyle (GC) raw movies */
|
||||
big_endian = 1;
|
||||
read_32bit = read_32bitBE;
|
||||
read_16bit = read_16bitBE;
|
||||
start_offset = 0x00;
|
||||
}
|
||||
else {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
start_offset = read_32bit(0x04, streamFile);
|
||||
if (read_32bit(start_offset+0x00, streamFile) == 0x50414444) /* "PADD" (Freekstyle) */
|
||||
start_offset += read_32bit(start_offset+0x04, streamFile);
|
||||
else if (read_32bit(start_offset+0x10, streamFile) == 0x53484452) /* "SHDR" (Future Cop PC) */
|
||||
start_offset += read_32bit(start_offset+0x04, streamFile);
|
||||
|
||||
start_offset = read_32bit(0x04,streamFile);
|
||||
loop_flag = 1;
|
||||
channel_count = 2;
|
||||
total_subsongs = 1;
|
||||
block_id = read_32bit(start_offset, streamFile);
|
||||
|
||||
/* files are basically headerless so we inspect blocks the first block
|
||||
* Freekstyle uses multiblocks/subsongs (though some subsongs may be clones?) */
|
||||
switch(block_id) {
|
||||
case 0x5641474D: /* "VAGM" */
|
||||
coding = coding_PSX;
|
||||
if (read_16bit(start_offset+0x1a, streamFile) == 0x0024) {
|
||||
total_subsongs = read_32bit(start_offset+0x0c, streamFile)+1;
|
||||
sample_rate = 24000;
|
||||
}
|
||||
else {
|
||||
sample_rate = 14008;
|
||||
}
|
||||
channel_count = 2;
|
||||
break;
|
||||
case 0x56414742: /* "VAGB" */
|
||||
coding = coding_PSX;
|
||||
if (read_16bit(start_offset+0x1a, streamFile) == 0x6400) {
|
||||
sample_rate = 24000;
|
||||
}
|
||||
else {
|
||||
sample_rate = 14008;
|
||||
}
|
||||
channel_count = 1;
|
||||
break;
|
||||
case 0x4453504D: /* "DSPM" */
|
||||
coding = coding_NGC_DSP;
|
||||
total_subsongs = read_32bit(start_offset+0x0c, streamFile)+1;
|
||||
sample_rate = 24000;
|
||||
channel_count = 2;
|
||||
break;
|
||||
case 0x44535042: /* "DSPB" */
|
||||
coding = coding_NGC_DSP;
|
||||
channel_count = 1;
|
||||
sample_rate = 24000;
|
||||
break;
|
||||
case 0x4D534943: /* "MSIC" */
|
||||
coding = coding_PCM8_U_int;
|
||||
channel_count = 2;
|
||||
sample_rate = 14008;
|
||||
break;
|
||||
case 0x53484F43: /* "SHOC" (a generic block but hopefully has PC sounds) */
|
||||
coding = coding_PCM8_U_int;
|
||||
channel_count = 1;
|
||||
sample_rate = 14008;
|
||||
break;
|
||||
default:
|
||||
VGM_LOG("EA SWVR: unknown block id\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (target_subsong == 0) target_subsong = 1;
|
||||
if (target_subsong < 0 || target_subsong > total_subsongs || total_subsongs < 1) goto fail;
|
||||
|
||||
loop_flag = 0;//(channel_count > 1); /* some Future Cop LAPD tracks repeat but other games have fadeouts */
|
||||
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->sample_rate = 16000;
|
||||
vgmstream->sample_rate = sample_rate;
|
||||
vgmstream->codec_endian = big_endian;
|
||||
vgmstream->num_streams = total_subsongs;
|
||||
vgmstream->stream_size = get_streamfile_size(streamFile) / total_subsongs; /* approx... */
|
||||
|
||||
vgmstream->meta_type = meta_EA_SWVR;
|
||||
vgmstream->coding_type = coding;
|
||||
vgmstream->layout_type = layout_blocked_ea_swvr;
|
||||
|
||||
vgmstream->coding_type = coding_PSX;
|
||||
/* DSP coefs are loaded per block */
|
||||
/* some files (voices etc) decode with pops but seems a mastering problem */
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
|
||||
|
||||
/* calculate samples */
|
||||
/* calc num_samples manually */
|
||||
{
|
||||
off_t current_chunk = start_offset;
|
||||
|
||||
vgmstream->num_samples = 0;
|
||||
while ((current_chunk + start_offset) < (get_streamfile_size(streamFile))) {
|
||||
uint32_t block_id = (read_32bit(current_chunk,streamFile));
|
||||
if (block_id == 0x5641474D) { /* "VAGM" */
|
||||
block_update_ea_swvr(start_offset,vgmstream);
|
||||
vgmstream->num_samples += vgmstream->current_block_size/16*28;
|
||||
current_chunk += vgmstream->current_block_size + 0x1C;
|
||||
int num_samples;
|
||||
vgmstream->stream_index = target_subsong; /* needed to skip other subsong-blocks */
|
||||
vgmstream->next_block_offset = start_offset;
|
||||
do {
|
||||
block_update_ea_swvr(vgmstream->next_block_offset,vgmstream);
|
||||
switch(vgmstream->coding_type) {
|
||||
case coding_PSX: num_samples = ps_bytes_to_samples(vgmstream->current_block_size,1); break;
|
||||
case coding_NGC_DSP: num_samples = dsp_bytes_to_samples(vgmstream->current_block_size,1); break;
|
||||
case coding_PCM8_U_int: num_samples = pcm_bytes_to_samples(vgmstream->current_block_size,1,8); break;
|
||||
default: num_samples = 0; break;
|
||||
}
|
||||
current_chunk += 0x10;
|
||||
vgmstream->num_samples += num_samples;
|
||||
}
|
||||
while (vgmstream->next_block_offset < get_streamfile_size(streamFile));
|
||||
}
|
||||
|
||||
if (loop_flag) {
|
||||
|
@ -72,6 +155,7 @@ VGMSTREAM * init_vgmstream_ea_swvr(STREAMFILE *streamFile) {
|
|||
vgmstream->loop_end_sample = vgmstream->num_samples;
|
||||
}
|
||||
|
||||
block_update_ea_swvr(start_offset, vgmstream);
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
#include "meta.h"
|
||||
#include "../coding/coding.h"
|
||||
#include "../layout/layout.h"
|
||||
|
||||
/* EA WVE (Ad10) - from Electronic Arts PS movies [Wing Commander 3/4 (PS)] */
|
||||
VGMSTREAM * init_vgmstream_ea_wve_ad10(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset;
|
||||
int loop_flag, channel_count;
|
||||
|
||||
|
||||
/* checks */
|
||||
if (!check_extensions(streamFile, "wve"))
|
||||
goto fail;
|
||||
|
||||
start_offset = 0x00;
|
||||
if (read_32bitBE(start_offset, streamFile) != 0x41643130 && /* "Ad10" */
|
||||
read_32bitBE(start_offset, streamFile) != 0x41643131) /* "Ad11" (last block, but could be first) */
|
||||
goto fail;
|
||||
loop_flag = 0;
|
||||
/* no header = no channels, but seems if the first PS-ADPCM header is 00 then it's mono, somehow
|
||||
* (ex. Wing Commander 3 intro / Wing Commander 4 = stereo, rest of Wing Commander 3 = mono) */
|
||||
channel_count = read_8bit(start_offset+0x08,streamFile) != 0 ? 2 : 1;
|
||||
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count, loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->sample_rate = 22050;
|
||||
vgmstream->meta_type = meta_EA_WVE_AD10;
|
||||
vgmstream->coding_type = coding_PSX;
|
||||
vgmstream->layout_type = layout_blocked_ea_wve_ad10;
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
|
||||
/* calc num_samples manually */
|
||||
{
|
||||
vgmstream->next_block_offset = start_offset;
|
||||
do {
|
||||
block_update_ea_wve_ad10(vgmstream->next_block_offset,vgmstream);
|
||||
vgmstream->num_samples += ps_bytes_to_samples(vgmstream->current_block_size, 1);
|
||||
}
|
||||
while (vgmstream->next_block_offset < get_streamfile_size(streamFile));
|
||||
}
|
||||
|
||||
block_update_ea_wve_ad10(start_offset, vgmstream);
|
||||
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
#include "meta.h"
|
||||
#include "../coding/coding.h"
|
||||
#include "../layout/layout.h"
|
||||
|
||||
/* EA WVE (VLC0/au00) - from Electronic Arts PS movies [Future Cop - L.A.P.D. (PS), Supercross 2000 (PS)] */
|
||||
VGMSTREAM * init_vgmstream_ea_wve_au00(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset;
|
||||
int loop_flag, channel_count;
|
||||
|
||||
|
||||
/* checks */
|
||||
/* .wve: common, .fsv: Future Cop LAPD (PS1) */
|
||||
if (!check_extensions(streamFile, "wve,fsv"))
|
||||
goto fail;
|
||||
if (read_32bitBE(0x00,streamFile) != 0x564C4330) /* "VLC0" */
|
||||
goto fail;
|
||||
|
||||
start_offset = read_32bitBE(0x04,streamFile);
|
||||
if (read_32bitBE(start_offset, streamFile) != 0x61753030 && /* "au00" */
|
||||
read_32bitBE(start_offset, streamFile) != 0x61753031) /* "au01" (last block, but could be first) */
|
||||
goto fail;
|
||||
loop_flag = 0;
|
||||
channel_count = 2;
|
||||
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count, loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->sample_rate = 22050;
|
||||
vgmstream->meta_type = meta_EA_WVE_AU00;
|
||||
|
||||
/* You'd think they'd use coding_EA_XA_int but instead it's PS-ADPCM without flags and 0x0f frame size
|
||||
* (equivalent to configurable PS-ADPCM), surely to shoehorn EA-XA sizes into the PS1 hardware decoder */
|
||||
vgmstream->coding_type = coding_PSX_cfg;
|
||||
vgmstream->interleave_block_size = 0x0f;
|
||||
vgmstream->layout_type = layout_blocked_ea_wve_au00;
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
|
||||
/* calc num_samples manually */
|
||||
{
|
||||
vgmstream->next_block_offset = start_offset;
|
||||
do {
|
||||
block_update_ea_wve_au00(vgmstream->next_block_offset,vgmstream);
|
||||
vgmstream->num_samples += ps_cfg_bytes_to_samples(vgmstream->current_block_size, vgmstream->interleave_block_size, 1);
|
||||
}
|
||||
while (vgmstream->next_block_offset < get_streamfile_size(streamFile));
|
||||
}
|
||||
|
||||
block_update_ea_wve_au00(start_offset, vgmstream);
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue