2008-04-03 15:40:36 +02:00
|
|
|
#ifdef _MSC_VER
|
2008-04-03 15:56:50 +02:00
|
|
|
#define _CRT_SECURE_NO_DEPRECATE
|
2008-04-03 15:40:36 +02:00
|
|
|
#endif
|
|
|
|
|
2008-03-11 02:27:59 +01:00
|
|
|
#include <stdio.h>
|
2008-03-25 08:30:04 +01:00
|
|
|
#include <string.h>
|
|
|
|
#include <math.h>
|
2008-01-31 07:04:26 +01:00
|
|
|
#include "vgmstream.h"
|
2008-05-06 05:35:37 +02:00
|
|
|
#include "meta/meta.h"
|
|
|
|
#include "layout/layout.h"
|
|
|
|
#include "coding/coding.h"
|
2008-05-04 22:36:40 +02:00
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
/*
|
|
|
|
* List of functions that will recognize files. These should correspond pretty
|
|
|
|
* directly to the metadata types
|
|
|
|
*/
|
2008-06-09 02:20:08 +02:00
|
|
|
VGMSTREAM * (*init_vgmstream_fcns[])(STREAMFILE *streamFile) = {
|
|
|
|
init_vgmstream_adx,
|
|
|
|
init_vgmstream_brstm,
|
2014-08-03 01:10:45 +02:00
|
|
|
init_vgmstream_bfwav,
|
2008-06-09 02:20:08 +02:00
|
|
|
init_vgmstream_nds_strm,
|
|
|
|
init_vgmstream_agsc,
|
|
|
|
init_vgmstream_ngc_adpdtk,
|
|
|
|
init_vgmstream_rsf,
|
|
|
|
init_vgmstream_afc,
|
|
|
|
init_vgmstream_ast,
|
|
|
|
init_vgmstream_halpst,
|
|
|
|
init_vgmstream_rs03,
|
|
|
|
init_vgmstream_ngc_dsp_std,
|
|
|
|
init_vgmstream_Cstr,
|
|
|
|
init_vgmstream_gcsw,
|
|
|
|
init_vgmstream_ps2_ads,
|
|
|
|
init_vgmstream_ps2_npsf,
|
|
|
|
init_vgmstream_rwsd,
|
|
|
|
init_vgmstream_cdxa,
|
|
|
|
init_vgmstream_ps2_rxw,
|
|
|
|
init_vgmstream_ps2_int,
|
|
|
|
init_vgmstream_ngc_dsp_stm,
|
|
|
|
init_vgmstream_ps2_exst,
|
|
|
|
init_vgmstream_ps2_svag,
|
|
|
|
init_vgmstream_ps2_mib,
|
|
|
|
init_vgmstream_ngc_mpdsp,
|
|
|
|
init_vgmstream_ps2_mic,
|
|
|
|
init_vgmstream_ngc_dsp_std_int,
|
|
|
|
init_vgmstream_raw,
|
|
|
|
init_vgmstream_ps2_vag,
|
|
|
|
init_vgmstream_psx_gms,
|
|
|
|
init_vgmstream_ps2_str,
|
|
|
|
init_vgmstream_ps2_ild,
|
|
|
|
init_vgmstream_ps2_pnb,
|
|
|
|
init_vgmstream_xbox_wavm,
|
|
|
|
init_vgmstream_xbox_xwav,
|
|
|
|
init_vgmstream_ngc_str,
|
|
|
|
init_vgmstream_ea,
|
|
|
|
init_vgmstream_caf,
|
|
|
|
init_vgmstream_ps2_vpk,
|
2008-06-10 03:20:54 +02:00
|
|
|
init_vgmstream_genh,
|
2008-06-15 09:59:43 +02:00
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-06-15 06:01:03 +02:00
|
|
|
init_vgmstream_ogg_vorbis,
|
2008-07-21 07:50:28 +02:00
|
|
|
init_vgmstream_sli_ogg,
|
2008-07-22 04:18:32 +02:00
|
|
|
init_vgmstream_sfl,
|
2008-06-15 09:59:43 +02:00
|
|
|
#endif
|
2012-08-30 14:35:12 +02:00
|
|
|
#if 0
|
|
|
|
init_vgmstream_mp4_aac,
|
|
|
|
#endif
|
2013-06-14 02:42:24 +02:00
|
|
|
#if defined(VGM_USE_MP4V2) && defined(VGM_USE_FDKAAC)
|
2012-08-30 14:35:12 +02:00
|
|
|
init_vgmstream_akb,
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2008-06-15 11:23:34 +02:00
|
|
|
init_vgmstream_sadb,
|
2008-06-25 20:04:39 +02:00
|
|
|
init_vgmstream_ps2_bmdx,
|
2008-06-29 03:30:13 +02:00
|
|
|
init_vgmstream_wsi,
|
2008-07-01 05:23:44 +02:00
|
|
|
init_vgmstream_aifc,
|
2008-07-02 15:39:51 +02:00
|
|
|
init_vgmstream_str_snds,
|
2008-07-03 04:20:52 +02:00
|
|
|
init_vgmstream_ws_aud,
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
init_vgmstream_ahx,
|
|
|
|
#endif
|
2008-07-06 10:59:14 +02:00
|
|
|
init_vgmstream_ivb,
|
2008-07-12 17:20:39 +02:00
|
|
|
init_vgmstream_amts,
|
2008-07-06 14:23:37 +02:00
|
|
|
init_vgmstream_svs,
|
2008-07-06 20:05:04 +02:00
|
|
|
init_vgmstream_riff,
|
2009-05-25 22:59:50 +02:00
|
|
|
init_vgmstream_rifx,
|
2008-07-06 20:05:04 +02:00
|
|
|
init_vgmstream_pos,
|
2008-07-11 02:41:21 +02:00
|
|
|
init_vgmstream_nwa,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_eacs,
|
2008-07-12 17:20:39 +02:00
|
|
|
init_vgmstream_xss,
|
|
|
|
init_vgmstream_sl3,
|
|
|
|
init_vgmstream_hgc1,
|
|
|
|
init_vgmstream_aus,
|
|
|
|
init_vgmstream_rws,
|
2008-11-15 12:38:14 +01:00
|
|
|
init_vgmstream_fsb1,
|
2009-09-15 08:22:01 +02:00
|
|
|
// init_vgmstream_fsb2,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_fsb3,
|
|
|
|
init_vgmstream_fsb4,
|
|
|
|
init_vgmstream_fsb4_wav,
|
2014-04-24 06:31:04 +02:00
|
|
|
init_vgmstream_fsb5,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_rwx,
|
|
|
|
init_vgmstream_xwb,
|
2009-03-12 16:28:59 +01:00
|
|
|
init_vgmstream_xwb2,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_xa30,
|
|
|
|
init_vgmstream_musc,
|
2008-11-09 12:37:21 +01:00
|
|
|
init_vgmstream_musx_v004,
|
2010-05-02 21:16:35 +02:00
|
|
|
init_vgmstream_musx_v005,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_musx_v006,
|
|
|
|
init_vgmstream_musx_v010,
|
|
|
|
init_vgmstream_musx_v201,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_leg,
|
|
|
|
init_vgmstream_filp,
|
|
|
|
init_vgmstream_ikm,
|
|
|
|
init_vgmstream_sfs,
|
|
|
|
init_vgmstream_bg00,
|
|
|
|
init_vgmstream_dvi,
|
|
|
|
init_vgmstream_kcey,
|
|
|
|
init_vgmstream_ps2_rstm,
|
2008-07-20 07:41:41 +02:00
|
|
|
init_vgmstream_acm,
|
2008-07-21 01:28:16 +02:00
|
|
|
init_vgmstream_mus_acm,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_ps2_kces,
|
|
|
|
init_vgmstream_ps2_dxh,
|
|
|
|
init_vgmstream_ps2_psh,
|
2010-02-08 19:33:20 +01:00
|
|
|
init_vgmstream_pcm_scd,
|
2010-02-27 23:10:52 +01:00
|
|
|
init_vgmstream_pcm_ps2,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_ps2_rkv,
|
|
|
|
init_vgmstream_ps2_psw,
|
|
|
|
init_vgmstream_ps2_vas,
|
|
|
|
init_vgmstream_ps2_tec,
|
|
|
|
init_vgmstream_ps2_enth,
|
|
|
|
init_vgmstream_sdt,
|
2008-08-02 12:24:28 +02:00
|
|
|
init_vgmstream_aix,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_ngc_tydsp,
|
|
|
|
init_vgmstream_ngc_swd,
|
2008-12-20 22:26:01 +01:00
|
|
|
init_vgmstream_capdsp,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_xbox_wvs,
|
2009-08-25 05:21:28 +02:00
|
|
|
init_vgmstream_ngc_wvs,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_dc_str,
|
2009-01-23 15:06:14 +01:00
|
|
|
init_vgmstream_dc_str_v2,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_xbox_stma,
|
|
|
|
init_vgmstream_xbox_matx,
|
2008-08-11 09:19:44 +02:00
|
|
|
init_vgmstream_de2,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_vs,
|
2008-08-13 08:11:05 +02:00
|
|
|
init_vgmstream_dc_str,
|
2009-01-23 15:06:14 +01:00
|
|
|
init_vgmstream_dc_str_v2,
|
2008-08-22 02:24:15 +02:00
|
|
|
init_vgmstream_xbox_xmu,
|
|
|
|
init_vgmstream_xbox_xvas,
|
|
|
|
init_vgmstream_ngc_bh2pcm,
|
|
|
|
init_vgmstream_sat_sap,
|
|
|
|
init_vgmstream_dc_idvi,
|
|
|
|
init_vgmstream_ps2_rnd,
|
|
|
|
init_vgmstream_wii_idsp,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_kraw,
|
|
|
|
init_vgmstream_ps2_omu,
|
|
|
|
init_vgmstream_ps2_xa2,
|
2010-05-02 21:16:35 +02:00
|
|
|
//init_vgmstream_idsp,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_idsp2,
|
|
|
|
init_vgmstream_idsp3,
|
2010-04-20 22:26:10 +02:00
|
|
|
init_vgmstream_idsp4,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_ngc_ymf,
|
2008-09-23 13:07:41 +02:00
|
|
|
init_vgmstream_sadl,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_ps2_ccc,
|
|
|
|
init_vgmstream_psx_fag,
|
|
|
|
init_vgmstream_ps2_mihb,
|
|
|
|
init_vgmstream_ngc_pdt,
|
2008-10-11 06:00:57 +02:00
|
|
|
init_vgmstream_wii_mus,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_dc_asd,
|
|
|
|
init_vgmstream_naomi_spsd,
|
|
|
|
|
|
|
|
init_vgmstream_rsd2vag,
|
|
|
|
init_vgmstream_rsd2pcmb,
|
|
|
|
init_vgmstream_rsd2xadp,
|
2009-04-25 18:45:22 +02:00
|
|
|
init_vgmstream_rsd3vag,
|
2009-05-20 04:48:13 +02:00
|
|
|
init_vgmstream_rsd3gadp,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_rsd3pcm,
|
2009-05-20 04:48:13 +02:00
|
|
|
init_vgmstream_rsd3pcmb,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_rsd4pcmb,
|
|
|
|
init_vgmstream_rsd4pcm,
|
2009-10-17 21:17:42 +02:00
|
|
|
init_vgmstream_rsd4radp,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_rsd4vag,
|
|
|
|
init_vgmstream_rsd6vag,
|
|
|
|
init_vgmstream_rsd6wadp,
|
|
|
|
init_vgmstream_rsd6xadp,
|
2009-09-12 06:51:39 +02:00
|
|
|
init_vgmstream_rsd6radp,
|
2008-11-07 00:30:33 +01:00
|
|
|
init_vgmstream_bgw,
|
2008-11-07 02:47:39 +01:00
|
|
|
init_vgmstream_spw,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_ps2_ass,
|
|
|
|
init_vgmstream_waa_wac_wad_wam,
|
2011-01-22 03:31:52 +01:00
|
|
|
init_vgmstream_seg,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_nds_strm_ffta2,
|
|
|
|
init_vgmstream_str_asr,
|
|
|
|
init_vgmstream_zwdsp,
|
|
|
|
init_vgmstream_gca,
|
|
|
|
init_vgmstream_spt_spd,
|
|
|
|
init_vgmstream_ish_isd,
|
|
|
|
init_vgmstream_gsp_gsb,
|
|
|
|
init_vgmstream_ydsp,
|
|
|
|
init_vgmstream_msvp,
|
|
|
|
init_vgmstream_ngc_ssm,
|
|
|
|
init_vgmstream_ps2_joe,
|
|
|
|
init_vgmstream_vgs,
|
2010-02-15 10:02:31 +01:00
|
|
|
init_vgmstream_dc_dcsw_dcs,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_wii_smp,
|
|
|
|
init_vgmstream_emff_ps2,
|
|
|
|
init_vgmstream_emff_ngc,
|
|
|
|
init_vgmstream_ss_stream,
|
|
|
|
init_vgmstream_thp,
|
|
|
|
init_vgmstream_wii_sts,
|
|
|
|
init_vgmstream_ps2_p2bt,
|
|
|
|
init_vgmstream_ps2_gbts,
|
2008-12-24 01:00:10 +01:00
|
|
|
init_vgmstream_wii_sng,
|
2010-09-16 13:53:36 +02:00
|
|
|
init_vgmstream_ngc_dsp_iadp,
|
2009-01-03 12:08:44 +01:00
|
|
|
init_vgmstream_aax,
|
2011-01-04 15:20:49 +01:00
|
|
|
init_vgmstream_utf_dsp,
|
2009-01-08 15:29:40 +01:00
|
|
|
init_vgmstream_ngc_ffcc_str,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_sat_baka,
|
|
|
|
init_vgmstream_nds_swav,
|
2009-02-08 09:36:33 +01:00
|
|
|
init_vgmstream_ps2_vsf,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_nds_rrds,
|
|
|
|
init_vgmstream_ps2_tk5,
|
|
|
|
init_vgmstream_ps2_vsf_tta,
|
|
|
|
init_vgmstream_ads,
|
|
|
|
init_vgmstream_wii_str,
|
|
|
|
init_vgmstream_ps2_mcg,
|
2009-03-13 00:42:56 +01:00
|
|
|
init_vgmstream_zsd,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_ps2_vgs,
|
2009-03-16 16:45:02 +01:00
|
|
|
init_vgmstream_RedSpark,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_ivaud,
|
2009-03-26 00:25:30 +01:00
|
|
|
init_vgmstream_wii_wsd,
|
2009-04-19 11:49:08 +02:00
|
|
|
init_vgmstream_wii_ndp,
|
|
|
|
init_vgmstream_ps2_sps,
|
|
|
|
init_vgmstream_ps2_xa2_rrp,
|
|
|
|
init_vgmstream_nds_hwas,
|
2010-02-19 12:28:29 +01:00
|
|
|
init_vgmstream_ngc_lps,
|
2009-05-01 17:03:51 +02:00
|
|
|
init_vgmstream_ps2_snd,
|
2009-05-10 09:14:29 +02:00
|
|
|
init_vgmstream_naomi_adpcm,
|
2010-02-19 12:28:29 +01:00
|
|
|
init_vgmstream_sd9,
|
2010-06-29 17:52:07 +02:00
|
|
|
init_vgmstream_2dx9,
|
2010-02-19 12:28:29 +01:00
|
|
|
init_vgmstream_dsp_ygo,
|
2009-07-11 13:28:36 +02:00
|
|
|
init_vgmstream_ps2_vgv,
|
2009-08-23 10:42:14 +02:00
|
|
|
init_vgmstream_ngc_gcub,
|
2009-08-25 19:50:43 +02:00
|
|
|
init_vgmstream_maxis_xa,
|
|
|
|
init_vgmstream_ngc_sck_dsp,
|
2009-08-30 04:16:54 +02:00
|
|
|
init_vgmstream_apple_caff,
|
2010-02-19 12:28:29 +01:00
|
|
|
init_vgmstream_pc_mxst,
|
|
|
|
init_vgmstream_sab,
|
2009-09-04 06:19:39 +02:00
|
|
|
init_vgmstream_exakt_sc,
|
2009-09-05 14:18:34 +02:00
|
|
|
init_vgmstream_wii_bns,
|
2009-09-11 20:40:26 +02:00
|
|
|
init_vgmstream_wii_was,
|
2010-02-19 12:28:29 +01:00
|
|
|
init_vgmstream_pona_3do,
|
|
|
|
init_vgmstream_pona_psx,
|
2009-10-15 11:24:04 +02:00
|
|
|
init_vgmstream_xbox_hlwav,
|
2009-11-18 01:46:36 +01:00
|
|
|
init_vgmstream_stx,
|
2009-11-22 15:06:45 +01:00
|
|
|
init_vgmstream_ps2_stm,
|
2010-01-10 22:22:20 +01:00
|
|
|
init_vgmstream_myspd,
|
2010-01-19 20:40:41 +01:00
|
|
|
init_vgmstream_his,
|
2010-02-19 12:28:29 +01:00
|
|
|
init_vgmstream_ps2_ast,
|
|
|
|
init_vgmstream_dmsg,
|
2010-05-02 21:16:35 +02:00
|
|
|
init_vgmstream_ngc_dsp_aaap,
|
|
|
|
init_vgmstream_ngc_dsp_konami,
|
2010-04-20 22:26:10 +02:00
|
|
|
init_vgmstream_ps2_ster,
|
|
|
|
init_vgmstream_ps2_wb,
|
2010-03-23 21:57:12 +01:00
|
|
|
init_vgmstream_bnsf,
|
2010-04-10 11:58:47 +02:00
|
|
|
#ifdef VGM_USE_G7221
|
2010-03-23 21:57:12 +01:00
|
|
|
init_vgmstream_s14_sss,
|
2010-04-10 11:58:47 +02:00
|
|
|
#endif
|
2010-03-29 22:06:08 +02:00
|
|
|
init_vgmstream_ps2_gcm,
|
2010-04-20 22:26:10 +02:00
|
|
|
init_vgmstream_ps2_smpl,
|
|
|
|
init_vgmstream_ps2_msa,
|
|
|
|
init_vgmstream_ps2_voi,
|
|
|
|
init_vgmstream_ps2_khv,
|
2010-04-10 12:55:14 +02:00
|
|
|
init_vgmstream_pc_smp,
|
2010-04-20 22:26:10 +02:00
|
|
|
init_vgmstream_ngc_bo2,
|
|
|
|
init_vgmstream_dsp_ddsp,
|
2010-04-10 14:06:25 +02:00
|
|
|
init_vgmstream_p3d,
|
2010-05-31 01:56:35 +02:00
|
|
|
init_vgmstream_ps2_tk1,
|
|
|
|
init_vgmstream_ps2_adsc,
|
2010-04-20 22:26:10 +02:00
|
|
|
init_vgmstream_ngc_dsp_mpds,
|
|
|
|
init_vgmstream_dsp_str_ig,
|
|
|
|
init_vgmstream_psx_mgav,
|
2010-05-02 21:16:35 +02:00
|
|
|
init_vgmstream_ngc_dsp_sth_str1,
|
|
|
|
init_vgmstream_ngc_dsp_sth_str2,
|
|
|
|
init_vgmstream_ngc_dsp_sth_str3,
|
|
|
|
init_vgmstream_ps2_b1s,
|
|
|
|
init_vgmstream_ps2_wad,
|
|
|
|
init_vgmstream_dsp_xiii,
|
|
|
|
init_vgmstream_dsp_cabelas,
|
|
|
|
init_vgmstream_ps2_adm,
|
2010-09-11 19:53:33 +02:00
|
|
|
init_vgmstream_ps2_lpcm,
|
2010-05-10 10:02:22 +02:00
|
|
|
init_vgmstream_dsp_bdsp,
|
2010-09-11 19:53:33 +02:00
|
|
|
init_vgmstream_ps2_vms,
|
|
|
|
init_vgmstream_ps2_xau,
|
2010-06-13 06:41:26 +02:00
|
|
|
init_vgmstream_gh3_bar,
|
2010-07-27 21:45:59 +02:00
|
|
|
init_vgmstream_ffw,
|
2010-08-04 11:12:08 +02:00
|
|
|
init_vgmstream_dsp_dspw,
|
2010-08-28 03:43:40 +02:00
|
|
|
init_vgmstream_ps2_jstm,
|
2010-09-05 00:06:39 +02:00
|
|
|
init_vgmstream_ps3_xvag,
|
2010-11-24 05:27:59 +01:00
|
|
|
init_vgmstream_ps3_cps,
|
2011-02-08 13:56:16 +01:00
|
|
|
init_vgmstream_sqex_scd,
|
2010-09-11 19:53:33 +02:00
|
|
|
init_vgmstream_ngc_nst_dsp,
|
2010-09-11 22:57:39 +02:00
|
|
|
init_vgmstream_baf,
|
2010-09-14 20:22:49 +02:00
|
|
|
init_vgmstream_ps3_msf,
|
2010-09-15 21:37:54 +02:00
|
|
|
init_vgmstream_fsb_mpeg,
|
2010-09-30 02:04:17 +02:00
|
|
|
init_vgmstream_nub_vag,
|
2010-10-12 02:16:49 +02:00
|
|
|
init_vgmstream_ps3_past,
|
2010-11-22 02:45:39 +01:00
|
|
|
init_vgmstream_ps3_sgh_sgb,
|
|
|
|
init_vgmstream_ngca,
|
|
|
|
init_vgmstream_wii_ras,
|
2010-11-29 03:02:27 +01:00
|
|
|
init_vgmstream_ps2_spm,
|
2010-12-04 00:21:36 +01:00
|
|
|
init_vgmstream_x360_tra,
|
2010-12-06 23:22:06 +01:00
|
|
|
init_vgmstream_ps2_iab,
|
2010-12-29 13:33:33 +01:00
|
|
|
init_vgmstream_ps2_strlr,
|
2011-01-13 09:11:58 +01:00
|
|
|
init_vgmstream_lsf_n1nj4n,
|
2011-01-17 22:22:10 +01:00
|
|
|
init_vgmstream_ps3_vawx,
|
2011-02-06 10:49:57 +01:00
|
|
|
init_vgmstream_pc_snds,
|
2011-02-13 03:23:53 +01:00
|
|
|
init_vgmstream_ps2_wmus,
|
2011-02-15 19:24:50 +01:00
|
|
|
init_vgmstream_hyperscan_kvag,
|
2011-02-19 03:59:42 +01:00
|
|
|
init_vgmstream_ios_psnd,
|
2011-02-22 07:57:50 +01:00
|
|
|
init_vgmstream_bos_adp,
|
2011-03-03 10:03:18 +01:00
|
|
|
init_vgmstream_eb_sfx,
|
|
|
|
init_vgmstream_eb_sf0,
|
2011-03-23 04:17:53 +01:00
|
|
|
init_vgmstream_ps3_klbs,
|
2011-03-23 09:06:05 +01:00
|
|
|
init_vgmstream_ps3_sgx,
|
2011-05-07 13:05:05 +02:00
|
|
|
init_vgmstream_ps2_mtaf,
|
2011-05-18 22:33:00 +02:00
|
|
|
init_vgmstream_tun,
|
|
|
|
init_vgmstream_wpd,
|
2011-05-31 17:01:04 +02:00
|
|
|
init_vgmstream_ps3_sgd,
|
2011-07-22 07:32:10 +02:00
|
|
|
init_vgmstream_mn_str,
|
|
|
|
init_vgmstream_ps2_mss,
|
2012-03-21 04:30:36 +01:00
|
|
|
init_vgmstream_ps2_hsf,
|
2012-04-14 18:07:21 +02:00
|
|
|
init_vgmstream_ps3_ivag,
|
2012-08-15 05:41:24 +02:00
|
|
|
init_vgmstream_ps2_2pfs,
|
2012-08-20 07:17:52 +02:00
|
|
|
init_vgmstream_xnbm,
|
2012-08-31 07:12:04 +02:00
|
|
|
init_vgmstream_rsd6oogv,
|
2013-09-03 20:14:14 +02:00
|
|
|
init_vgmstream_ubi_ckd,
|
2013-09-03 20:27:36 +02:00
|
|
|
init_vgmstream_ps2_vbk,
|
2014-02-26 07:25:02 +01:00
|
|
|
init_vgmstream_otm,
|
2014-02-26 07:31:28 +01:00
|
|
|
init_vgmstream_bcstm,
|
2008-01-31 07:04:26 +01:00
|
|
|
};
|
|
|
|
|
2008-06-09 02:20:08 +02:00
|
|
|
#define INIT_VGMSTREAM_FCNS (sizeof(init_vgmstream_fcns)/sizeof(init_vgmstream_fcns[0]))
|
|
|
|
|
2008-03-25 08:30:04 +01:00
|
|
|
/* internal version with all parameters */
|
2008-05-20 17:18:38 +02:00
|
|
|
VGMSTREAM * init_vgmstream_internal(STREAMFILE *streamFile, int do_dfs) {
|
2008-01-31 07:04:26 +01:00
|
|
|
int i;
|
2008-05-20 17:18:38 +02:00
|
|
|
|
|
|
|
if (!streamFile)
|
|
|
|
return NULL;
|
2008-01-31 07:04:26 +01:00
|
|
|
|
|
|
|
/* try a series of formats, see which works */
|
|
|
|
for (i=0;i<INIT_VGMSTREAM_FCNS;i++) {
|
2008-05-20 17:18:38 +02:00
|
|
|
VGMSTREAM * vgmstream = (init_vgmstream_fcns[i])(streamFile);
|
2008-01-31 07:04:26 +01:00
|
|
|
if (vgmstream) {
|
2008-03-25 08:30:04 +01:00
|
|
|
/* these are little hacky checks */
|
|
|
|
|
|
|
|
/* everything should have a reasonable sample rate
|
|
|
|
* (a verification of the metadata) */
|
2008-01-31 07:04:26 +01:00
|
|
|
if (!check_sample_rate(vgmstream->sample_rate)) {
|
|
|
|
close_vgmstream(vgmstream);
|
|
|
|
continue;
|
|
|
|
}
|
2008-03-25 08:30:04 +01:00
|
|
|
|
|
|
|
/* dual file stereo */
|
2008-09-21 00:16:57 +02:00
|
|
|
if (do_dfs && (
|
|
|
|
(vgmstream->meta_type == meta_DSP_STD) ||
|
|
|
|
(vgmstream->meta_type == meta_PS2_VAGp) ||
|
|
|
|
(vgmstream->meta_type == meta_GENH) ||
|
2009-03-05 17:08:23 +01:00
|
|
|
(vgmstream->meta_type == meta_KRAW) ||
|
2009-04-29 22:24:39 +02:00
|
|
|
(vgmstream->meta_type == meta_PS2_MIB) ||
|
2009-06-20 23:26:36 +02:00
|
|
|
(vgmstream->meta_type == meta_NGC_LPS) ||
|
2010-09-30 02:04:17 +02:00
|
|
|
(vgmstream->meta_type == meta_DSP_YGO) ||
|
2010-03-31 03:57:34 +02:00
|
|
|
(vgmstream->meta_type == meta_DSP_AGSC) ||
|
2010-09-30 02:04:17 +02:00
|
|
|
(vgmstream->meta_type == meta_PS2_SMPL) ||
|
2010-11-09 05:21:22 +01:00
|
|
|
(vgmstream->meta_type == meta_NGCA) ||
|
2010-09-30 02:04:17 +02:00
|
|
|
(vgmstream->meta_type == meta_NUB_VAG) ||
|
2011-03-03 10:03:18 +01:00
|
|
|
(vgmstream->meta_type == meta_SPT_SPD) ||
|
|
|
|
(vgmstream->meta_type == meta_EB_SFX)
|
2008-09-21 00:16:57 +02:00
|
|
|
) && vgmstream->channels == 1) {
|
2008-05-20 17:18:38 +02:00
|
|
|
try_dual_file_stereo(vgmstream, streamFile);
|
2008-03-25 08:30:04 +01:00
|
|
|
}
|
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
/* save start things so we can restart for seeking */
|
2008-05-19 05:58:15 +02:00
|
|
|
/* copy the channels */
|
2008-01-31 07:04:26 +01:00
|
|
|
memcpy(vgmstream->start_ch,vgmstream->ch,sizeof(VGMSTREAMCHANNEL)*vgmstream->channels);
|
2008-05-19 05:58:15 +02:00
|
|
|
/* copy the whole VGMSTREAM */
|
|
|
|
memcpy(vgmstream->start_vgmstream,vgmstream,sizeof(VGMSTREAM));
|
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
return vgmstream;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-05-20 17:18:38 +02:00
|
|
|
/* format detection and VGMSTREAM setup, uses default parameters */
|
|
|
|
VGMSTREAM * init_vgmstream(const char * const filename) {
|
|
|
|
VGMSTREAM *vgmstream = NULL;
|
|
|
|
STREAMFILE *streamFile = open_stdio_streamfile(filename);
|
|
|
|
if (streamFile) {
|
|
|
|
vgmstream = init_vgmstream_from_STREAMFILE(streamFile);
|
|
|
|
close_streamfile(streamFile);
|
|
|
|
}
|
|
|
|
return vgmstream;
|
|
|
|
}
|
|
|
|
|
|
|
|
VGMSTREAM * init_vgmstream_from_STREAMFILE(STREAMFILE *streamFile) {
|
|
|
|
return init_vgmstream_internal(streamFile,1);
|
|
|
|
}
|
|
|
|
|
2008-05-19 05:58:15 +02:00
|
|
|
/* Reset a VGMSTREAM to its state at the start of playback.
|
|
|
|
* Note that this does not reset the constituent STREAMFILES. */
|
|
|
|
void reset_vgmstream(VGMSTREAM * vgmstream) {
|
|
|
|
/* copy the vgmstream back into itself */
|
|
|
|
memcpy(vgmstream,vgmstream->start_vgmstream,sizeof(VGMSTREAM));
|
|
|
|
|
|
|
|
/* copy the initial channels */
|
|
|
|
memcpy(vgmstream->ch,vgmstream->start_ch,sizeof(VGMSTREAMCHANNEL)*vgmstream->channels);
|
|
|
|
|
|
|
|
/* loop_ch is not zeroed here because there is a possibility of the
|
|
|
|
* init_vgmstream_* function doing something tricky and precomputing it.
|
|
|
|
* Otherwise hit_loop will be 0 and it will be copied over anyway when we
|
|
|
|
* really hit the loop start. */
|
2008-06-15 06:01:03 +02:00
|
|
|
|
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-07-21 07:50:28 +02:00
|
|
|
if (vgmstream->coding_type==coding_ogg_vorbis) {
|
2008-07-05 13:49:29 +02:00
|
|
|
ogg_vorbis_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
2008-06-15 06:01:03 +02:00
|
|
|
OggVorbis_File *ogg_vorbis_file = &(data->ogg_vorbis_file);
|
|
|
|
|
|
|
|
ov_pcm_seek(ogg_vorbis_file, 0);
|
|
|
|
}
|
|
|
|
#endif
|
2013-06-14 02:42:24 +02:00
|
|
|
#if defined(VGM_USE_MP4V2) && defined(VGM_USE_FDKAAC)
|
2012-08-30 14:35:12 +02:00
|
|
|
if (vgmstream->coding_type==coding_MP4_AAC) {
|
|
|
|
mp4_aac_codec_data *data = vgmstream->codec_data;
|
2012-08-30 14:49:07 +02:00
|
|
|
data->sampleId = 0;
|
2012-08-30 14:35:12 +02:00
|
|
|
data->sample_ptr = data->samples_per_frame;
|
|
|
|
data->samples_discard = 0;
|
|
|
|
}
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
2008-07-06 17:33:38 +02:00
|
|
|
if (vgmstream->layout_type==layout_mpeg ||
|
|
|
|
vgmstream->layout_type==layout_fake_mpeg) {
|
2008-07-05 13:49:29 +02:00
|
|
|
off_t input_offset;
|
2008-07-06 17:33:38 +02:00
|
|
|
mpeg_codec_data *data = vgmstream->codec_data;
|
2008-07-05 13:49:29 +02:00
|
|
|
|
|
|
|
/* input_offset is ignored as we can assume it will be 0 for a seek
|
|
|
|
* to sample 0 */
|
|
|
|
mpg123_feedseek(data->m,0,SEEK_SET,&input_offset);
|
2008-07-06 03:17:08 +02:00
|
|
|
data->buffer_full = data->buffer_used = 0;
|
2008-07-05 13:49:29 +02:00
|
|
|
}
|
|
|
|
#endif
|
2010-03-23 21:57:12 +01:00
|
|
|
#ifdef VGM_USE_G7221
|
|
|
|
if (vgmstream->coding_type==coding_G7221 ||
|
|
|
|
vgmstream->coding_type==coding_G7221C) {
|
|
|
|
g7221_codec_data *data = vgmstream->codec_data;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < vgmstream->channels; i++)
|
|
|
|
{
|
|
|
|
g7221_reset(data[i].handle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
2008-07-20 07:41:41 +02:00
|
|
|
|
2013-06-26 11:54:15 +02:00
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2013-06-26 13:36:57 +02:00
|
|
|
if (vgmstream->coding_type==coding_AT3plus) {
|
2013-06-26 11:54:15 +02:00
|
|
|
maiatrac3plus_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
if (data->handle) Atrac3plusDecoder_closeContext(data->handle);
|
|
|
|
data->handle = Atrac3plusDecoder_openContext();
|
|
|
|
data->samples_discard = 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-07-20 09:28:17 +02:00
|
|
|
if (vgmstream->coding_type==coding_ACM) {
|
|
|
|
mus_acm_codec_data *data = vgmstream->codec_data;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
data->current_file = 0;
|
|
|
|
for (i=0;i<data->file_count;i++) {
|
|
|
|
acm_reset(data->files[i]);
|
|
|
|
}
|
|
|
|
}
|
2008-08-02 12:24:28 +02:00
|
|
|
|
|
|
|
if (vgmstream->layout_type==layout_aix) {
|
|
|
|
aix_codec_data *data = vgmstream->codec_data;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
data->current_segment = 0;
|
|
|
|
for (i=0;i<data->segment_count*data->stream_count;i++)
|
|
|
|
{
|
|
|
|
reset_vgmstream(data->adxs[i]);
|
|
|
|
}
|
|
|
|
}
|
2008-08-03 16:58:03 +02:00
|
|
|
|
2009-01-03 12:08:44 +01:00
|
|
|
if (vgmstream->layout_type==layout_aax) {
|
|
|
|
aax_codec_data *data = vgmstream->codec_data;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
data->current_segment = 0;
|
|
|
|
for (i=0;i<data->segment_count;i++)
|
|
|
|
{
|
|
|
|
reset_vgmstream(data->adxs[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-08-03 16:58:03 +02:00
|
|
|
if (
|
|
|
|
vgmstream->coding_type == coding_NWA0 ||
|
|
|
|
vgmstream->coding_type == coding_NWA1 ||
|
|
|
|
vgmstream->coding_type == coding_NWA2 ||
|
|
|
|
vgmstream->coding_type == coding_NWA3 ||
|
|
|
|
vgmstream->coding_type == coding_NWA4 ||
|
|
|
|
vgmstream->coding_type == coding_NWA5
|
|
|
|
) {
|
|
|
|
nwa_codec_data *data = vgmstream->codec_data;
|
|
|
|
reset_nwa(data->nwa);
|
|
|
|
}
|
2012-08-24 19:36:40 +02:00
|
|
|
|
|
|
|
if (vgmstream->layout_type==layout_scd_int) {
|
|
|
|
scd_int_codec_data *data = vgmstream->codec_data;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i=0;i<data->substream_count;i++)
|
|
|
|
{
|
|
|
|
reset_vgmstream(data->substreams[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-05-19 05:58:15 +02:00
|
|
|
}
|
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
/* simply allocate memory for the VGMSTREAM and its channels */
|
|
|
|
VGMSTREAM * allocate_vgmstream(int channel_count, int looped) {
|
|
|
|
VGMSTREAM * vgmstream;
|
2008-05-19 05:58:15 +02:00
|
|
|
VGMSTREAM * start_vgmstream;
|
2008-01-31 07:04:26 +01:00
|
|
|
VGMSTREAMCHANNEL * channels;
|
|
|
|
VGMSTREAMCHANNEL * start_channels;
|
|
|
|
VGMSTREAMCHANNEL * loop_channels;
|
|
|
|
|
2008-04-02 19:50:50 +02:00
|
|
|
if (channel_count <= 0) return NULL;
|
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
vgmstream = calloc(1,sizeof(VGMSTREAM));
|
|
|
|
if (!vgmstream) return NULL;
|
2008-08-03 16:58:03 +02:00
|
|
|
|
|
|
|
vgmstream->ch = NULL;
|
|
|
|
vgmstream->start_ch = NULL;
|
|
|
|
vgmstream->loop_ch = NULL;
|
|
|
|
vgmstream->start_vgmstream = NULL;
|
|
|
|
vgmstream->codec_data = NULL;
|
2008-01-31 07:04:26 +01:00
|
|
|
|
2008-05-19 05:58:15 +02:00
|
|
|
start_vgmstream = calloc(1,sizeof(VGMSTREAM));
|
|
|
|
if (!start_vgmstream) {
|
|
|
|
free(vgmstream);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
vgmstream->start_vgmstream = start_vgmstream;
|
|
|
|
start_vgmstream->start_vgmstream = start_vgmstream;
|
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
channels = calloc(channel_count,sizeof(VGMSTREAMCHANNEL));
|
|
|
|
if (!channels) {
|
|
|
|
free(vgmstream);
|
2008-05-19 05:58:15 +02:00
|
|
|
free(start_vgmstream);
|
2008-01-31 07:04:26 +01:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
vgmstream->ch = channels;
|
|
|
|
vgmstream->channels = channel_count;
|
|
|
|
|
|
|
|
start_channels = calloc(channel_count,sizeof(VGMSTREAMCHANNEL));
|
|
|
|
if (!start_channels) {
|
|
|
|
free(vgmstream);
|
2008-05-19 05:58:15 +02:00
|
|
|
free(start_vgmstream);
|
2008-01-31 07:04:26 +01:00
|
|
|
free(channels);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
vgmstream->start_ch = start_channels;
|
|
|
|
|
|
|
|
if (looped) {
|
|
|
|
loop_channels = calloc(channel_count,sizeof(VGMSTREAMCHANNEL));
|
|
|
|
if (!loop_channels) {
|
|
|
|
free(vgmstream);
|
2008-05-19 05:58:15 +02:00
|
|
|
free(start_vgmstream);
|
2008-01-31 07:04:26 +01:00
|
|
|
free(channels);
|
|
|
|
free(start_channels);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
vgmstream->loop_ch = loop_channels;
|
|
|
|
}
|
|
|
|
|
|
|
|
vgmstream->loop_flag = looped;
|
|
|
|
|
|
|
|
return vgmstream;
|
|
|
|
}
|
|
|
|
|
|
|
|
void close_vgmstream(VGMSTREAM * vgmstream) {
|
2008-05-20 22:19:46 +02:00
|
|
|
int i,j;
|
2008-01-31 07:04:26 +01:00
|
|
|
if (!vgmstream) return;
|
|
|
|
|
2008-06-15 06:01:03 +02:00
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-07-21 07:50:28 +02:00
|
|
|
if (vgmstream->coding_type==coding_ogg_vorbis) {
|
2008-07-05 13:49:29 +02:00
|
|
|
ogg_vorbis_codec_data *data = vgmstream->codec_data;
|
2008-06-15 06:01:03 +02:00
|
|
|
if (vgmstream->codec_data) {
|
|
|
|
OggVorbis_File *ogg_vorbis_file = &(data->ogg_vorbis_file);
|
|
|
|
|
|
|
|
ov_clear(ogg_vorbis_file);
|
|
|
|
|
|
|
|
close_streamfile(data->ov_streamfile.streamfile);
|
|
|
|
free(vgmstream->codec_data);
|
|
|
|
vgmstream->codec_data = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-06-14 02:42:24 +02:00
|
|
|
#if defined(VGM_USE_MP4V2) && defined(VGM_USE_FDKAAC)
|
2012-08-30 14:35:12 +02:00
|
|
|
if (vgmstream->coding_type==coding_MP4_AAC) {
|
|
|
|
mp4_aac_codec_data *data = vgmstream->codec_data;
|
|
|
|
if (vgmstream->codec_data) {
|
|
|
|
if (data->h_aacdecoder) aacDecoder_Close(data->h_aacdecoder);
|
|
|
|
if (data->h_mp4file) MP4Close(data->h_mp4file, 0);
|
|
|
|
if (data->if_file.streamfile) close_streamfile(data->if_file.streamfile);
|
|
|
|
free(vgmstream->codec_data);
|
|
|
|
vgmstream->codec_data = NULL;
|
|
|
|
}
|
|
|
|
}
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2012-08-30 14:35:12 +02:00
|
|
|
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
2008-07-06 17:33:38 +02:00
|
|
|
if (vgmstream->layout_type==layout_fake_mpeg||
|
|
|
|
vgmstream->layout_type==layout_mpeg) {
|
|
|
|
mpeg_codec_data *data = vgmstream->codec_data;
|
2008-07-05 13:49:29 +02:00
|
|
|
|
|
|
|
if (data) {
|
|
|
|
mpg123_delete(data->m);
|
|
|
|
free(vgmstream->codec_data);
|
|
|
|
vgmstream->codec_data = NULL;
|
|
|
|
/* The astute reader will note that a call to mpg123_exit is never
|
2008-07-06 17:33:38 +02:00
|
|
|
* made. While is is evilly breaking our contract with mpg123, it
|
2008-07-05 13:49:29 +02:00
|
|
|
* doesn't actually do anything except set the "initialized" flag
|
|
|
|
* to 0. And if we exit we run the risk of turning it off when
|
|
|
|
* someone else in another thread is using it. */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-03-23 21:57:12 +01:00
|
|
|
#ifdef VGM_USE_G7221
|
|
|
|
if (vgmstream->coding_type == coding_G7221 ||
|
|
|
|
vgmstream->coding_type == coding_G7221C) {
|
|
|
|
|
|
|
|
g7221_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
if (data)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < vgmstream->channels; i++)
|
|
|
|
{
|
|
|
|
g7221_free(data[i].handle);
|
|
|
|
}
|
|
|
|
free(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
vgmstream->codec_data = NULL;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-06-26 11:54:15 +02:00
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2013-06-26 13:36:57 +02:00
|
|
|
if (vgmstream->coding_type == coding_AT3plus) {
|
2013-06-26 11:54:15 +02:00
|
|
|
maiatrac3plus_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
if (data)
|
|
|
|
{
|
|
|
|
if (data->handle) Atrac3plusDecoder_closeContext(data->handle);
|
|
|
|
free(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-07-20 07:41:41 +02:00
|
|
|
if (vgmstream->coding_type==coding_ACM) {
|
|
|
|
mus_acm_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
if (data->files) {
|
|
|
|
int i;
|
|
|
|
for (i=0; i<data->file_count; i++) {
|
|
|
|
/* shouldn't be duplicates */
|
|
|
|
if (data->files[i]) {
|
|
|
|
acm_close(data->files[i]);
|
|
|
|
data->files[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free(data->files);
|
|
|
|
data->files = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
free(vgmstream->codec_data);
|
|
|
|
vgmstream->codec_data = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-08-02 12:24:28 +02:00
|
|
|
if (vgmstream->layout_type==layout_aix) {
|
|
|
|
aix_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
if (data->adxs) {
|
|
|
|
int i;
|
|
|
|
for (i=0;i<data->segment_count*data->stream_count;i++) {
|
|
|
|
|
|
|
|
/* note that the AIX close_streamfile won't do anything but
|
|
|
|
* deallocate itself, there is only one open file and that
|
|
|
|
* is in vgmstream->ch[0].streamfile */
|
|
|
|
close_vgmstream(data->adxs[i]);
|
|
|
|
}
|
|
|
|
free(data->adxs);
|
|
|
|
}
|
|
|
|
if (data->sample_counts) {
|
|
|
|
free(data->sample_counts);
|
|
|
|
}
|
|
|
|
|
|
|
|
free(data);
|
|
|
|
}
|
2008-08-03 16:58:03 +02:00
|
|
|
vgmstream->codec_data = NULL;
|
|
|
|
}
|
2009-01-03 12:08:44 +01:00
|
|
|
if (vgmstream->layout_type==layout_aax) {
|
|
|
|
aax_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
if (data->adxs) {
|
|
|
|
int i;
|
|
|
|
for (i=0;i<data->segment_count;i++) {
|
|
|
|
|
|
|
|
/* note that the AAX close_streamfile won't do anything but
|
|
|
|
* deallocate itself, there is only one open file and that
|
|
|
|
* is in vgmstream->ch[0].streamfile */
|
|
|
|
close_vgmstream(data->adxs[i]);
|
|
|
|
}
|
|
|
|
free(data->adxs);
|
|
|
|
}
|
|
|
|
if (data->sample_counts) {
|
|
|
|
free(data->sample_counts);
|
|
|
|
}
|
|
|
|
|
|
|
|
free(data);
|
|
|
|
}
|
|
|
|
vgmstream->codec_data = NULL;
|
|
|
|
}
|
2008-08-03 16:58:03 +02:00
|
|
|
|
|
|
|
if (
|
|
|
|
vgmstream->coding_type == coding_NWA0 ||
|
|
|
|
vgmstream->coding_type == coding_NWA1 ||
|
|
|
|
vgmstream->coding_type == coding_NWA2 ||
|
|
|
|
vgmstream->coding_type == coding_NWA3 ||
|
|
|
|
vgmstream->coding_type == coding_NWA4 ||
|
|
|
|
vgmstream->coding_type == coding_NWA5
|
|
|
|
) {
|
|
|
|
nwa_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
close_nwa(data->nwa);
|
|
|
|
|
|
|
|
free(data);
|
|
|
|
|
|
|
|
vgmstream->codec_data = NULL;
|
2008-08-02 12:24:28 +02:00
|
|
|
}
|
|
|
|
|
2012-08-24 19:36:40 +02:00
|
|
|
if (vgmstream->layout_type==layout_scd_int) {
|
|
|
|
scd_int_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
if (data->substreams) {
|
|
|
|
int i;
|
|
|
|
for (i=0;i<data->substream_count;i++) {
|
|
|
|
|
|
|
|
/* note that the scd_int close_streamfile won't do anything
|
|
|
|
* but deallocate itself, there is only one open file and
|
|
|
|
* that is in vgmstream->ch[0].streamfile */
|
|
|
|
close_vgmstream(data->substreams[i]);
|
|
|
|
close_streamfile(data->intfiles[i]);
|
|
|
|
}
|
|
|
|
free(data->substreams);
|
|
|
|
free(data->intfiles);
|
|
|
|
}
|
|
|
|
|
|
|
|
free(data);
|
|
|
|
}
|
|
|
|
vgmstream->codec_data = NULL;
|
|
|
|
}
|
|
|
|
|
2008-08-02 12:24:28 +02:00
|
|
|
/* now that the special cases have had their chance, clean up the standard items */
|
|
|
|
for (i=0;i<vgmstream->channels;i++) {
|
|
|
|
if (vgmstream->ch[i].streamfile) {
|
|
|
|
close_streamfile(vgmstream->ch[i].streamfile);
|
|
|
|
/* Multiple channels might have the same streamfile. Find the others
|
|
|
|
* that are the same as this and clear them so they won't be closed
|
|
|
|
* again. */
|
|
|
|
for (j=0;j<vgmstream->channels;j++) {
|
|
|
|
if (i!=j && vgmstream->ch[j].streamfile ==
|
|
|
|
vgmstream->ch[i].streamfile) {
|
|
|
|
vgmstream->ch[j].streamfile = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
vgmstream->ch[i].streamfile = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (vgmstream->loop_ch) free(vgmstream->loop_ch);
|
|
|
|
if (vgmstream->start_ch) free(vgmstream->start_ch);
|
|
|
|
if (vgmstream->ch) free(vgmstream->ch);
|
|
|
|
/* the start_vgmstream is considered just data */
|
|
|
|
if (vgmstream->start_vgmstream) free(vgmstream->start_vgmstream);
|
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
free(vgmstream);
|
|
|
|
}
|
|
|
|
|
2008-05-16 22:28:36 +02:00
|
|
|
int32_t get_vgmstream_play_samples(double looptimes, double fadeseconds, double fadedelayseconds, VGMSTREAM * vgmstream) {
|
2008-01-31 07:04:26 +01:00
|
|
|
if (vgmstream->loop_flag) {
|
2008-05-16 22:28:36 +02:00
|
|
|
return vgmstream->loop_start_sample+(vgmstream->loop_end_sample-vgmstream->loop_start_sample)*looptimes+(fadedelayseconds+fadeseconds)*vgmstream->sample_rate;
|
2008-01-31 07:04:26 +01:00
|
|
|
} else return vgmstream->num_samples;
|
|
|
|
}
|
|
|
|
|
|
|
|
void render_vgmstream(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstream) {
|
|
|
|
switch (vgmstream->layout_type) {
|
|
|
|
case layout_interleave:
|
2008-02-04 16:20:20 +01:00
|
|
|
case layout_interleave_shortblock:
|
2008-01-31 07:04:26 +01:00
|
|
|
render_vgmstream_interleave(buffer,sample_count,vgmstream);
|
|
|
|
break;
|
2008-06-15 09:59:43 +02:00
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-06-15 06:01:03 +02:00
|
|
|
case layout_ogg_vorbis:
|
2008-07-05 13:49:29 +02:00
|
|
|
#endif
|
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
case layout_fake_mpeg:
|
2008-07-06 17:33:38 +02:00
|
|
|
case layout_mpeg:
|
2008-06-15 09:59:43 +02:00
|
|
|
#endif
|
2008-02-13 15:31:21 +01:00
|
|
|
case layout_dtk_interleave:
|
2008-02-05 01:03:39 +01:00
|
|
|
case layout_none:
|
|
|
|
render_vgmstream_nolayout(buffer,sample_count,vgmstream);
|
|
|
|
break;
|
2009-09-02 14:18:23 +02:00
|
|
|
case layout_mxch_blocked:
|
2008-03-04 01:46:55 +01:00
|
|
|
case layout_ast_blocked:
|
2008-03-04 08:15:25 +01:00
|
|
|
case layout_halpst_blocked:
|
2009-04-19 11:49:08 +02:00
|
|
|
case layout_xa_blocked:
|
|
|
|
case layout_ea_blocked:
|
|
|
|
case layout_eacs_blocked:
|
|
|
|
case layout_caf_blocked:
|
2008-06-29 03:30:13 +02:00
|
|
|
case layout_wsi_blocked:
|
2008-07-02 15:39:51 +02:00
|
|
|
case layout_str_snds_blocked:
|
2008-07-03 04:20:52 +02:00
|
|
|
case layout_ws_aud_blocked:
|
2009-04-19 11:49:08 +02:00
|
|
|
case layout_matx_blocked:
|
2008-08-11 09:19:44 +02:00
|
|
|
case layout_de2_blocked:
|
2009-04-19 11:49:08 +02:00
|
|
|
case layout_vs_blocked:
|
|
|
|
case layout_emff_ps2_blocked:
|
|
|
|
case layout_emff_ngc_blocked:
|
|
|
|
case layout_gsb_blocked:
|
|
|
|
case layout_xvas_blocked:
|
|
|
|
case layout_thp_blocked:
|
|
|
|
case layout_filp_blocked:
|
|
|
|
case layout_ivaud_blocked:
|
2010-04-20 22:26:10 +02:00
|
|
|
case layout_psx_mgav_blocked:
|
2010-05-02 21:16:35 +02:00
|
|
|
case layout_ps2_adm_blocked:
|
2010-05-10 10:02:22 +02:00
|
|
|
case layout_dsp_bdsp_blocked:
|
2010-12-03 23:48:51 +01:00
|
|
|
case layout_tra_blocked:
|
2010-12-06 23:22:06 +01:00
|
|
|
case layout_ps2_iab_blocked:
|
2010-12-29 13:33:33 +01:00
|
|
|
case layout_ps2_strlr_blocked:
|
2008-03-04 08:15:25 +01:00
|
|
|
render_vgmstream_blocked(buffer,sample_count,vgmstream);
|
2010-11-24 05:27:59 +01:00
|
|
|
break;
|
2008-07-14 15:30:26 +02:00
|
|
|
case layout_interleave_byte:
|
|
|
|
render_vgmstream_interleave_byte(buffer,sample_count,vgmstream);
|
|
|
|
break;
|
2008-07-20 09:28:17 +02:00
|
|
|
case layout_acm:
|
2008-07-21 01:28:16 +02:00
|
|
|
case layout_mus_acm:
|
2008-07-20 09:28:17 +02:00
|
|
|
render_vgmstream_mus_acm(buffer,sample_count,vgmstream);
|
|
|
|
break;
|
2008-08-02 12:24:28 +02:00
|
|
|
case layout_aix:
|
|
|
|
render_vgmstream_aix(buffer,sample_count,vgmstream);
|
2009-01-17 07:35:39 +01:00
|
|
|
break;
|
2009-01-03 12:08:44 +01:00
|
|
|
case layout_aax:
|
|
|
|
render_vgmstream_aax(buffer,sample_count,vgmstream);
|
2008-08-02 12:24:28 +02:00
|
|
|
break;
|
2012-08-24 19:36:40 +02:00
|
|
|
case layout_scd_int:
|
|
|
|
render_vgmstream_scd_int(buffer,sample_count,vgmstream);
|
|
|
|
break;
|
2008-01-31 07:04:26 +01:00
|
|
|
}
|
|
|
|
}
|
2008-02-05 03:17:35 +01:00
|
|
|
|
|
|
|
int get_vgmstream_samples_per_frame(VGMSTREAM * vgmstream) {
|
|
|
|
switch (vgmstream->coding_type) {
|
|
|
|
case coding_CRI_ADX:
|
2011-08-20 14:00:01 +02:00
|
|
|
case coding_CRI_ADX_enc_8:
|
|
|
|
case coding_CRI_ADX_enc_9:
|
2009-01-04 16:36:06 +01:00
|
|
|
case coding_L5_555:
|
2008-02-05 03:17:35 +01:00
|
|
|
return 32;
|
|
|
|
case coding_NGC_DSP:
|
|
|
|
return 14;
|
|
|
|
case coding_PCM16LE:
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_PCM16LE_int:
|
2010-08-28 03:43:40 +02:00
|
|
|
case coding_PCM16LE_XOR_int:
|
2008-02-05 03:17:35 +01:00
|
|
|
case coding_PCM16BE:
|
|
|
|
case coding_PCM8:
|
2009-04-28 18:52:49 +02:00
|
|
|
case coding_PCM8_U:
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_PCM8_int:
|
2008-07-30 22:58:50 +02:00
|
|
|
case coding_PCM8_SB_int:
|
2008-11-23 13:21:36 +01:00
|
|
|
case coding_PCM8_U_int:
|
2008-06-15 09:59:43 +02:00
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-06-15 06:01:03 +02:00
|
|
|
case coding_ogg_vorbis:
|
2008-07-05 13:49:29 +02:00
|
|
|
#endif
|
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
case coding_fake_MPEG2_L2:
|
2008-07-06 17:33:38 +02:00
|
|
|
case coding_MPEG1_L1:
|
|
|
|
case coding_MPEG1_L2:
|
|
|
|
case coding_MPEG1_L3:
|
|
|
|
case coding_MPEG2_L1:
|
|
|
|
case coding_MPEG2_L2:
|
|
|
|
case coding_MPEG2_L3:
|
|
|
|
case coding_MPEG25_L1:
|
|
|
|
case coding_MPEG25_L2:
|
|
|
|
case coding_MPEG25_L3:
|
2008-06-15 09:59:43 +02:00
|
|
|
#endif
|
2008-07-01 05:23:44 +02:00
|
|
|
case coding_SDX2:
|
2008-07-14 22:42:49 +02:00
|
|
|
case coding_SDX2_int:
|
2010-07-27 14:24:03 +02:00
|
|
|
case coding_CBD2:
|
2008-07-20 07:41:41 +02:00
|
|
|
case coding_ACM:
|
2008-08-03 16:58:03 +02:00
|
|
|
case coding_NWA0:
|
|
|
|
case coding_NWA1:
|
|
|
|
case coding_NWA2:
|
|
|
|
case coding_NWA3:
|
|
|
|
case coding_NWA4:
|
|
|
|
case coding_NWA5:
|
2009-09-04 06:19:39 +02:00
|
|
|
case coding_SASSC:
|
2008-02-05 03:17:35 +01:00
|
|
|
return 1;
|
2008-02-05 10:21:20 +01:00
|
|
|
case coding_NDS_IMA:
|
2009-12-16 07:12:53 +01:00
|
|
|
case coding_DAT4_IMA:
|
2009-04-19 11:49:08 +02:00
|
|
|
return (vgmstream->interleave_block_size-4)*2;
|
2008-02-13 15:31:21 +01:00
|
|
|
case coding_NGC_DTK:
|
|
|
|
return 28;
|
2008-02-14 23:10:08 +01:00
|
|
|
case coding_G721:
|
2008-07-02 03:41:20 +02:00
|
|
|
case coding_DVI_IMA:
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EACS_IMA:
|
2011-02-06 10:49:57 +01:00
|
|
|
case coding_SNDS_IMA:
|
2008-07-03 04:20:52 +02:00
|
|
|
case coding_IMA:
|
2008-02-14 23:10:08 +01:00
|
|
|
return 1;
|
2008-09-23 13:07:41 +02:00
|
|
|
case coding_INT_IMA:
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_INT_DVI_IMA:
|
2008-08-13 08:11:05 +02:00
|
|
|
case coding_AICA:
|
2009-04-19 11:49:08 +02:00
|
|
|
return 2;
|
2008-03-03 22:38:11 +01:00
|
|
|
case coding_NGC_AFC:
|
2008-11-07 00:30:33 +01:00
|
|
|
case coding_FFXI:
|
2008-03-03 22:38:11 +01:00
|
|
|
return 16;
|
2008-05-05 00:10:30 +02:00
|
|
|
case coding_PSX:
|
2008-07-25 21:02:29 +02:00
|
|
|
case coding_PSX_badflags:
|
2008-06-25 22:39:15 +02:00
|
|
|
case coding_invert_PSX:
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_XA:
|
|
|
|
return 28;
|
|
|
|
case coding_XBOX:
|
2009-06-29 23:58:40 +02:00
|
|
|
case coding_INT_XBOX:
|
2011-01-12 02:50:45 +01:00
|
|
|
case coding_BAF_ADPCM:
|
2009-04-19 11:49:08 +02:00
|
|
|
return 64;
|
|
|
|
case coding_EAXA:
|
2008-05-05 00:10:30 +02:00
|
|
|
return 28;
|
2009-09-01 23:28:55 +02:00
|
|
|
case coding_MAXIS_ADPCM:
|
2009-09-02 16:25:42 +02:00
|
|
|
case coding_EA_ADPCM:
|
2009-09-01 23:28:55 +02:00
|
|
|
return 14*vgmstream->channels;
|
2008-07-03 23:21:01 +02:00
|
|
|
case coding_WS:
|
2008-07-04 02:06:51 +02:00
|
|
|
/* only works if output sample size is 8 bit, which is always
|
|
|
|
is for WS ADPCM */
|
|
|
|
return vgmstream->ws_output_size;
|
2008-08-11 09:19:44 +02:00
|
|
|
case coding_MSADPCM:
|
2008-08-11 10:10:59 +02:00
|
|
|
return (vgmstream->interleave_block_size-(7-1)*vgmstream->channels)*2/vgmstream->channels;
|
2009-08-30 04:16:54 +02:00
|
|
|
case coding_APPLE_IMA4:
|
|
|
|
return 64;
|
2009-03-09 13:48:53 +01:00
|
|
|
case coding_MS_IMA:
|
2009-09-12 06:51:39 +02:00
|
|
|
case coding_RAD_IMA:
|
2009-03-09 13:48:53 +01:00
|
|
|
return (vgmstream->interleave_block_size-4*vgmstream->channels)*2/vgmstream->channels;
|
2010-04-10 14:06:25 +02:00
|
|
|
case coding_RAD_IMA_mono:
|
|
|
|
return 32;
|
2008-12-28 07:29:43 +01:00
|
|
|
case coding_NDS_PROCYON:
|
|
|
|
return 30;
|
2010-03-21 05:23:18 +01:00
|
|
|
#ifdef VGM_USE_G7221
|
|
|
|
case coding_G7221C:
|
|
|
|
return 32000/50;
|
|
|
|
case coding_G7221:
|
|
|
|
return 16000/50;
|
|
|
|
#endif
|
2011-01-13 09:11:58 +01:00
|
|
|
case coding_LSF:
|
|
|
|
return 54;
|
2011-05-07 13:05:05 +02:00
|
|
|
case coding_MTAF:
|
|
|
|
return 0x80*2;
|
2013-06-14 02:42:24 +02:00
|
|
|
#if defined(VGM_USE_MP4V2) && defined(VGM_USE_FDKAAC)
|
2012-08-30 14:35:12 +02:00
|
|
|
case coding_MP4_AAC:
|
|
|
|
return ((mp4_aac_codec_data*)vgmstream->codec_data)->samples_per_frame;
|
2013-06-26 11:54:15 +02:00
|
|
|
#endif
|
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2013-06-26 13:36:57 +02:00
|
|
|
case coding_AT3plus:
|
2013-06-26 11:54:15 +02:00
|
|
|
return 2048 - ((maiatrac3plus_codec_data*)vgmstream->codec_data)->samples_discard;
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2008-02-05 03:17:35 +01:00
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-02-05 10:21:20 +01:00
|
|
|
int get_vgmstream_samples_per_shortframe(VGMSTREAM * vgmstream) {
|
|
|
|
switch (vgmstream->coding_type) {
|
|
|
|
case coding_NDS_IMA:
|
|
|
|
return (vgmstream->interleave_smallblock_size-4)*2;
|
|
|
|
default:
|
|
|
|
return get_vgmstream_samples_per_frame(vgmstream);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-02-05 03:17:35 +01:00
|
|
|
int get_vgmstream_frame_size(VGMSTREAM * vgmstream) {
|
|
|
|
switch (vgmstream->coding_type) {
|
|
|
|
case coding_CRI_ADX:
|
2011-08-20 14:00:01 +02:00
|
|
|
case coding_CRI_ADX_enc_8:
|
|
|
|
case coding_CRI_ADX_enc_9:
|
2009-01-04 16:36:06 +01:00
|
|
|
case coding_L5_555:
|
2008-02-05 03:17:35 +01:00
|
|
|
return 18;
|
|
|
|
case coding_NGC_DSP:
|
|
|
|
return 8;
|
|
|
|
case coding_PCM16LE:
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_PCM16LE_int:
|
2010-08-28 03:43:40 +02:00
|
|
|
case coding_PCM16LE_XOR_int:
|
2008-02-05 03:17:35 +01:00
|
|
|
case coding_PCM16BE:
|
|
|
|
return 2;
|
|
|
|
case coding_PCM8:
|
2009-04-28 18:52:49 +02:00
|
|
|
case coding_PCM8_U:
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_PCM8_int:
|
2008-07-30 22:58:50 +02:00
|
|
|
case coding_PCM8_SB_int:
|
2008-11-23 13:21:36 +01:00
|
|
|
case coding_PCM8_U_int:
|
2008-07-01 05:23:44 +02:00
|
|
|
case coding_SDX2:
|
2008-07-14 22:42:49 +02:00
|
|
|
case coding_SDX2_int:
|
2010-07-27 14:24:03 +02:00
|
|
|
case coding_CBD2:
|
2008-08-03 16:58:03 +02:00
|
|
|
case coding_NWA0:
|
|
|
|
case coding_NWA1:
|
|
|
|
case coding_NWA2:
|
|
|
|
case coding_NWA3:
|
|
|
|
case coding_NWA4:
|
|
|
|
case coding_NWA5:
|
2009-09-04 06:19:39 +02:00
|
|
|
case coding_SASSC:
|
2008-02-05 03:17:35 +01:00
|
|
|
return 1;
|
2009-03-09 13:48:53 +01:00
|
|
|
case coding_MS_IMA:
|
2009-09-12 06:51:39 +02:00
|
|
|
case coding_RAD_IMA:
|
2008-02-05 10:21:20 +01:00
|
|
|
case coding_NDS_IMA:
|
2009-12-16 07:12:53 +01:00
|
|
|
case coding_DAT4_IMA:
|
2008-02-05 10:21:20 +01:00
|
|
|
return vgmstream->interleave_block_size;
|
2010-04-10 14:06:25 +02:00
|
|
|
case coding_RAD_IMA_mono:
|
|
|
|
return 0x14;
|
2008-02-13 15:31:21 +01:00
|
|
|
case coding_NGC_DTK:
|
|
|
|
return 32;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EACS_IMA:
|
|
|
|
return 1;
|
2008-07-02 03:41:20 +02:00
|
|
|
case coding_DVI_IMA:
|
2008-07-03 04:20:52 +02:00
|
|
|
case coding_IMA:
|
2008-02-14 23:10:08 +01:00
|
|
|
case coding_G721:
|
2011-02-06 10:49:57 +01:00
|
|
|
case coding_SNDS_IMA:
|
2008-02-14 23:10:08 +01:00
|
|
|
return 0;
|
2008-03-03 22:38:11 +01:00
|
|
|
case coding_NGC_AFC:
|
2008-11-07 00:30:33 +01:00
|
|
|
case coding_FFXI:
|
2008-03-03 22:38:11 +01:00
|
|
|
return 9;
|
2008-05-05 00:10:30 +02:00
|
|
|
case coding_PSX:
|
2008-07-25 21:02:29 +02:00
|
|
|
case coding_PSX_badflags:
|
2008-06-25 22:39:15 +02:00
|
|
|
case coding_invert_PSX:
|
2008-12-28 07:29:43 +01:00
|
|
|
case coding_NDS_PROCYON:
|
2008-05-05 00:10:30 +02:00
|
|
|
return 16;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_XA:
|
|
|
|
return 14*vgmstream->channels;
|
|
|
|
case coding_XBOX:
|
2009-06-29 23:58:40 +02:00
|
|
|
case coding_INT_XBOX:
|
2009-04-19 11:49:08 +02:00
|
|
|
return 36;
|
2009-09-02 16:25:42 +02:00
|
|
|
case coding_MAXIS_ADPCM:
|
|
|
|
return 15*vgmstream->channels;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EA_ADPCM:
|
|
|
|
return 30;
|
|
|
|
case coding_EAXA:
|
|
|
|
return 1; // the frame is variant in size
|
2008-07-03 23:21:01 +02:00
|
|
|
case coding_WS:
|
|
|
|
return vgmstream->current_block_size;
|
2008-09-23 13:07:41 +02:00
|
|
|
case coding_INT_IMA:
|
2008-07-18 21:35:29 +02:00
|
|
|
case coding_INT_DVI_IMA:
|
2008-08-13 08:11:05 +02:00
|
|
|
case coding_AICA:
|
2009-04-19 11:49:08 +02:00
|
|
|
return 1;
|
2009-08-30 04:16:54 +02:00
|
|
|
case coding_APPLE_IMA4:
|
|
|
|
return 34;
|
2011-01-12 02:50:45 +01:00
|
|
|
case coding_BAF_ADPCM:
|
2010-09-11 22:57:39 +02:00
|
|
|
return 33;
|
2011-01-13 09:11:58 +01:00
|
|
|
case coding_LSF:
|
|
|
|
return 28;
|
2010-03-21 05:23:18 +01:00
|
|
|
#ifdef VGM_USE_G7221
|
|
|
|
case coding_G7221C:
|
|
|
|
case coding_G7221:
|
2013-06-26 11:54:15 +02:00
|
|
|
#endif
|
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2013-06-26 13:36:57 +02:00
|
|
|
case coding_AT3plus:
|
2010-03-21 05:23:18 +01:00
|
|
|
#endif
|
2008-08-11 09:19:44 +02:00
|
|
|
case coding_MSADPCM:
|
2011-05-07 13:05:05 +02:00
|
|
|
case coding_MTAF:
|
2008-08-11 09:19:44 +02:00
|
|
|
return vgmstream->interleave_block_size;
|
2008-02-05 03:17:35 +01:00
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-02-05 10:21:20 +01:00
|
|
|
int get_vgmstream_shortframe_size(VGMSTREAM * vgmstream) {
|
|
|
|
switch (vgmstream->coding_type) {
|
|
|
|
case coding_NDS_IMA:
|
|
|
|
return vgmstream->interleave_smallblock_size;
|
|
|
|
default:
|
|
|
|
return get_vgmstream_frame_size(vgmstream);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-07-14 15:30:26 +02:00
|
|
|
void decode_vgmstream_mem(VGMSTREAM * vgmstream, int samples_written, int samples_to_do, sample * buffer, uint8_t * data, int channel) {
|
|
|
|
|
|
|
|
switch (vgmstream->coding_type) {
|
|
|
|
case coding_NGC_DSP:
|
|
|
|
decode_ngc_dsp_mem(&vgmstream->ch[channel],
|
|
|
|
buffer+samples_written*vgmstream->channels+channel,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do, data);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-02-05 03:17:35 +01:00
|
|
|
void decode_vgmstream(VGMSTREAM * vgmstream, int samples_written, int samples_to_do, sample * buffer) {
|
|
|
|
int chan;
|
|
|
|
|
|
|
|
switch (vgmstream->coding_type) {
|
|
|
|
case coding_CRI_ADX:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_adx(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
|
2008-12-24 08:19:15 +01:00
|
|
|
break;
|
2011-08-20 14:00:01 +02:00
|
|
|
case coding_CRI_ADX_enc_8:
|
|
|
|
case coding_CRI_ADX_enc_9:
|
2008-12-24 08:19:15 +01:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_adx_enc(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
|
2008-02-05 03:17:35 +01:00
|
|
|
break;
|
|
|
|
case coding_NGC_DSP:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2008-03-03 22:38:11 +01:00
|
|
|
decode_ngc_dsp(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
2008-02-05 03:17:35 +01:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case coding_PCM16LE:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_pcm16LE(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-07-14 22:42:49 +02:00
|
|
|
case coding_PCM16LE_int:
|
2008-07-14 21:21:45 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2008-07-14 22:42:49 +02:00
|
|
|
decode_pcm16LE_int(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
2008-07-14 21:21:45 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2010-08-28 03:43:40 +02:00
|
|
|
case coding_PCM16LE_XOR_int:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_pcm16LE_XOR_int(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-02-05 03:17:35 +01:00
|
|
|
case coding_PCM16BE:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_pcm16BE(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case coding_PCM8:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_pcm8(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2009-04-28 18:52:49 +02:00
|
|
|
case coding_PCM8_U:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_pcm8_unsigned(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-07-14 22:42:49 +02:00
|
|
|
case coding_PCM8_int:
|
2008-07-14 21:21:45 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2008-07-14 22:42:49 +02:00
|
|
|
decode_pcm8_int(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
2008-07-14 21:21:45 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-07-30 22:58:50 +02:00
|
|
|
case coding_PCM8_SB_int:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_pcm8_sb_int(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-11-23 13:21:36 +01:00
|
|
|
case coding_PCM8_U_int:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_pcm8_unsigned_int(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-02-05 10:21:20 +01:00
|
|
|
case coding_NDS_IMA:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_nds_ima(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2008-05-24 00:52:02 +02:00
|
|
|
break;
|
2009-12-16 07:12:53 +01:00
|
|
|
case coding_DAT4_IMA:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_dat4_ima(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_XBOX:
|
2008-05-24 00:52:02 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2008-09-21 16:58:50 +02:00
|
|
|
decode_xbox_ima(vgmstream,&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
2008-05-24 00:52:02 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
2009-03-09 13:48:53 +01:00
|
|
|
break;
|
2009-06-29 23:58:40 +02:00
|
|
|
case coding_INT_XBOX:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_int_xbox_ima(vgmstream,&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_MS_IMA:
|
2009-03-09 13:48:53 +01:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_ms_ima(vgmstream,&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
2008-02-05 10:21:20 +01:00
|
|
|
break;
|
2009-09-12 06:51:39 +02:00
|
|
|
case coding_RAD_IMA:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_rad_ima(vgmstream,&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
|
|
|
break;
|
2010-04-10 14:06:25 +02:00
|
|
|
case coding_RAD_IMA_mono:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_rad_ima_mono(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-02-13 15:31:21 +01:00
|
|
|
case coding_NGC_DTK:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_ngc_dtk(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
|
|
|
break;
|
2008-02-14 23:10:08 +01:00
|
|
|
case coding_G721:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_g721(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-03-03 22:38:11 +01:00
|
|
|
case coding_NGC_AFC:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_ngc_afc(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-05-04 22:36:40 +02:00
|
|
|
case coding_PSX:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2009-09-01 23:28:55 +02:00
|
|
|
if(vgmstream->skip_last_channel)
|
|
|
|
{
|
|
|
|
if(chan!=vgmstream->channels-1) {
|
|
|
|
decode_psx(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
decode_psx(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
2008-05-04 22:36:40 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
2009-09-01 23:28:55 +02:00
|
|
|
}
|
2008-05-04 22:36:40 +02:00
|
|
|
}
|
2008-06-25 22:39:15 +02:00
|
|
|
break;
|
2008-07-25 21:02:29 +02:00
|
|
|
case coding_PSX_badflags:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_psx_badflags(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-06-25 22:39:15 +02:00
|
|
|
case coding_invert_PSX:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_invert_psx(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2008-11-07 00:30:33 +01:00
|
|
|
break;
|
|
|
|
case coding_FFXI:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_ffxi_adpcm(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2008-05-04 22:36:40 +02:00
|
|
|
break;
|
2011-01-12 02:50:45 +01:00
|
|
|
case coding_BAF_ADPCM:
|
2010-09-11 22:57:39 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2011-01-12 02:50:45 +01:00
|
|
|
decode_baf_adpcm(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
2010-09-11 22:57:39 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_XA:
|
2008-05-10 21:59:29 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2008-07-14 22:42:49 +02:00
|
|
|
decode_xa(vgmstream,buffer+samples_written*vgmstream->channels+chan,
|
2008-05-10 21:59:29 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
2008-07-14 22:42:49 +02:00
|
|
|
samples_to_do,chan);
|
2008-05-10 21:59:29 +02:00
|
|
|
}
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EAXA:
|
2008-06-02 19:58:08 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_eaxa(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EA_ADPCM:
|
2008-07-14 21:21:45 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2008-07-14 22:42:49 +02:00
|
|
|
decode_ea_adpcm(vgmstream,buffer+samples_written*vgmstream->channels+chan,
|
2008-07-14 21:21:45 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
|
|
|
break;
|
2009-09-01 23:28:55 +02:00
|
|
|
case coding_MAXIS_ADPCM:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_maxis_adpcm(vgmstream,buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
|
|
|
break;
|
2008-06-15 06:01:03 +02:00
|
|
|
#ifdef VGM_USE_VORBIS
|
|
|
|
case coding_ogg_vorbis:
|
|
|
|
decode_ogg_vorbis(vgmstream->codec_data,
|
|
|
|
buffer+samples_written*vgmstream->channels,samples_to_do,
|
|
|
|
vgmstream->channels);
|
|
|
|
break;
|
|
|
|
#endif
|
2013-06-14 02:42:24 +02:00
|
|
|
#if defined(VGM_USE_MP4V2) && defined(VGM_USE_FDKAAC)
|
2012-08-30 14:35:12 +02:00
|
|
|
case coding_MP4_AAC:
|
|
|
|
decode_mp4_aac(vgmstream->codec_data,
|
|
|
|
buffer+samples_written*vgmstream->channels,samples_to_do,
|
|
|
|
vgmstream->channels);
|
|
|
|
break;
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2008-07-01 05:23:44 +02:00
|
|
|
case coding_SDX2:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_sdx2(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2008-07-14 22:42:49 +02:00
|
|
|
break;
|
|
|
|
case coding_SDX2_int:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_sdx2_int(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2008-07-01 05:23:44 +02:00
|
|
|
break;
|
2010-07-27 14:24:03 +02:00
|
|
|
case coding_CBD2:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_cbd2(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case coding_CBD2_int:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_cbd2_int(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_DVI_IMA:
|
|
|
|
case coding_INT_DVI_IMA:
|
2008-07-02 03:41:20 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_dvi_ima(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2008-07-14 21:21:45 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EACS_IMA:
|
2008-07-14 21:21:45 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2008-07-14 22:42:49 +02:00
|
|
|
decode_eacs_ima(vgmstream,buffer+samples_written*vgmstream->channels+chan,
|
2008-07-14 21:21:45 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
2008-07-14 22:42:49 +02:00
|
|
|
samples_to_do,chan);
|
2008-07-14 21:21:45 +02:00
|
|
|
}
|
2008-07-02 03:41:20 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_IMA:
|
2008-09-23 13:07:41 +02:00
|
|
|
case coding_INT_IMA:
|
2008-07-03 04:20:52 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_ima(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2009-08-30 04:16:54 +02:00
|
|
|
case coding_APPLE_IMA4:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_apple_ima4(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2011-02-06 10:49:57 +01:00
|
|
|
case coding_SNDS_IMA:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_snds_ima(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do,chan);
|
|
|
|
}
|
|
|
|
break;
|
2008-07-03 23:21:01 +02:00
|
|
|
case coding_WS:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2008-07-04 02:06:51 +02:00
|
|
|
decode_ws(vgmstream,chan,buffer+samples_written*vgmstream->channels+chan,
|
2008-07-03 23:21:01 +02:00
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
case coding_fake_MPEG2_L2:
|
2008-07-06 17:33:38 +02:00
|
|
|
decode_fake_mpeg2_l2(
|
|
|
|
&vgmstream->ch[0],
|
|
|
|
vgmstream->codec_data,
|
|
|
|
buffer+samples_written*vgmstream->channels,samples_to_do);
|
|
|
|
break;
|
|
|
|
case coding_MPEG1_L1:
|
|
|
|
case coding_MPEG1_L2:
|
|
|
|
case coding_MPEG1_L3:
|
|
|
|
case coding_MPEG2_L1:
|
|
|
|
case coding_MPEG2_L2:
|
|
|
|
case coding_MPEG2_L3:
|
|
|
|
case coding_MPEG25_L1:
|
|
|
|
case coding_MPEG25_L2:
|
|
|
|
case coding_MPEG25_L3:
|
|
|
|
decode_mpeg(
|
|
|
|
&vgmstream->ch[0],
|
|
|
|
vgmstream->codec_data,
|
|
|
|
buffer+samples_written*vgmstream->channels,samples_to_do,
|
|
|
|
vgmstream->channels);
|
2008-07-05 13:49:29 +02:00
|
|
|
break;
|
2010-03-21 05:23:18 +01:00
|
|
|
#endif
|
|
|
|
#ifdef VGM_USE_G7221
|
|
|
|
case coding_G7221:
|
|
|
|
case coding_G7221C:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_g7221(vgmstream,
|
2010-03-23 21:57:12 +01:00
|
|
|
buffer+samples_written*vgmstream->channels+chan,
|
2010-03-21 05:23:18 +01:00
|
|
|
vgmstream->channels,
|
|
|
|
samples_to_do,
|
|
|
|
chan);
|
|
|
|
}
|
|
|
|
break;
|
2013-06-26 11:54:15 +02:00
|
|
|
#endif
|
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2013-06-26 13:36:57 +02:00
|
|
|
case coding_AT3plus:
|
2013-06-26 11:54:15 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
2013-06-26 13:36:57 +02:00
|
|
|
decode_at3plus(vgmstream,
|
2013-06-26 11:54:15 +02:00
|
|
|
buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,
|
|
|
|
samples_to_do,
|
|
|
|
chan);
|
|
|
|
}
|
|
|
|
break;
|
2008-08-02 12:24:28 +02:00
|
|
|
#endif
|
2008-07-20 07:41:41 +02:00
|
|
|
case coding_ACM:
|
2008-07-20 09:28:17 +02:00
|
|
|
/* handled in its own layout, here to quiet compiler */
|
2008-07-20 07:41:41 +02:00
|
|
|
break;
|
2008-08-03 16:58:03 +02:00
|
|
|
case coding_NWA0:
|
|
|
|
case coding_NWA1:
|
|
|
|
case coding_NWA2:
|
|
|
|
case coding_NWA3:
|
|
|
|
case coding_NWA4:
|
|
|
|
case coding_NWA5:
|
|
|
|
decode_nwa(((nwa_codec_data*)vgmstream->codec_data)->nwa,
|
|
|
|
buffer+samples_written*vgmstream->channels,
|
|
|
|
samples_to_do
|
|
|
|
);
|
|
|
|
break;
|
2008-08-11 09:19:44 +02:00
|
|
|
case coding_MSADPCM:
|
|
|
|
if (vgmstream->channels == 2) {
|
|
|
|
decode_msadpcm_stereo(vgmstream,
|
|
|
|
buffer+samples_written*vgmstream->channels,
|
|
|
|
vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2010-04-12 05:35:58 +02:00
|
|
|
else if (vgmstream->channels == 1)
|
|
|
|
{
|
|
|
|
decode_msadpcm_mono(vgmstream,
|
|
|
|
buffer+samples_written*vgmstream->channels,
|
|
|
|
vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2008-08-11 10:10:59 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_AICA:
|
2008-08-13 08:11:05 +02:00
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_aica(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
break;
|
2008-12-28 07:29:43 +01:00
|
|
|
case coding_NDS_PROCYON:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_nds_procyon(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2009-01-04 16:36:06 +01:00
|
|
|
break;
|
|
|
|
case coding_L5_555:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_l5_555(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
|
2009-09-04 06:19:39 +02:00
|
|
|
break;
|
|
|
|
case coding_SASSC:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_SASSC(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
|
|
|
|
2011-01-13 09:11:58 +01:00
|
|
|
break;
|
|
|
|
case coding_LSF:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_lsf(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels,vgmstream->samples_into_block,
|
|
|
|
samples_to_do);
|
|
|
|
}
|
2008-12-28 07:29:43 +01:00
|
|
|
break;
|
2011-05-07 13:05:05 +02:00
|
|
|
case coding_MTAF:
|
|
|
|
for (chan=0;chan<vgmstream->channels;chan++) {
|
|
|
|
decode_mtaf(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
|
|
|
vgmstream->channels, vgmstream->samples_into_block, samples_to_do,
|
|
|
|
chan, vgmstream->channels);
|
|
|
|
}
|
|
|
|
break;
|
2008-02-05 03:17:35 +01:00
|
|
|
}
|
|
|
|
}
|
2008-02-05 07:21:57 +01:00
|
|
|
|
|
|
|
int vgmstream_samples_to_do(int samples_this_block, int samples_per_frame, VGMSTREAM * vgmstream) {
|
|
|
|
int samples_to_do;
|
|
|
|
int samples_left_this_block;
|
|
|
|
|
|
|
|
samples_left_this_block = samples_this_block - vgmstream->samples_into_block;
|
|
|
|
samples_to_do = samples_left_this_block;
|
|
|
|
|
|
|
|
/* fun loopy crap */
|
|
|
|
/* Why did I think this would be any simpler? */
|
|
|
|
if (vgmstream->loop_flag) {
|
|
|
|
/* are we going to hit the loop end during this block? */
|
|
|
|
if (vgmstream->current_sample+samples_left_this_block > vgmstream->loop_end_sample) {
|
|
|
|
/* only do to just before it */
|
|
|
|
samples_to_do = vgmstream->loop_end_sample-vgmstream->current_sample;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* are we going to hit the loop start during this block? */
|
|
|
|
if (!vgmstream->hit_loop && vgmstream->current_sample+samples_left_this_block > vgmstream->loop_start_sample) {
|
|
|
|
/* only do to just before it */
|
|
|
|
samples_to_do = vgmstream->loop_start_sample-vgmstream->current_sample;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* if it's a framed encoding don't do more than one frame */
|
|
|
|
if (samples_per_frame>1 && (vgmstream->samples_into_block%samples_per_frame)+samples_to_do>samples_per_frame) samples_to_do=samples_per_frame-(vgmstream->samples_into_block%samples_per_frame);
|
|
|
|
|
|
|
|
return samples_to_do;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* return 1 if we just looped */
|
|
|
|
int vgmstream_do_loop(VGMSTREAM * vgmstream) {
|
|
|
|
/* if (vgmstream->loop_flag) {*/
|
|
|
|
/* is this the loop end? */
|
|
|
|
if (vgmstream->current_sample==vgmstream->loop_end_sample) {
|
2008-04-02 18:11:53 +02:00
|
|
|
/* against everything I hold sacred, preserve adpcm
|
|
|
|
* history through loop for certain types */
|
2008-03-31 22:17:07 +02:00
|
|
|
if (vgmstream->meta_type == meta_DSP_STD ||
|
2008-04-02 18:11:53 +02:00
|
|
|
vgmstream->meta_type == meta_DSP_RS03 ||
|
2008-05-06 00:45:21 +02:00
|
|
|
vgmstream->meta_type == meta_DSP_CSTR ||
|
2009-04-19 11:49:08 +02:00
|
|
|
vgmstream->coding_type == coding_PSX ||
|
2008-07-25 21:02:29 +02:00
|
|
|
vgmstream->coding_type == coding_invert_PSX ||
|
|
|
|
vgmstream->coding_type == coding_PSX_badflags) {
|
2008-03-31 22:17:07 +02:00
|
|
|
int i;
|
|
|
|
for (i=0;i<vgmstream->channels;i++) {
|
|
|
|
vgmstream->loop_ch[i].adpcm_history1_16 = vgmstream->ch[i].adpcm_history1_16;
|
|
|
|
vgmstream->loop_ch[i].adpcm_history2_16 = vgmstream->ch[i].adpcm_history2_16;
|
2008-05-11 20:11:55 +02:00
|
|
|
vgmstream->loop_ch[i].adpcm_history1_32 = vgmstream->ch[i].adpcm_history1_32;
|
|
|
|
vgmstream->loop_ch[i].adpcm_history2_32 = vgmstream->ch[i].adpcm_history2_32;
|
2008-03-31 22:17:07 +02:00
|
|
|
}
|
2008-03-25 08:30:04 +01:00
|
|
|
}
|
2008-05-17 00:52:31 +02:00
|
|
|
#ifdef DEBUG
|
2008-04-02 18:11:53 +02:00
|
|
|
{
|
2008-03-31 22:17:07 +02:00
|
|
|
int i;
|
|
|
|
for (i=0;i<vgmstream->channels;i++) {
|
2008-04-02 18:11:53 +02:00
|
|
|
fprintf(stderr,"ch%d hist: %04x %04x loop hist: %04x %04x\n",i,
|
|
|
|
vgmstream->ch[i].adpcm_history1_16,vgmstream->ch[i].adpcm_history2_16,
|
|
|
|
vgmstream->loop_ch[i].adpcm_history1_16,vgmstream->loop_ch[i].adpcm_history2_16);
|
|
|
|
fprintf(stderr,"ch%d offset: %x loop offset: %x\n",i,
|
|
|
|
vgmstream->ch[i].offset,
|
|
|
|
vgmstream->loop_ch[i].offset);
|
2008-03-31 22:17:07 +02:00
|
|
|
}
|
2008-04-02 18:11:53 +02:00
|
|
|
}
|
|
|
|
#endif
|
2008-06-15 06:01:03 +02:00
|
|
|
|
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-07-21 07:50:28 +02:00
|
|
|
if (vgmstream->coding_type==coding_ogg_vorbis) {
|
2008-06-15 06:01:03 +02:00
|
|
|
ogg_vorbis_codec_data *data =
|
|
|
|
(ogg_vorbis_codec_data *)(vgmstream->codec_data);
|
|
|
|
OggVorbis_File *ogg_vorbis_file = &(data->ogg_vorbis_file);
|
|
|
|
|
|
|
|
ov_pcm_seek_lap(ogg_vorbis_file, vgmstream->loop_sample);
|
|
|
|
}
|
2008-07-06 17:33:38 +02:00
|
|
|
#endif
|
2013-06-14 02:42:24 +02:00
|
|
|
#if defined(VGM_USE_MP4V2) && defined(VGM_USE_FDKAAC)
|
2012-08-30 14:35:12 +02:00
|
|
|
if (vgmstream->coding_type==coding_MP4_AAC) {
|
|
|
|
mp4_aac_codec_data *data = (mp4_aac_codec_data *)(vgmstream->codec_data);
|
|
|
|
data->sampleId = 0;
|
|
|
|
data->sample_ptr = data->samples_per_frame;
|
|
|
|
data->samples_discard = vgmstream->loop_sample;
|
|
|
|
}
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2013-06-26 11:54:15 +02:00
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2013-06-26 13:36:57 +02:00
|
|
|
if (vgmstream->coding_type==coding_AT3plus) {
|
2013-06-26 11:54:15 +02:00
|
|
|
int blocks_to_skip = vgmstream->loop_sample / 2048;
|
|
|
|
int samples_to_discard = vgmstream->loop_sample % 2048;
|
|
|
|
maiatrac3plus_codec_data *data = (maiatrac3plus_codec_data *)(vgmstream->codec_data);
|
|
|
|
vgmstream->loop_ch[0].offset =
|
|
|
|
vgmstream->loop_ch[0].channel_start_offset +
|
2013-06-26 20:23:46 +02:00
|
|
|
vgmstream->interleave_block_size * blocks_to_skip;
|
2013-06-26 11:54:15 +02:00
|
|
|
data->samples_discard = samples_to_discard;
|
|
|
|
}
|
|
|
|
#endif
|
2008-07-06 17:33:38 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
/* won't work for fake MPEG */
|
|
|
|
if (vgmstream->layout_type==layout_mpeg) {
|
|
|
|
off_t input_offset;
|
|
|
|
mpeg_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
mpg123_feedseek(data->m,vgmstream->loop_sample,
|
|
|
|
SEEK_SET,&input_offset);
|
2008-07-10 16:37:09 +02:00
|
|
|
vgmstream->loop_ch[0].offset =
|
|
|
|
vgmstream->loop_ch[0].channel_start_offset + input_offset;
|
2008-07-06 17:33:38 +02:00
|
|
|
data->buffer_full = data->buffer_used = 0;
|
|
|
|
}
|
2008-06-15 06:01:03 +02:00
|
|
|
#endif
|
2008-08-03 17:21:05 +02:00
|
|
|
|
|
|
|
if (vgmstream->coding_type == coding_NWA0 ||
|
|
|
|
vgmstream->coding_type == coding_NWA1 ||
|
|
|
|
vgmstream->coding_type == coding_NWA2 ||
|
|
|
|
vgmstream->coding_type == coding_NWA3 ||
|
|
|
|
vgmstream->coding_type == coding_NWA4 ||
|
|
|
|
vgmstream->coding_type == coding_NWA5)
|
|
|
|
{
|
|
|
|
nwa_codec_data *data = vgmstream->codec_data;
|
|
|
|
|
|
|
|
seek_nwa(data->nwa, vgmstream->loop_sample);
|
|
|
|
}
|
|
|
|
|
2008-02-05 07:21:57 +01:00
|
|
|
/* restore! */
|
|
|
|
memcpy(vgmstream->ch,vgmstream->loop_ch,sizeof(VGMSTREAMCHANNEL)*vgmstream->channels);
|
|
|
|
vgmstream->current_sample=vgmstream->loop_sample;
|
|
|
|
vgmstream->samples_into_block=vgmstream->loop_samples_into_block;
|
2008-03-04 01:46:55 +01:00
|
|
|
vgmstream->current_block_size=vgmstream->loop_block_size;
|
|
|
|
vgmstream->current_block_offset=vgmstream->loop_block_offset;
|
|
|
|
vgmstream->next_block_offset=vgmstream->loop_next_block_offset;
|
2008-02-05 07:21:57 +01:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* is this the loop start? */
|
|
|
|
if (!vgmstream->hit_loop && vgmstream->current_sample==vgmstream->loop_start_sample) {
|
|
|
|
/* save! */
|
|
|
|
memcpy(vgmstream->loop_ch,vgmstream->ch,sizeof(VGMSTREAMCHANNEL)*vgmstream->channels);
|
|
|
|
|
|
|
|
vgmstream->loop_sample=vgmstream->current_sample;
|
|
|
|
vgmstream->loop_samples_into_block=vgmstream->samples_into_block;
|
2008-03-04 01:46:55 +01:00
|
|
|
vgmstream->loop_block_size=vgmstream->current_block_size;
|
|
|
|
vgmstream->loop_block_offset=vgmstream->current_block_offset;
|
|
|
|
vgmstream->loop_next_block_offset=vgmstream->next_block_offset;
|
2008-02-05 07:21:57 +01:00
|
|
|
vgmstream->hit_loop=1;
|
|
|
|
}
|
2008-03-31 22:17:07 +02:00
|
|
|
/*}*/
|
|
|
|
return 0;
|
2008-02-05 07:21:57 +01:00
|
|
|
}
|
2008-02-05 07:44:44 +01:00
|
|
|
|
2008-03-11 02:27:59 +01:00
|
|
|
/* build a descriptive string */
|
|
|
|
void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
|
|
|
|
#define TEMPSIZE 256
|
|
|
|
char temp[TEMPSIZE];
|
|
|
|
|
2008-02-05 07:44:44 +01:00
|
|
|
if (!vgmstream) {
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"NULL VGMSTREAM");
|
|
|
|
concatn(length,desc,temp);
|
2008-02-05 07:44:44 +01:00
|
|
|
return;
|
|
|
|
}
|
2008-03-11 02:27:59 +01:00
|
|
|
|
|
|
|
snprintf(temp,TEMPSIZE,"sample rate %d Hz\n"
|
|
|
|
"channels: %d\n",
|
|
|
|
vgmstream->sample_rate,vgmstream->channels);
|
|
|
|
concatn(length,desc,temp);
|
|
|
|
|
2008-02-05 07:44:44 +01:00
|
|
|
if (vgmstream->loop_flag) {
|
2011-07-07 17:25:38 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"loop start: %d samples (%.4f seconds)\n"
|
|
|
|
"loop end: %d samples (%.4f seconds)\n",
|
2008-03-11 02:27:59 +01:00
|
|
|
vgmstream->loop_start_sample,
|
|
|
|
(double)vgmstream->loop_start_sample/vgmstream->sample_rate,
|
|
|
|
vgmstream->loop_end_sample,
|
|
|
|
(double)vgmstream->loop_end_sample/vgmstream->sample_rate);
|
|
|
|
concatn(length,desc,temp);
|
2008-02-05 07:44:44 +01:00
|
|
|
}
|
|
|
|
|
2011-07-07 17:25:38 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"stream total samples: %d (%.4f seconds)\n",
|
2008-03-11 02:27:59 +01:00
|
|
|
vgmstream->num_samples,
|
|
|
|
(double)vgmstream->num_samples/vgmstream->sample_rate);
|
|
|
|
concatn(length,desc,temp);
|
|
|
|
|
|
|
|
snprintf(temp,TEMPSIZE,"encoding: ");
|
|
|
|
concatn(length,desc,temp);
|
|
|
|
|
2008-02-05 07:44:44 +01:00
|
|
|
switch (vgmstream->coding_type) {
|
|
|
|
case coding_PCM16BE:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Big Endian 16-bit PCM");
|
2008-02-05 07:44:44 +01:00
|
|
|
break;
|
|
|
|
case coding_PCM16LE:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Little Endian 16-bit PCM");
|
2008-02-05 07:44:44 +01:00
|
|
|
break;
|
2008-07-14 22:42:49 +02:00
|
|
|
case coding_PCM16LE_int:
|
|
|
|
snprintf(temp,TEMPSIZE,"Little Endian 16-bit PCM with 2 byte interleave");
|
2008-07-14 21:21:45 +02:00
|
|
|
break;
|
2010-08-28 03:43:40 +02:00
|
|
|
case coding_PCM16LE_XOR_int:
|
|
|
|
snprintf(temp,TEMPSIZE,"Little Endian 16-bit PCM with 2 byte interleave and XOR obfuscation");
|
|
|
|
break;
|
2008-02-05 07:44:44 +01:00
|
|
|
case coding_PCM8:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"8-bit PCM");
|
2008-02-05 07:44:44 +01:00
|
|
|
break;
|
2009-04-28 18:52:49 +02:00
|
|
|
case coding_PCM8_U:
|
|
|
|
snprintf(temp,TEMPSIZE,"8-bit unsigned PCM");
|
|
|
|
break;
|
2008-11-23 13:21:36 +01:00
|
|
|
case coding_PCM8_U_int:
|
|
|
|
snprintf(temp,TEMPSIZE,"8-bit unsigned PCM with 1 byte interleave");
|
|
|
|
break;
|
2008-07-14 22:42:49 +02:00
|
|
|
case coding_PCM8_int:
|
|
|
|
snprintf(temp,TEMPSIZE,"8-bit PCM with 1 byte interleave");
|
2008-07-14 21:21:45 +02:00
|
|
|
break;
|
2008-07-30 22:58:50 +02:00
|
|
|
case coding_PCM8_SB_int:
|
|
|
|
snprintf(temp,TEMPSIZE,"8-bit PCM with sign bit, 1 byte interleave");
|
|
|
|
break;
|
2008-02-05 07:44:44 +01:00
|
|
|
case coding_NGC_DSP:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Gamecube \"DSP\" 4-bit ADPCM");
|
2008-02-05 07:44:44 +01:00
|
|
|
break;
|
|
|
|
case coding_CRI_ADX:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"CRI ADX 4-bit ADPCM");
|
2008-02-05 07:44:44 +01:00
|
|
|
break;
|
2011-08-20 14:00:01 +02:00
|
|
|
case coding_CRI_ADX_enc_8:
|
|
|
|
snprintf(temp,TEMPSIZE,"encrypted (type 8) CRI ADX 4-bit ADPCM");
|
|
|
|
break;
|
|
|
|
case coding_CRI_ADX_enc_9:
|
|
|
|
snprintf(temp,TEMPSIZE,"encrypted (type 9) CRI ADX 4-bit ADPCM");
|
2008-12-24 08:19:15 +01:00
|
|
|
break;
|
2008-02-05 10:21:20 +01:00
|
|
|
case coding_NDS_IMA:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"NDS-style 4-bit IMA ADPCM");
|
2008-02-05 10:21:20 +01:00
|
|
|
break;
|
2009-12-16 07:12:53 +01:00
|
|
|
case coding_DAT4_IMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Eurocom DAT4 4-bit IMA ADPCM");
|
|
|
|
break;
|
2008-02-13 15:31:21 +01:00
|
|
|
case coding_NGC_DTK:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Gamecube \"ADP\"/\"DTK\" 4-bit ADPCM");
|
2008-02-14 23:10:08 +01:00
|
|
|
break;
|
|
|
|
case coding_G721:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"CCITT G.721 4-bit ADPCM");
|
2008-02-13 15:31:21 +01:00
|
|
|
break;
|
2008-03-03 22:38:11 +01:00
|
|
|
case coding_NGC_AFC:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Gamecube \"AFC\" 4-bit ADPCM");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
2008-05-04 22:36:40 +02:00
|
|
|
case coding_PSX:
|
|
|
|
snprintf(temp,TEMPSIZE,"Playstation 4-bit ADPCM");
|
|
|
|
break;
|
2008-07-25 21:02:29 +02:00
|
|
|
case coding_PSX_badflags:
|
|
|
|
snprintf(temp,TEMPSIZE,"Playstation 4-bit ADPCM with bad flags");
|
|
|
|
break;
|
2008-06-25 22:39:15 +02:00
|
|
|
case coding_invert_PSX:
|
2009-01-07 13:38:46 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"BMDX \"encrypted\" Playstation 4-bit ADPCM");
|
2008-06-25 22:39:15 +02:00
|
|
|
break;
|
2008-11-07 00:30:33 +01:00
|
|
|
case coding_FFXI:
|
|
|
|
snprintf(temp,TEMPSIZE,"FFXI Playstation-ish 4-bit ADPCM");
|
|
|
|
break;
|
2011-01-12 02:50:45 +01:00
|
|
|
case coding_BAF_ADPCM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Bizarre Creations Playstation-ish 4-bit ADPCM");
|
2010-09-11 22:57:39 +02:00
|
|
|
break;
|
2008-05-11 03:49:52 +02:00
|
|
|
case coding_XA:
|
|
|
|
snprintf(temp,TEMPSIZE,"CD-ROM XA 4-bit ADPCM");
|
2008-05-24 00:52:02 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_XBOX:
|
2008-05-24 00:52:02 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"XBOX 4-bit IMA ADPCM");
|
2008-06-02 19:58:08 +02:00
|
|
|
break;
|
2009-06-29 23:58:40 +02:00
|
|
|
case coding_INT_XBOX:
|
|
|
|
snprintf(temp,TEMPSIZE,"XBOX Interleaved 4-bit IMA ADPCM");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EAXA:
|
2008-06-02 19:58:08 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts XA Based 4-bit ADPCM");
|
2008-05-11 03:49:52 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EA_ADPCM:
|
2008-07-14 21:21:45 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts XA Based (R1) 4-bit ADPCM");
|
|
|
|
break;
|
2008-06-15 09:59:43 +02:00
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-06-15 08:04:44 +02:00
|
|
|
case coding_ogg_vorbis:
|
|
|
|
snprintf(temp,TEMPSIZE,"Vorbis");
|
|
|
|
break;
|
2008-06-15 09:59:43 +02:00
|
|
|
#endif
|
2008-07-01 05:23:44 +02:00
|
|
|
case coding_SDX2:
|
|
|
|
snprintf(temp,TEMPSIZE,"Squareroot-delta-exact (SDX2) 8-bit DPCM");
|
|
|
|
break;
|
2008-07-14 22:42:49 +02:00
|
|
|
case coding_SDX2_int:
|
|
|
|
snprintf(temp,TEMPSIZE,"Squareroot-delta-exact (SDX2) 8-bit DPCM with 1 byte interleave");
|
2010-07-27 14:24:03 +02:00
|
|
|
break;
|
|
|
|
case coding_CBD2:
|
|
|
|
snprintf(temp,TEMPSIZE,"Cuberoot-delta-exact (CBD2) 8-bit DPCM");
|
|
|
|
break;
|
|
|
|
case coding_CBD2_int:
|
|
|
|
snprintf(temp,TEMPSIZE,"Cuberoot-delta-exact (CBD2) 8-bit DPCM with 1 byte interleave");
|
2008-07-14 22:42:49 +02:00
|
|
|
break;
|
2008-07-02 03:41:20 +02:00
|
|
|
case coding_DVI_IMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Intel DVI 4-bit IMA ADPCM");
|
2008-07-18 21:35:29 +02:00
|
|
|
break;
|
|
|
|
case coding_INT_DVI_IMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Interleaved Intel DVI 4-bit IMA ADPCM");
|
2008-07-14 21:21:45 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case coding_EACS_IMA:
|
2008-07-14 21:21:45 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"EACS 4-bit IMA ADPCM");
|
2008-07-02 03:41:20 +02:00
|
|
|
break;
|
2009-09-01 23:28:55 +02:00
|
|
|
case coding_MAXIS_ADPCM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Maxis XA (EA ADPCM Variant)");
|
|
|
|
break;
|
2008-09-23 13:07:41 +02:00
|
|
|
case coding_INT_IMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Interleaved 4-bit IMA ADPCM");
|
|
|
|
break;
|
2008-07-03 04:20:52 +02:00
|
|
|
case coding_IMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"4-bit IMA ADPCM");
|
|
|
|
break;
|
2009-03-09 13:48:53 +01:00
|
|
|
case coding_MS_IMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Microsoft 4-bit IMA ADPCM");
|
|
|
|
break;
|
2009-09-12 06:51:39 +02:00
|
|
|
case coding_RAD_IMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"\"Radical\" 4-bit IMA ADPCM");
|
|
|
|
break;
|
2010-04-10 14:06:25 +02:00
|
|
|
case coding_RAD_IMA_mono:
|
|
|
|
snprintf(temp,TEMPSIZE,"\"Radical\" 4-bit IMA ADPCM (mono)");
|
|
|
|
break;
|
2009-08-30 04:16:54 +02:00
|
|
|
case coding_APPLE_IMA4:
|
|
|
|
snprintf(temp,TEMPSIZE,"Apple Quicktime 4-bit IMA ADPCM");
|
|
|
|
break;
|
2011-02-06 10:49:57 +01:00
|
|
|
case coding_SNDS_IMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Heavy Iron .snds 4-bit IMA ADPCM");
|
|
|
|
break;
|
2008-07-03 23:21:01 +02:00
|
|
|
case coding_WS:
|
2008-07-04 02:06:51 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Westwood Studios DPCM");
|
2008-07-03 23:21:01 +02:00
|
|
|
break;
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
case coding_fake_MPEG2_L2:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-2 Layer II Audio");
|
|
|
|
break;
|
2008-07-06 17:33:38 +02:00
|
|
|
case coding_MPEG1_L1:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-1 Layer I Audio");
|
|
|
|
break;
|
|
|
|
case coding_MPEG1_L2:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-1 Layer II Audio");
|
|
|
|
break;
|
|
|
|
case coding_MPEG1_L3:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-1 Layer III Audio (MP3)");
|
|
|
|
break;
|
|
|
|
case coding_MPEG2_L1:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-2 Layer I Audio");
|
|
|
|
break;
|
|
|
|
case coding_MPEG2_L2:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-2 Layer II Audio");
|
|
|
|
break;
|
|
|
|
case coding_MPEG2_L3:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-2 Layer III Audio (MP3)");
|
|
|
|
break;
|
|
|
|
case coding_MPEG25_L1:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-2.5 Layer I Audio");
|
|
|
|
break;
|
|
|
|
case coding_MPEG25_L2:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-2.5 Layer II Audio");
|
|
|
|
break;
|
|
|
|
case coding_MPEG25_L3:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG-2.5 Layer III Audio (MP3)");
|
|
|
|
break;
|
2010-03-21 05:23:18 +01:00
|
|
|
#endif
|
|
|
|
#ifdef VGM_USE_G7221
|
|
|
|
case coding_G7221:
|
|
|
|
snprintf(temp,TEMPSIZE,"ITU G.722.1 (Polycom Siren 7)");
|
|
|
|
break;
|
|
|
|
case coding_G7221C:
|
|
|
|
snprintf(temp,TEMPSIZE,"ITU G.722.1 annex C (Polycom Siren 14)");
|
|
|
|
break;
|
2013-06-26 11:54:15 +02:00
|
|
|
#endif
|
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2013-06-26 13:36:57 +02:00
|
|
|
case coding_AT3plus:
|
2013-06-26 11:54:15 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"ATRAC3plus");
|
|
|
|
break;
|
2008-07-05 13:49:29 +02:00
|
|
|
#endif
|
2008-07-20 07:41:41 +02:00
|
|
|
case coding_ACM:
|
|
|
|
snprintf(temp,TEMPSIZE,"InterPlay ACM");
|
|
|
|
break;
|
2008-08-03 16:58:03 +02:00
|
|
|
case coding_NWA0:
|
|
|
|
snprintf(temp,TEMPSIZE,"NWA DPCM Level 0");
|
|
|
|
break;
|
|
|
|
case coding_NWA1:
|
|
|
|
snprintf(temp,TEMPSIZE,"NWA DPCM Level 1");
|
|
|
|
break;
|
|
|
|
case coding_NWA2:
|
|
|
|
snprintf(temp,TEMPSIZE,"NWA DPCM Level 2");
|
|
|
|
break;
|
|
|
|
case coding_NWA3:
|
|
|
|
snprintf(temp,TEMPSIZE,"NWA DPCM Level 3");
|
|
|
|
break;
|
|
|
|
case coding_NWA4:
|
|
|
|
snprintf(temp,TEMPSIZE,"NWA DPCM Level 4");
|
|
|
|
break;
|
|
|
|
case coding_NWA5:
|
|
|
|
snprintf(temp,TEMPSIZE,"NWA DPCM Level 5");
|
|
|
|
break;
|
2008-08-11 10:10:59 +02:00
|
|
|
case coding_MSADPCM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Microsoft 4-bit ADPCM");
|
|
|
|
break;
|
2008-08-13 08:11:05 +02:00
|
|
|
case coding_AICA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Yamaha AICA 4-bit ADPCM");
|
|
|
|
break;
|
2008-12-28 07:29:43 +01:00
|
|
|
case coding_NDS_PROCYON:
|
|
|
|
snprintf(temp,TEMPSIZE,"Procyon Studio Digital Sound Elements NDS 4-bit APDCM");
|
|
|
|
break;
|
2009-01-04 16:36:06 +01:00
|
|
|
case coding_L5_555:
|
2011-01-13 09:11:58 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Level-5 0x555 4-bit ADPCM");
|
2009-01-04 16:36:06 +01:00
|
|
|
break;
|
2009-09-04 06:19:39 +02:00
|
|
|
case coding_SASSC:
|
|
|
|
snprintf(temp,TEMPSIZE,"Activision / EXAKT SASSC 8-bit DPCM");
|
|
|
|
break;
|
2011-01-13 09:11:58 +01:00
|
|
|
case coding_LSF:
|
|
|
|
snprintf(temp,TEMPSIZE,"lsf 4-bit ADPCM");
|
|
|
|
break;
|
2011-05-07 13:05:05 +02:00
|
|
|
case coding_MTAF:
|
2011-05-28 16:35:31 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Konami MTAF 4-bit ADPCM");
|
2011-05-07 13:05:05 +02:00
|
|
|
break;
|
2008-02-05 07:44:44 +01:00
|
|
|
default:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"CANNOT DECODE");
|
2008-02-05 07:44:44 +01:00
|
|
|
}
|
2008-03-11 02:27:59 +01:00
|
|
|
concatn(length,desc,temp);
|
|
|
|
|
|
|
|
snprintf(temp,TEMPSIZE,"\nlayout: ");
|
|
|
|
concatn(length,desc,temp);
|
2008-02-05 07:44:44 +01:00
|
|
|
|
|
|
|
switch (vgmstream->layout_type) {
|
|
|
|
case layout_none:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"flat (no layout)");
|
2008-02-05 07:44:44 +01:00
|
|
|
break;
|
|
|
|
case layout_interleave:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"interleave");
|
2008-02-05 07:44:44 +01:00
|
|
|
break;
|
|
|
|
case layout_interleave_shortblock:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"interleave with short last block");
|
2008-02-05 07:44:44 +01:00
|
|
|
break;
|
2008-07-14 18:20:47 +02:00
|
|
|
case layout_interleave_byte:
|
|
|
|
snprintf(temp,TEMPSIZE,"sub-frame interleave");
|
|
|
|
break;
|
2008-02-13 15:31:21 +01:00
|
|
|
case layout_dtk_interleave:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"ADP/DTK nibble interleave");
|
2009-09-02 14:18:23 +02:00
|
|
|
break;
|
|
|
|
case layout_mxch_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"MxCh blocked");
|
2010-11-14 17:05:58 +01:00
|
|
|
break;
|
2008-03-04 01:46:55 +01:00
|
|
|
case layout_ast_blocked:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"AST blocked");
|
2008-03-04 01:46:55 +01:00
|
|
|
break;
|
2008-03-04 08:15:25 +01:00
|
|
|
case layout_halpst_blocked:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"HALPST blocked");
|
2008-05-10 21:59:29 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case layout_xa_blocked:
|
2008-05-11 03:49:52 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"CD-ROM XA");
|
2008-06-02 19:58:08 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case layout_ea_blocked:
|
2008-06-02 19:58:08 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts Audio Blocks");
|
2008-07-14 21:21:45 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case layout_eacs_blocked:
|
2008-07-14 21:21:45 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts (Old Version) Audio Blocks");
|
2008-06-03 20:41:26 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case layout_caf_blocked:
|
2008-06-03 20:41:26 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"CAF blocked");
|
2008-03-04 08:15:25 +01:00
|
|
|
break;
|
2008-06-29 03:30:13 +02:00
|
|
|
case layout_wsi_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,".wsi blocked");
|
|
|
|
break;
|
2008-08-19 13:34:16 +02:00
|
|
|
case layout_xvas_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,".xvas blocked");
|
|
|
|
break;
|
2008-06-15 09:59:43 +02:00
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-06-15 08:04:44 +02:00
|
|
|
case layout_ogg_vorbis:
|
|
|
|
snprintf(temp,TEMPSIZE,"Ogg");
|
|
|
|
break;
|
2008-06-15 09:59:43 +02:00
|
|
|
#endif
|
2008-07-02 15:39:51 +02:00
|
|
|
case layout_str_snds_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,".str SNDS blocked");
|
2008-07-02 05:57:21 +02:00
|
|
|
break;
|
2008-07-03 04:20:52 +02:00
|
|
|
case layout_ws_aud_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"Westwood Studios .aud blocked");
|
|
|
|
break;
|
2008-08-10 22:08:03 +02:00
|
|
|
case layout_matx_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"Matrix .matx blocked");
|
|
|
|
break;
|
2008-08-11 10:10:59 +02:00
|
|
|
case layout_de2_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"de2 blocked");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case layout_vs_blocked:
|
2008-12-04 21:11:45 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"vs blocked");
|
|
|
|
break;
|
2008-12-15 05:37:43 +01:00
|
|
|
case layout_emff_ps2_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"EMFF (PS2) blocked");
|
|
|
|
break;
|
|
|
|
case layout_emff_ngc_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"EMFF (NGC/WII) blocked");
|
2008-12-16 16:48:21 +01:00
|
|
|
break;
|
|
|
|
case layout_gsb_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"GSB blocked");
|
2008-12-09 19:16:51 +01:00
|
|
|
break;
|
2008-12-12 00:16:09 +01:00
|
|
|
case layout_thp_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"THP Movie Audio blocked");
|
|
|
|
break;
|
2008-12-18 07:51:26 +01:00
|
|
|
case layout_filp_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"FILp blocked");
|
|
|
|
break;
|
2010-04-20 22:26:10 +02:00
|
|
|
case layout_psx_mgav_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"MGAV blocked");
|
|
|
|
break;
|
2010-05-02 21:16:35 +02:00
|
|
|
case layout_ps2_adm_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"ADM blocked");
|
|
|
|
break;
|
2010-05-10 10:02:22 +02:00
|
|
|
case layout_dsp_bdsp_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"DSP blocked");
|
|
|
|
break;
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
case layout_fake_mpeg:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG Audio stream with incorrect frame headers");
|
|
|
|
break;
|
2008-07-06 17:33:38 +02:00
|
|
|
case layout_mpeg:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPEG Audio stream");
|
|
|
|
break;
|
2008-07-05 13:49:29 +02:00
|
|
|
#endif
|
2008-07-20 07:41:41 +02:00
|
|
|
case layout_acm:
|
2008-07-21 01:28:16 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"ACM blocked");
|
|
|
|
break;
|
|
|
|
case layout_mus_acm:
|
|
|
|
snprintf(temp,TEMPSIZE,"multiple ACM files, ACM blocked");
|
2008-07-20 07:41:41 +02:00
|
|
|
break;
|
2008-08-02 12:24:28 +02:00
|
|
|
case layout_aix:
|
|
|
|
snprintf(temp,TEMPSIZE,"AIX interleave, internally 18-byte interleaved");
|
|
|
|
break;
|
2009-01-03 12:08:44 +01:00
|
|
|
case layout_aax:
|
|
|
|
snprintf(temp,TEMPSIZE,"AAX blocked, 18-byte interleaved");
|
|
|
|
break;
|
2009-03-19 20:43:06 +01:00
|
|
|
case layout_ivaud_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"GTA IV blocked");
|
2010-12-06 23:22:06 +01:00
|
|
|
break;
|
|
|
|
case layout_ps2_iab_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"IAB blocked");
|
2010-12-29 13:33:33 +01:00
|
|
|
break;
|
|
|
|
case layout_ps2_strlr_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"The Bouncer STR blocked");
|
2010-12-04 00:34:14 +01:00
|
|
|
break;
|
|
|
|
case layout_tra_blocked:
|
|
|
|
snprintf(temp,TEMPSIZE,"TRA blocked");
|
2009-03-19 20:43:06 +01:00
|
|
|
break;
|
2012-08-24 19:36:40 +02:00
|
|
|
case layout_scd_int:
|
|
|
|
snprintf(temp,TEMPSIZE,"SCD multistream interleave");
|
|
|
|
break;
|
2008-02-05 07:44:44 +01:00
|
|
|
default:
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"INCONCEIVABLE");
|
2008-02-05 07:44:44 +01:00
|
|
|
}
|
2008-03-11 02:27:59 +01:00
|
|
|
concatn(length,desc,temp);
|
|
|
|
|
|
|
|
snprintf(temp,TEMPSIZE,"\n");
|
|
|
|
concatn(length,desc,temp);
|
2008-02-05 07:44:44 +01:00
|
|
|
|
2008-07-14 18:20:47 +02:00
|
|
|
if (vgmstream->layout_type == layout_interleave || vgmstream->layout_type == layout_interleave_shortblock || vgmstream->layout_type == layout_interleave_byte) {
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"interleave: %#x bytes\n",
|
2008-05-18 19:17:49 +02:00
|
|
|
(int32_t)vgmstream->interleave_block_size);
|
2008-03-11 02:27:59 +01:00
|
|
|
concatn(length,desc,temp);
|
|
|
|
|
2008-02-05 07:44:44 +01:00
|
|
|
if (vgmstream->layout_type == layout_interleave_shortblock) {
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"last block interleave: %#x bytes\n",
|
2008-05-18 19:17:49 +02:00
|
|
|
(int32_t)vgmstream->interleave_smallblock_size);
|
2008-03-11 02:27:59 +01:00
|
|
|
concatn(length,desc,temp);
|
2008-02-05 07:44:44 +01:00
|
|
|
}
|
|
|
|
}
|
2008-03-03 22:38:11 +01:00
|
|
|
|
2008-03-11 02:27:59 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"metadata from: ");
|
|
|
|
concatn(length,desc,temp);
|
|
|
|
|
2008-03-03 22:38:11 +01:00
|
|
|
switch (vgmstream->meta_type) {
|
|
|
|
case meta_RSTM:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo RSTM header");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
|
|
|
case meta_STRM:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo STRM header");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
|
|
|
case meta_ADX_03:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"CRI ADX header type 03");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
|
|
|
case meta_ADX_04:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"CRI ADX header type 04");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
2008-05-03 21:45:19 +02:00
|
|
|
case meta_ADX_05:
|
|
|
|
snprintf(temp,TEMPSIZE,"CRI ADX header type 05");
|
|
|
|
break;
|
2008-08-02 12:24:28 +02:00
|
|
|
case meta_AIX:
|
|
|
|
snprintf(temp,TEMPSIZE,"CRI AIX header");
|
|
|
|
break;
|
2009-01-03 12:08:44 +01:00
|
|
|
case meta_AAX:
|
|
|
|
snprintf(temp,TEMPSIZE,"CRI AAX header");
|
|
|
|
break;
|
2011-01-04 15:20:49 +01:00
|
|
|
case meta_UTF_DSP:
|
|
|
|
snprintf(temp,TEMPSIZE,"CRI ADPCM_WII header");
|
|
|
|
break;
|
2008-03-03 22:38:11 +01:00
|
|
|
case meta_DSP_AGSC:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Retro Studios AGSC header");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
|
|
|
case meta_NGC_ADPDTK:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed Nintendo ADP by .adp extension and valid first frame");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
|
|
|
case meta_RSF:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed Retro Studios RSF by .rsf extension and valid first bytes");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
|
|
|
case meta_AFC:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo AFC header");
|
2008-03-03 22:38:11 +01:00
|
|
|
break;
|
2008-03-04 01:46:55 +01:00
|
|
|
case meta_AST:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo AST header");
|
2008-03-04 01:46:55 +01:00
|
|
|
break;
|
2008-03-04 08:15:25 +01:00
|
|
|
case meta_HALPST:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"HAL Laboratory HALPST header");
|
2008-03-04 08:15:25 +01:00
|
|
|
break;
|
2008-03-25 08:30:04 +01:00
|
|
|
case meta_DSP_RS03:
|
|
|
|
snprintf(temp,TEMPSIZE,"Retro Studios RS03 header");
|
|
|
|
break;
|
|
|
|
case meta_DSP_STD:
|
2008-04-02 18:11:53 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Standard Nintendo DSP header");
|
|
|
|
break;
|
|
|
|
case meta_DSP_CSTR:
|
|
|
|
snprintf(temp,TEMPSIZE,"Namco Cstr header");
|
2008-03-25 08:30:04 +01:00
|
|
|
break;
|
2008-04-02 19:50:50 +02:00
|
|
|
case meta_GCSW:
|
|
|
|
snprintf(temp,TEMPSIZE,"GCSW header");
|
|
|
|
break;
|
2008-05-04 22:36:40 +02:00
|
|
|
case meta_PS2_SShd:
|
2008-05-13 22:03:51 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"SShd header");
|
2008-05-06 00:45:21 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_NPSF:
|
2008-05-13 22:03:51 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Namco Production Sound File (NPSF) header");
|
2008-05-04 22:36:40 +02:00
|
|
|
break;
|
2008-05-06 03:01:06 +02:00
|
|
|
case meta_RWSD:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo RWSD header (single stream)");
|
|
|
|
break;
|
2008-12-20 23:57:54 +01:00
|
|
|
case meta_RWAR:
|
2009-01-20 02:03:33 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo RWAR header (single RWAV stream)");
|
|
|
|
break;
|
|
|
|
case meta_RWAV:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo RWAV header");
|
2008-12-20 23:57:54 +01:00
|
|
|
break;
|
2012-08-28 07:08:46 +02:00
|
|
|
case meta_CWAV:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo CWAV header");
|
|
|
|
break;
|
2008-05-10 21:59:29 +02:00
|
|
|
case meta_PSX_XA:
|
2008-05-13 22:03:51 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RIFF/CDXA header");
|
2008-05-11 20:11:55 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_RXW:
|
2008-05-13 22:03:51 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RXWS header)");
|
2008-05-11 23:27:10 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_RAW:
|
2008-05-12 15:31:48 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed RAW Interleaved PCM by .int extension");
|
2008-09-08 20:55:01 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_OMU:
|
2008-09-08 20:55:01 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Alter Echo OMU Header");
|
2008-05-12 15:31:48 +02:00
|
|
|
break;
|
|
|
|
case meta_DSP_STM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo STM header");
|
2008-05-10 21:59:29 +02:00
|
|
|
break;
|
2008-05-13 13:47:51 +02:00
|
|
|
case meta_PS2_EXST:
|
2008-05-13 22:03:51 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"EXST header");
|
2008-05-13 13:47:51 +02:00
|
|
|
break;
|
2008-05-13 21:53:31 +02:00
|
|
|
case meta_PS2_SVAG:
|
2008-05-13 22:03:51 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Konami SVAG header");
|
2008-05-13 21:53:31 +02:00
|
|
|
break;
|
2008-05-14 22:44:19 +02:00
|
|
|
case meta_PS2_MIB:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed MIB Interleaved file by .mib extension");
|
|
|
|
break;
|
|
|
|
case meta_PS2_MIB_MIH:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed MIB with MIH Info Header file by .mib+.mih extension");
|
|
|
|
break;
|
2008-05-15 00:26:44 +02:00
|
|
|
case meta_DSP_MPDSP:
|
|
|
|
snprintf(temp,TEMPSIZE,"Single DSP header stereo by .mpdsp extension");
|
|
|
|
break;
|
2008-05-15 20:57:03 +02:00
|
|
|
case meta_PS2_MIC:
|
|
|
|
snprintf(temp,TEMPSIZE,"assume KOEI MIC file by .mic extension");
|
|
|
|
break;
|
2008-05-16 00:06:33 +02:00
|
|
|
case meta_DSP_JETTERS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Double DSP header stereo by _lr.dsp extension");
|
|
|
|
break;
|
|
|
|
case meta_DSP_MSS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Double DSP header stereo by .mss extension");
|
|
|
|
break;
|
|
|
|
case meta_DSP_GCM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Double DSP header stereo by .gcm extension");
|
2008-07-18 21:35:29 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_DSP_WII_IDSP:
|
2008-08-22 02:24:15 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Wii IDSP Double DSP header");
|
2008-05-16 00:06:33 +02:00
|
|
|
break;
|
2008-05-17 01:14:47 +02:00
|
|
|
case meta_RSTM_SPM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo RSTM header and .brstmspm extension");
|
|
|
|
break;
|
2008-05-17 19:26:20 +02:00
|
|
|
case meta_RAW:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed RAW PCM file by .raw extension");
|
2008-05-17 23:52:40 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_VAGi:
|
2008-05-17 23:52:40 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Sony VAG Interleaved header (VAGi)");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_VAGp:
|
2008-05-17 23:52:40 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Sony VAG Mono header (VAGp)");
|
2008-05-28 13:36:17 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_VAGs:
|
2008-05-28 13:36:17 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Sony VAG Stereo header (VAGp)");
|
2008-05-20 20:09:05 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_VAGm:
|
2008-05-20 20:09:05 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Sony VAG Mono header (VAGm)");
|
2008-05-17 23:52:40 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_pGAV:
|
2008-05-17 23:52:40 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Sony VAG Stereo Little Endian header (pGAV)");
|
2008-05-19 13:39:30 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PSX_GMS:
|
2008-05-19 13:39:30 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed Grandia GMS file by .gms extension");
|
2008-05-20 20:09:05 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_STR:
|
2008-05-20 20:09:05 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed STR + STH File by .str & .sth extension");
|
2008-05-21 23:26:52 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_ILD:
|
2008-05-21 23:26:52 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"ILD header");
|
2008-05-22 21:08:49 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_PNB:
|
2008-05-24 00:52:02 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed PNB (PsychoNauts Bgm File) by .pnb extension");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_XBOX_WAVM:
|
2008-05-24 00:52:02 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed Xbox WAVM file by .wavm extension");
|
2008-05-24 17:11:32 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_XBOX_RIFF:
|
2008-05-24 17:11:32 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Xbox RIFF/WAVE file with 0x0069 Codec ID");
|
2008-05-28 20:13:35 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_DSP_STR:
|
2008-05-28 20:13:35 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed Conan Gamecube STR File by .str extension");
|
2008-06-02 19:58:08 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_EAXA_R2:
|
2008-06-02 19:58:08 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts XA R2");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_EAXA_R3:
|
2008-06-02 19:58:08 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts XA R3");
|
2008-07-14 21:21:45 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_EA_ADPCM:
|
2008-07-14 21:21:45 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts XA R1");
|
2008-09-21 16:58:50 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_EA_IMA:
|
2008-09-21 16:58:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts container with IMA blocks");
|
2008-06-02 19:58:08 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_EAXA_PSX:
|
2008-06-02 19:58:08 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts With PSX ADPCM");
|
2008-07-14 21:21:45 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_EA_PCM:
|
2008-07-14 21:21:45 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts With PCM");
|
2008-06-03 20:41:26 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_CFN:
|
2008-06-03 20:41:26 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Namco CAF Header");
|
2008-06-07 23:11:33 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_VPK:
|
2008-06-07 23:11:33 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"VPK Header");
|
2008-05-17 19:26:20 +02:00
|
|
|
break;
|
2008-06-10 03:20:54 +02:00
|
|
|
case meta_GENH:
|
|
|
|
snprintf(temp,TEMPSIZE,"GENH Generic Header");
|
2008-06-09 02:20:08 +02:00
|
|
|
break;
|
2008-06-15 09:59:43 +02:00
|
|
|
#ifdef VGM_USE_VORBIS
|
2008-06-15 08:04:44 +02:00
|
|
|
case meta_ogg_vorbis:
|
|
|
|
snprintf(temp,TEMPSIZE,"Ogg Vorbis");
|
|
|
|
break;
|
2008-07-21 07:50:28 +02:00
|
|
|
case meta_OGG_SLI:
|
2008-07-22 03:03:20 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Ogg Vorbis with .sli (start,length) for looping");
|
|
|
|
break;
|
|
|
|
case meta_OGG_SLI2:
|
|
|
|
snprintf(temp,TEMPSIZE,"Ogg Vorbis with .sli (from,to) for looping");
|
2008-07-21 07:50:28 +02:00
|
|
|
break;
|
2008-07-22 04:18:32 +02:00
|
|
|
case meta_OGG_SFL:
|
|
|
|
snprintf(temp,TEMPSIZE,"Ogg Vorbis with SFPL for looping");
|
|
|
|
break;
|
2008-07-24 23:49:27 +02:00
|
|
|
case meta_um3_ogg:
|
|
|
|
snprintf(temp,TEMPSIZE,"Ogg Vorbis, Ultramarine3 \"encryption\"");
|
|
|
|
break;
|
2010-12-11 07:42:42 +01:00
|
|
|
case meta_KOVS_ogg:
|
|
|
|
snprintf(temp,TEMPSIZE,"Ogg Vorbis, KOVS header");
|
|
|
|
break;
|
2012-09-05 05:12:58 +02:00
|
|
|
case meta_psych_ogg:
|
|
|
|
snprintf(temp,TEMPSIZE,"Ogg Vorbis, Psychic Software obfuscation");
|
|
|
|
break;
|
2008-06-15 09:59:43 +02:00
|
|
|
#endif
|
2008-06-15 11:23:34 +02:00
|
|
|
case meta_DSP_SADB:
|
|
|
|
snprintf(temp,TEMPSIZE,"sadb header");
|
|
|
|
break;
|
2008-09-23 13:07:41 +02:00
|
|
|
case meta_SADL:
|
|
|
|
snprintf(temp,TEMPSIZE,"sadl header");
|
|
|
|
break;
|
2008-06-25 18:42:13 +02:00
|
|
|
case meta_PS2_BMDX:
|
|
|
|
snprintf(temp,TEMPSIZE,"Beatmania .bmdx header");
|
|
|
|
break;
|
2008-06-29 03:30:13 +02:00
|
|
|
case meta_DSP_WSI:
|
|
|
|
snprintf(temp,TEMPSIZE,".wsi header");
|
|
|
|
break;
|
2008-07-01 05:23:44 +02:00
|
|
|
case meta_AIFC:
|
|
|
|
snprintf(temp,TEMPSIZE,"Audio Interchange File Format AIFF-C");
|
|
|
|
break;
|
2008-07-01 18:11:59 +02:00
|
|
|
case meta_AIFF:
|
|
|
|
snprintf(temp,TEMPSIZE,"Audio Interchange File Format");
|
|
|
|
break;
|
2008-07-02 15:39:51 +02:00
|
|
|
case meta_STR_SNDS:
|
|
|
|
snprintf(temp,TEMPSIZE,".str SNDS SHDR chunk");
|
2008-07-02 05:57:21 +02:00
|
|
|
break;
|
2008-07-03 04:20:52 +02:00
|
|
|
case meta_WS_AUD:
|
|
|
|
snprintf(temp,TEMPSIZE,"Westwood Studios .aud header");
|
|
|
|
break;
|
|
|
|
case meta_WS_AUD_old:
|
|
|
|
snprintf(temp,TEMPSIZE,"Westwood Studios .aud (old) header");
|
|
|
|
break;
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
case meta_AHX:
|
|
|
|
snprintf(temp,TEMPSIZE,"CRI AHX header");
|
|
|
|
break;
|
|
|
|
#endif
|
2008-07-06 10:59:14 +02:00
|
|
|
case meta_PS2_IVB:
|
|
|
|
snprintf(temp,TEMPSIZE,"IVB/BVII header");
|
|
|
|
break;
|
2008-07-06 14:23:37 +02:00
|
|
|
case meta_PS2_SVS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Square SVS header");
|
|
|
|
break;
|
2008-07-06 20:05:04 +02:00
|
|
|
case meta_RIFF_WAVE:
|
|
|
|
snprintf(temp,TEMPSIZE,"RIFF WAVE header");
|
|
|
|
break;
|
|
|
|
case meta_RIFF_WAVE_POS:
|
|
|
|
snprintf(temp,TEMPSIZE,"RIFF WAVE header and .pos for looping");
|
|
|
|
break;
|
2008-07-11 02:41:21 +02:00
|
|
|
case meta_NWA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Visual Art's NWA header");
|
|
|
|
break;
|
2008-07-11 08:34:09 +02:00
|
|
|
case meta_NWA_NWAINFOINI:
|
2008-07-11 03:43:15 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Visual Art's NWA header and NWAINFO.INI for looping");
|
|
|
|
break;
|
2008-07-11 08:34:09 +02:00
|
|
|
case meta_NWA_GAMEEXEINI:
|
|
|
|
snprintf(temp,TEMPSIZE,"Visual Art's NWA header and Gameexe.ini for looping");
|
|
|
|
break;
|
2008-07-12 17:20:39 +02:00
|
|
|
case meta_XSS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Dino Crisis 3 XSS File");
|
|
|
|
break;
|
|
|
|
case meta_HGC1:
|
|
|
|
snprintf(temp,TEMPSIZE,"Knights of the Temple 2 hgC1 Header");
|
|
|
|
break;
|
|
|
|
case meta_AUS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Capcom AUS Header");
|
|
|
|
break;
|
|
|
|
case meta_RWS:
|
|
|
|
snprintf(temp,TEMPSIZE,"RWS Header");
|
2008-07-14 21:21:45 +02:00
|
|
|
break;
|
|
|
|
case meta_EACS_PC:
|
|
|
|
snprintf(temp,TEMPSIZE,"EACS Header (PC)");
|
|
|
|
break;
|
|
|
|
case meta_EACS_PSX:
|
|
|
|
snprintf(temp,TEMPSIZE,"EACS Header (PSX)");
|
2008-07-18 21:35:29 +02:00
|
|
|
break;
|
|
|
|
case meta_EACS_SAT:
|
|
|
|
snprintf(temp,TEMPSIZE,"EACS Header (SATURN)");
|
2008-07-17 03:22:23 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_SL3:
|
2008-07-17 03:22:23 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"SL3 Header");
|
2008-11-15 12:38:14 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_FSB1:
|
2008-11-15 12:38:14 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"FMOD Sample Bank (FSB1) Header");
|
2008-07-14 13:02:39 +02:00
|
|
|
break;
|
2009-09-15 08:22:01 +02:00
|
|
|
case meta_FSB3_0:
|
|
|
|
snprintf(temp,TEMPSIZE,"FMOD Sample Bank (FSB3.0) Header");
|
|
|
|
break;
|
|
|
|
case meta_FSB3_1:
|
|
|
|
snprintf(temp,TEMPSIZE,"FMOD Sample Bank (FSB3.1) Header");
|
2008-11-24 19:27:28 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_FSB4:
|
2008-11-24 19:27:28 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"FMOD Sample Bank (FSB4) Header");
|
2009-03-05 22:27:50 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_FSB4_WAV:
|
2009-03-05 22:27:50 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"FMOD Sample Bank (FSB4) with additional 'WAV' Header");
|
2008-07-14 15:08:01 +02:00
|
|
|
break;
|
2014-04-24 06:31:04 +02:00
|
|
|
case meta_FSB5:
|
|
|
|
snprintf(temp,TEMPSIZE,"FMOD Sample Bank (FSB5) Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RWX:
|
2008-07-14 15:08:01 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RWX Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_XWB:
|
2008-07-14 15:08:01 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"XWB WBND Header");
|
2008-07-15 05:39:20 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_XA30:
|
2008-07-15 05:39:20 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"XA30 Header");
|
2008-07-17 03:22:23 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_MUSC:
|
2008-07-17 03:22:23 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"MUSC Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_MUSX_V004:
|
2008-11-09 12:37:21 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"MUSX / Version 004 Header");
|
2008-11-08 20:03:28 +01:00
|
|
|
break;
|
2010-05-02 21:16:35 +02:00
|
|
|
case meta_MUSX_V005:
|
|
|
|
snprintf(temp,TEMPSIZE,"MUSX / Version 005 Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_MUSX_V006:
|
2008-11-09 12:37:21 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"MUSX / Version 006 Header");
|
2008-11-08 20:03:28 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_MUSX_V010:
|
2008-11-09 12:37:21 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"MUSX / Version 010 Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_MUSX_V201:
|
2008-11-09 12:37:21 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"MUSX / Version 201 Header");
|
2008-07-17 03:22:23 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_LEG:
|
2008-07-17 03:22:23 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Legaia 2 - Duel Saga LEG Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_FILP:
|
2008-12-18 07:51:26 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Bio Hazard - Gun Survivor FILp Header");
|
2008-07-17 03:22:23 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_IKM:
|
2008-07-19 10:48:49 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Zwei!! IKM Header");
|
2008-07-17 16:20:42 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_SFS:
|
2008-07-17 16:20:42 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Baroque SFS Header");
|
2008-07-18 21:35:29 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_DVI:
|
2008-07-18 21:35:29 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"DVI Header");
|
2008-07-18 22:20:16 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_KCEY:
|
2008-07-18 22:20:16 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"KCEYCOMP Header");
|
2008-07-19 10:48:49 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_BG00:
|
2008-07-19 10:48:49 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Falcom BG00 Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_RSTM:
|
2008-07-19 10:48:49 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Rockstar Games RSTM Header");
|
2008-07-12 17:20:39 +02:00
|
|
|
break;
|
2008-07-20 07:41:41 +02:00
|
|
|
case meta_ACM:
|
|
|
|
snprintf(temp,TEMPSIZE,"InterPlay ACM Header");
|
2008-07-21 01:28:16 +02:00
|
|
|
break;
|
|
|
|
case meta_MUS_ACM:
|
|
|
|
snprintf(temp,TEMPSIZE,"MUS playlist and multiple InterPlay ACM Headered files");
|
2008-07-20 18:34:01 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_KCES:
|
2008-07-20 18:34:01 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Konami KCES Header");
|
|
|
|
break;
|
|
|
|
case meta_PS2_DXH:
|
|
|
|
snprintf(temp,TEMPSIZE,"Tokobot Plus DXH Header");
|
2008-07-20 07:41:41 +02:00
|
|
|
break;
|
2008-07-20 22:41:11 +02:00
|
|
|
case meta_PS2_PSH:
|
|
|
|
snprintf(temp,TEMPSIZE,"Dawn of Mana - Seiken Densetsu 4 PSH Header");
|
|
|
|
break;
|
2008-07-21 07:03:16 +02:00
|
|
|
case meta_RIFF_WAVE_labl_Marker:
|
|
|
|
snprintf(temp,TEMPSIZE,"RIFF WAVE header with loop markers");
|
2008-10-08 02:09:11 +02:00
|
|
|
break;
|
|
|
|
case meta_RIFF_WAVE_smpl:
|
|
|
|
snprintf(temp,TEMPSIZE,"RIFF WAVE header with sample looping info");
|
2009-05-25 22:59:50 +02:00
|
|
|
break;
|
|
|
|
case meta_RIFX_WAVE:
|
|
|
|
snprintf(temp,TEMPSIZE,"RIFX WAVE header");
|
|
|
|
break;
|
|
|
|
case meta_RIFX_WAVE_smpl:
|
|
|
|
snprintf(temp,TEMPSIZE,"RIFX WAVE header with sample looping info");
|
2008-07-25 19:49:09 +02:00
|
|
|
break;
|
2012-08-20 07:17:52 +02:00
|
|
|
case meta_XNBm:
|
|
|
|
snprintf(temp,TEMPSIZE,"XNBm header");
|
|
|
|
break;
|
2010-02-08 19:33:20 +01:00
|
|
|
case meta_PCM_SCD:
|
2010-02-08 21:14:57 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"PCM file with custom header (SCD)");
|
|
|
|
break;
|
|
|
|
case meta_PCM_PS2:
|
|
|
|
snprintf(temp,TEMPSIZE,"PCM file with custom header (PS2)");
|
2008-07-25 19:49:09 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_RKV:
|
2008-07-25 19:49:09 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Legacy of Kain - Blood Omen 2 RKV Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_PSW:
|
2008-07-25 19:49:09 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Rayman Raving Rabbids Riff Container File");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_VAS:
|
2008-07-25 19:49:09 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Pro Baseball Spirits 5 VAS Header");
|
2008-07-29 15:07:10 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_TEC:
|
2008-07-29 15:07:10 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed TECMO badflagged stream by .tec extension");
|
2008-08-04 22:42:44 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_XBOX_WVS:
|
2009-08-25 05:21:28 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Metal Arms WVS Header (XBOX)");
|
|
|
|
break;
|
|
|
|
case meta_NGC_WVS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Metal Arms WVS Header (GameCube)");
|
2008-07-21 07:03:16 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_XBOX_STMA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Midnight Club 2 STMA Header");
|
|
|
|
break;
|
|
|
|
case meta_XBOX_MATX:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed Matrix file by .matx extension");
|
|
|
|
break;
|
2008-08-11 10:10:59 +02:00
|
|
|
case meta_DE2:
|
|
|
|
snprintf(temp,TEMPSIZE,"gurumin .de2 with embedded funky RIFF");
|
2008-12-04 21:11:45 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_VS:
|
2008-12-04 21:11:45 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Men in Black VS Header");
|
2008-08-11 10:10:59 +02:00
|
|
|
break;
|
2008-08-13 08:11:05 +02:00
|
|
|
case meta_DC_STR:
|
|
|
|
snprintf(temp,TEMPSIZE,"Sega Stream Asset Builder header");
|
|
|
|
break;
|
2009-01-23 15:06:14 +01:00
|
|
|
case meta_DC_STR_V2:
|
|
|
|
snprintf(temp,TEMPSIZE,"variant of Sega Stream Asset Builder header");
|
|
|
|
break;
|
2008-08-18 19:51:22 +02:00
|
|
|
case meta_XBOX_XMU:
|
|
|
|
snprintf(temp,TEMPSIZE,"XMU header");
|
|
|
|
break;
|
2008-08-19 13:34:16 +02:00
|
|
|
case meta_XBOX_XVAS:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed TMNT file by .xvas extension");
|
2008-09-08 20:55:01 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_XA2:
|
2009-04-08 21:31:56 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Acclaim XA2 Header");
|
2008-09-08 15:41:31 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_DC_IDVI:
|
2008-09-08 15:41:31 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"IDVI Header");
|
2008-09-23 08:05:37 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_NGC_YMF:
|
2008-09-23 08:05:37 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"YMF DSP Header");
|
2008-09-24 07:56:25 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_CCC:
|
2008-09-24 07:56:25 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"CCC Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PSX_FAG:
|
2008-09-24 07:56:25 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"FAG Header");
|
2008-09-24 18:36:19 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_MIHB:
|
2008-09-24 18:36:19 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Merged MIH+MIB");
|
2008-08-19 13:34:16 +02:00
|
|
|
break;
|
2008-10-11 06:00:57 +02:00
|
|
|
case meta_DSP_WII_MUS:
|
|
|
|
snprintf(temp,TEMPSIZE,"mus header");
|
2008-12-24 01:00:10 +01:00
|
|
|
break;
|
|
|
|
case meta_WII_SNG:
|
|
|
|
snprintf(temp,TEMPSIZE,"SNG DSP Header");
|
2008-10-20 20:06:35 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD2VAG:
|
2008-10-20 20:06:35 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD2/VAG Header");
|
2008-12-03 21:30:18 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD2PCMB:
|
2008-12-03 21:30:18 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD2/PCMB Header");
|
2008-10-20 20:06:35 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD2XADP:
|
2008-10-20 20:06:35 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD2/XADP Header");
|
2008-12-03 21:30:18 +01:00
|
|
|
break;
|
2009-04-25 18:45:22 +02:00
|
|
|
case meta_RSD3VAG:
|
|
|
|
snprintf(temp,TEMPSIZE,"RSD3/VAG Header");
|
|
|
|
break;
|
2009-05-20 04:48:13 +02:00
|
|
|
case meta_RSD3GADP:
|
|
|
|
snprintf(temp,TEMPSIZE,"RSD3/GADP Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD3PCM:
|
2008-12-03 21:30:18 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD3/PCM Header");
|
2008-10-20 20:06:35 +02:00
|
|
|
break;
|
2009-05-20 04:48:13 +02:00
|
|
|
case meta_RSD3PCMB:
|
|
|
|
snprintf(temp,TEMPSIZE,"RSD3/PCMB Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD4PCMB:
|
2008-10-20 20:06:35 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD4/PCMB Header");
|
2008-11-02 17:43:12 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD4PCM:
|
2008-11-02 17:43:12 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD4/PCM Header");
|
2009-10-17 21:17:42 +02:00
|
|
|
break;
|
|
|
|
case meta_RSD4RADP:
|
|
|
|
snprintf(temp,TEMPSIZE,"RSD4/RADP Header");
|
2008-10-20 20:06:35 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD4VAG:
|
2008-10-20 20:06:35 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD4/VAG Header");
|
2008-11-02 17:43:12 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD6XADP:
|
2008-11-02 17:43:12 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD6/XADP Header");
|
2008-10-20 20:06:35 +02:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RSD6VAG:
|
2008-10-20 20:06:35 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RSD6/VAG Header");
|
2008-11-07 02:20:34 +01:00
|
|
|
break;
|
|
|
|
case meta_RSD6WADP:
|
|
|
|
snprintf(temp,TEMPSIZE,"RSD6/WADP Header");
|
2008-10-30 16:43:36 +01:00
|
|
|
break;
|
2009-09-12 06:51:39 +02:00
|
|
|
case meta_RSD6RADP:
|
|
|
|
snprintf(temp,TEMPSIZE,"RSD6/RADP Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_DC_ASD:
|
2008-10-30 16:43:36 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"ASD Header");
|
2008-11-02 17:43:12 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_NAOMI_SPSD:
|
2008-11-02 17:43:12 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"SPSD Header");
|
2008-10-11 06:00:57 +02:00
|
|
|
break;
|
2008-11-07 00:30:33 +01:00
|
|
|
case meta_FFXI_BGW:
|
|
|
|
snprintf(temp,TEMPSIZE,"BGW BGMStream header");
|
|
|
|
break;
|
2008-11-07 02:47:39 +01:00
|
|
|
case meta_FFXI_SPW:
|
|
|
|
snprintf(temp,TEMPSIZE,"SPW SeWave header");
|
|
|
|
break;
|
2008-11-11 11:02:52 +01:00
|
|
|
case meta_PS2_ASS:
|
2008-11-11 19:10:26 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"ASS Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_IDSP:
|
2008-11-11 19:10:26 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"IDSP Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_WAA_WAC_WAD_WAM:
|
2008-11-11 19:10:26 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"WAA/WAC/WAD/WAM RIFF Header");
|
2008-11-15 21:34:18 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_SEG:
|
2008-11-15 21:34:18 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"SEG (PS2) Header");
|
2008-11-18 17:32:04 +01:00
|
|
|
break;
|
2011-01-22 03:31:52 +01:00
|
|
|
case meta_XBOX_SEG:
|
|
|
|
snprintf(temp,TEMPSIZE,"SEG (XBOX) Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_NDS_STRM_FFTA2:
|
2008-11-18 17:32:04 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Final Fantasy Tactics A2 RIFF Header");
|
2008-11-18 20:13:12 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_STR_ASR:
|
2008-11-18 20:13:12 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Donkey Kong Jet Race KNON/WII Header");
|
2008-11-23 12:49:58 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_ZWDSP:
|
2008-11-23 12:49:58 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Zack and Wiki custom DSP Header");
|
2008-11-27 22:08:48 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_GCA:
|
2008-11-27 22:08:48 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"GCA DSP Header");
|
2008-11-28 15:27:51 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_SPT_SPD:
|
2008-11-28 15:27:51 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"SPT+SPD DSP Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_ISH_ISD:
|
2008-11-28 15:27:51 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"ISH+ISD DSP Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_YDSP:
|
2010-05-02 21:16:35 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Yuke's DSP (YDSP) Header");
|
2008-12-02 21:11:42 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_MSVP:
|
2008-12-02 21:11:42 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"MSVP Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_NGC_SSM:
|
2008-12-02 21:11:42 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"SSM DSP Header");
|
2008-12-03 21:30:18 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_JOE:
|
2008-12-03 21:30:18 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Disney/Pixar JOE Header");
|
2008-11-11 11:02:52 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_VGS:
|
2008-12-04 21:11:45 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Guitar Hero Encore Rocks the 80's Header");
|
2008-12-07 11:27:04 +01:00
|
|
|
break;
|
2010-02-15 10:02:31 +01:00
|
|
|
case meta_DC_DCSW_DCS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Evil Twin DCS file with helper");
|
2008-12-08 18:36:44 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_WII_SMP:
|
2008-12-08 18:36:44 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"SMP DSP Header");
|
2008-12-10 13:30:23 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_EMFF_PS2:
|
|
|
|
case meta_EMFF_NGC:
|
2008-12-10 13:30:23 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Eidos Music File Format Header");
|
2008-12-12 00:16:09 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_THP:
|
2008-12-12 00:16:09 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"THP Movie File Format Header");
|
2008-12-12 20:21:11 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_STS_WII:
|
2008-12-12 20:21:11 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Shikigami no Shiro (WII) Header");
|
2009-01-05 19:41:14 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_P2BT:
|
2009-01-05 19:41:14 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Pop'n'Music 7 Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_GBTS:
|
2009-01-05 19:41:14 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Pop'n'Music 9 Header");
|
|
|
|
break;
|
2010-09-16 13:53:36 +02:00
|
|
|
case meta_NGC_DSP_IADP:
|
|
|
|
snprintf(temp,TEMPSIZE,"IADP Header");
|
2009-01-01 04:24:57 +01:00
|
|
|
break;
|
|
|
|
case meta_RSTM_shrunken:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo RSTM header, corrupted by Atlus");
|
2008-12-04 21:11:45 +01:00
|
|
|
break;
|
2009-01-04 16:36:06 +01:00
|
|
|
case meta_RIFF_WAVE_MWV:
|
|
|
|
snprintf(temp,TEMPSIZE,"RIFF WAVE header with .mwv flavoring");
|
|
|
|
break;
|
2010-03-15 05:33:22 +01:00
|
|
|
case meta_RIFF_WAVE_SNS:
|
|
|
|
snprintf(temp,TEMPSIZE,"RIFF WAVE header with .sns flavoring");
|
|
|
|
break;
|
2009-01-08 15:29:40 +01:00
|
|
|
case meta_FFCC_STR:
|
|
|
|
snprintf(temp,TEMPSIZE,"Final Fantasy: Crystal Chronicles STR header");
|
|
|
|
break;
|
2009-01-28 10:35:55 +01:00
|
|
|
case meta_SAT_BAKA:
|
|
|
|
snprintf(temp,TEMPSIZE,"BAKA header from Crypt Killer");
|
|
|
|
break;
|
2009-02-06 20:16:37 +01:00
|
|
|
case meta_NDS_SWAV:
|
|
|
|
snprintf(temp,TEMPSIZE,"SWAV Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_VSF:
|
2009-03-05 17:08:23 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Musashi: Samurai Legend VSF Header");
|
2009-02-08 09:36:33 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_NDS_RRDS:
|
2009-03-13 00:42:56 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Ridger Racer DS Header");
|
2009-03-05 11:11:47 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_TK5:
|
2009-03-05 17:08:23 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Tekken 5 Stream Header");
|
|
|
|
break;
|
2009-05-01 17:03:51 +02:00
|
|
|
case meta_PS2_SND:
|
|
|
|
snprintf(temp,TEMPSIZE,"Might and Magic SSND Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_VSF_TTA:
|
2009-03-13 00:42:56 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"VSF with SMSS Header");
|
2009-03-09 10:25:59 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_ADS:
|
2009-03-13 00:42:56 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"dhSS Header");
|
2009-03-11 23:34:30 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_WII_STR:
|
|
|
|
snprintf(temp,TEMPSIZE,"HOTD Overkill - STR+STH WII Header");
|
2009-03-13 23:00:33 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_MCG:
|
|
|
|
snprintf(temp,TEMPSIZE,"Gunvari MCG Header");
|
2009-03-13 23:00:33 +01:00
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_ZSD:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"ZSD Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_RedSpark:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"RedSpark Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PC_IVAUD:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed GTA IV Audio file by .ivaud extension");
|
|
|
|
break;
|
2009-03-28 06:49:16 +01:00
|
|
|
case meta_DSP_WII_WSD:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Standard Nintendo DSP headers in .wsd");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_WII_NDP:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Vertigo NDP Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_SPS:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Ape Escape 2 SPS Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_PS2_XA2_RRP:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Acclaim XA2 Header");
|
|
|
|
break;
|
2009-04-19 11:49:08 +02:00
|
|
|
case meta_NDS_HWAS:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"NDS 'HWAS' Header");
|
|
|
|
break;
|
2010-02-19 12:28:29 +01:00
|
|
|
case meta_NGC_LPS:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Rave Master LPS Header");
|
|
|
|
break;
|
2009-05-10 09:14:29 +02:00
|
|
|
case meta_NAOMI_ADPCM:
|
2009-08-28 22:10:50 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"NAOMI/NAOMI2 Arcade games ADPCM header");
|
|
|
|
break;
|
|
|
|
case meta_SD9:
|
2010-06-29 17:52:07 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"beatmania IIDX SD9 header");
|
2009-08-28 22:10:50 +02:00
|
|
|
break;
|
2010-06-29 17:52:07 +02:00
|
|
|
case meta_2DX9:
|
|
|
|
snprintf(temp,TEMPSIZE,"beatmania IIDX 2DX9 header");
|
2009-08-28 22:10:50 +02:00
|
|
|
break;
|
2009-06-20 23:26:36 +02:00
|
|
|
case meta_DSP_YGO:
|
2010-02-05 19:25:31 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Konami custom DSP Header");
|
2009-08-28 22:10:50 +02:00
|
|
|
break;
|
2009-07-11 13:28:36 +02:00
|
|
|
case meta_PS2_VGV:
|
|
|
|
snprintf(temp,TEMPSIZE,"Rune: Viking Warlord VGV Header");
|
2009-08-28 22:10:50 +02:00
|
|
|
break;
|
2009-08-23 10:42:14 +02:00
|
|
|
case meta_NGC_GCUB:
|
2011-03-23 21:28:47 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"GCub Header");
|
2009-08-28 22:10:50 +02:00
|
|
|
break;
|
2009-08-25 19:50:43 +02:00
|
|
|
case meta_NGC_SCK_DSP:
|
|
|
|
snprintf(temp,TEMPSIZE,"The Scorpion King SCK Header");
|
2009-08-28 22:10:50 +02:00
|
|
|
break;
|
|
|
|
case meta_NGC_SWD:
|
|
|
|
snprintf(temp,TEMPSIZE,"PSF + Standard DSP Headers");
|
|
|
|
break;
|
2009-08-30 04:16:54 +02:00
|
|
|
case meta_CAFF:
|
|
|
|
snprintf(temp,TEMPSIZE,"Apple Core Audio Format Header");
|
|
|
|
break;
|
2011-07-22 07:32:10 +02:00
|
|
|
case meta_PC_MXST:
|
2010-02-19 12:28:29 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Lego Island MxSt Header");
|
|
|
|
break;
|
2011-07-22 07:32:10 +02:00
|
|
|
case meta_PC_SOB_SAB:
|
2010-02-19 12:28:29 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Worms 4: Mayhem SOB/SAB Header");
|
|
|
|
break;
|
2009-09-01 23:28:55 +02:00
|
|
|
case meta_MAXIS_XA:
|
2009-09-02 14:18:23 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Maxis XAI/XAJ Header");
|
2009-09-01 23:28:55 +02:00
|
|
|
break;
|
2009-09-04 06:19:39 +02:00
|
|
|
case meta_EXAKT_SC:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed Activision / EXAKT SC by extension");
|
|
|
|
break;
|
2009-09-05 14:18:34 +02:00
|
|
|
case meta_WII_BNS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo BNS header");
|
|
|
|
break;
|
2009-09-11 20:40:26 +02:00
|
|
|
case meta_WII_WAS:
|
2010-01-26 19:36:24 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"WAS (iSWS) DSP header");
|
2009-09-11 20:40:26 +02:00
|
|
|
break;
|
2009-10-15 11:24:04 +02:00
|
|
|
case meta_XBOX_HLWAV:
|
|
|
|
snprintf(temp,TEMPSIZE,"Half Life 2 bgm header");
|
|
|
|
break;
|
2009-11-18 01:46:36 +01:00
|
|
|
case meta_STX:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo .stx header");
|
|
|
|
break;
|
2009-11-22 15:06:45 +01:00
|
|
|
case meta_PS2_STM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Red Dead Revolver .stm (.ps2stm)");
|
|
|
|
break;
|
2010-01-10 22:22:20 +01:00
|
|
|
case meta_MYSPD:
|
|
|
|
snprintf(temp,TEMPSIZE,"U-Sing .myspd header");
|
|
|
|
break;
|
2010-01-19 20:40:41 +01:00
|
|
|
case meta_HIS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Her Interactive Sound header");
|
|
|
|
break;
|
2010-01-26 18:57:49 +01:00
|
|
|
case meta_PS2_AST:
|
|
|
|
snprintf(temp,TEMPSIZE,"KOEI AST header");
|
2010-02-01 17:35:20 +01:00
|
|
|
break;
|
2010-02-19 12:28:29 +01:00
|
|
|
case meta_CAPDSP:
|
2010-02-01 17:35:20 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Capcom custom DSP header");
|
2010-02-05 19:25:31 +01:00
|
|
|
break;
|
2010-02-19 12:28:29 +01:00
|
|
|
case meta_DMSG:
|
2010-02-05 19:25:31 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"RIFF/DMSGsegh header");
|
2010-02-19 12:28:29 +01:00
|
|
|
break;
|
|
|
|
case meta_PONA_3DO:
|
|
|
|
case meta_PONA_PSX:
|
|
|
|
snprintf(temp,TEMPSIZE,"Policenauts BGM header");
|
2010-01-26 18:57:49 +01:00
|
|
|
break;
|
2010-05-02 21:16:35 +02:00
|
|
|
case meta_NGC_DSP_AAAP:
|
|
|
|
snprintf(temp,TEMPSIZE,"Double standard dsp header in 'AAAp'");
|
2010-02-27 23:10:52 +01:00
|
|
|
break;
|
2010-05-02 21:16:35 +02:00
|
|
|
case meta_NGC_DSP_KONAMI:
|
|
|
|
snprintf(temp,TEMPSIZE,"Konami dsp header");
|
2010-02-27 23:10:52 +01:00
|
|
|
break;
|
2010-03-16 03:34:18 +01:00
|
|
|
case meta_PS2_STER:
|
|
|
|
snprintf(temp,TEMPSIZE,"STER Header");
|
|
|
|
break;
|
2010-03-21 05:23:18 +01:00
|
|
|
case meta_BNSF:
|
|
|
|
snprintf(temp,TEMPSIZE,"Namco Bandai BNSF header");
|
|
|
|
break;
|
2010-03-23 04:36:10 +01:00
|
|
|
case meta_PS2_WB:
|
|
|
|
snprintf(temp,TEMPSIZE,"Shooting Love. ~TRIZEAL~ WB header");
|
|
|
|
break;
|
2010-03-23 21:57:12 +01:00
|
|
|
case meta_S14:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed Polycom Siren 14 by .s14 extension");
|
|
|
|
break;
|
|
|
|
case meta_SSS:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed Polycom Siren 14 by .sss extension");
|
|
|
|
break;
|
2010-03-29 22:06:08 +02:00
|
|
|
case meta_PS2_GCM:
|
2010-03-31 03:57:34 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"GCM 'MCG' Header");
|
|
|
|
break;
|
|
|
|
case meta_PS2_SMPL:
|
|
|
|
snprintf(temp,TEMPSIZE,"Homura 'SMPL' Header");
|
2010-03-29 22:06:08 +02:00
|
|
|
break;
|
2010-04-10 12:55:14 +02:00
|
|
|
case meta_PS2_MSA:
|
|
|
|
snprintf(temp,TEMPSIZE,"Psyvariar -Complete Edition- MSA header");
|
|
|
|
break;
|
|
|
|
case meta_PC_SMP:
|
2010-04-12 05:35:58 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Ghostbusters .smp Header");
|
2010-04-10 12:55:14 +02:00
|
|
|
break;
|
2010-04-20 22:26:10 +02:00
|
|
|
case meta_NGC_PDT:
|
|
|
|
snprintf(temp,TEMPSIZE,"PDT DSP header");
|
|
|
|
break;
|
|
|
|
case meta_NGC_BO2:
|
|
|
|
snprintf(temp,TEMPSIZE,"Blood Omen 2 DSP header");
|
|
|
|
break;
|
2010-04-10 14:06:25 +02:00
|
|
|
case meta_P3D:
|
2010-04-12 05:35:58 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Prototype P3D Header");
|
2010-04-12 03:06:18 +02:00
|
|
|
break;
|
2010-04-20 22:26:10 +02:00
|
|
|
case meta_PS2_TK1:
|
2010-04-12 03:06:18 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Tekken TK5STRM1 Header");
|
|
|
|
break;
|
2010-04-20 22:26:10 +02:00
|
|
|
case meta_PS2_ADSC:
|
2010-04-12 03:06:18 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"ADSC Header");
|
2010-04-20 22:26:10 +02:00
|
|
|
break;
|
|
|
|
case meta_NGC_DSP_MPDS:
|
|
|
|
snprintf(temp,TEMPSIZE,"MPDS DSP header");
|
|
|
|
break;
|
|
|
|
case meta_DSP_STR_IG:
|
|
|
|
snprintf(temp,TEMPSIZE,"Infogrames dual dsp header");
|
|
|
|
break;
|
|
|
|
case meta_PSX_MGAV:
|
|
|
|
snprintf(temp,TEMPSIZE,"Electronic Arts RVWS header");
|
2010-04-30 04:35:26 +02:00
|
|
|
break;
|
2010-05-02 21:16:35 +02:00
|
|
|
case meta_PS2_B1S:
|
|
|
|
snprintf(temp,TEMPSIZE,"B1S header");
|
|
|
|
break;
|
|
|
|
case meta_PS2_WAD:
|
|
|
|
snprintf(temp,TEMPSIZE,"WAD header");
|
|
|
|
break;
|
|
|
|
case meta_DSP_XIII:
|
|
|
|
snprintf(temp,TEMPSIZE,"XIII dsp header");
|
|
|
|
break;
|
|
|
|
case meta_NGC_DSP_STH_STR:
|
|
|
|
snprintf(temp,TEMPSIZE,"STH dsp header");
|
|
|
|
break;
|
|
|
|
case meta_DSP_CABELAS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Cabelas games dsp header");
|
|
|
|
break;
|
|
|
|
case meta_PS2_LPCM:
|
2010-04-30 04:35:26 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"LPCM header");
|
2010-04-10 14:06:25 +02:00
|
|
|
break;
|
2010-05-31 01:56:35 +02:00
|
|
|
case meta_PS2_VMS:
|
|
|
|
snprintf(temp,TEMPSIZE,"VMS Header");
|
2010-06-02 03:16:03 +02:00
|
|
|
break;
|
|
|
|
case meta_PS2_XAU:
|
|
|
|
snprintf(temp,TEMPSIZE,"XAU Header");
|
2010-06-13 06:41:26 +02:00
|
|
|
break;
|
|
|
|
case meta_GH3_BAR:
|
|
|
|
snprintf(temp,TEMPSIZE,"Guitar Hero III Mobile .bar");
|
2010-07-27 21:45:59 +02:00
|
|
|
break;
|
|
|
|
case meta_FFW:
|
|
|
|
snprintf(temp,TEMPSIZE,"Freedom Fighters BGM header");
|
2010-08-04 11:12:08 +02:00
|
|
|
break;
|
|
|
|
case meta_DSP_DSPW:
|
|
|
|
snprintf(temp,TEMPSIZE,"DSPW dsp header");
|
2010-08-28 03:43:40 +02:00
|
|
|
break;
|
|
|
|
case meta_PS2_JSTM:
|
|
|
|
snprintf(temp,TEMPSIZE,"JSTM Header");
|
2010-09-05 00:06:39 +02:00
|
|
|
break;
|
|
|
|
case meta_PS3_XVAG:
|
|
|
|
snprintf(temp,TEMPSIZE,"XVAG Header");
|
2010-09-10 01:47:27 +02:00
|
|
|
break;
|
|
|
|
case meta_PS3_CPS:
|
|
|
|
snprintf(temp,TEMPSIZE,"CPS Header");
|
2010-09-11 01:56:39 +02:00
|
|
|
break;
|
2011-02-08 13:56:16 +01:00
|
|
|
case meta_SQEX_SCD:
|
2010-09-11 01:56:39 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Square-Enix SCD");
|
2010-09-11 19:53:33 +02:00
|
|
|
break;
|
|
|
|
case meta_NGC_NST_DSP:
|
|
|
|
snprintf(temp,TEMPSIZE,"Animaniacs NST header");
|
2010-09-11 22:57:39 +02:00
|
|
|
break;
|
|
|
|
case meta_BAF:
|
|
|
|
snprintf(temp,TEMPSIZE,".baf WAVE header");
|
2010-09-14 20:22:49 +02:00
|
|
|
break;
|
|
|
|
case meta_PS3_MSF:
|
|
|
|
snprintf(temp,TEMPSIZE,"PS3 MSF header");
|
2010-09-15 21:37:54 +02:00
|
|
|
break;
|
|
|
|
case meta_FSB_MPEG:
|
|
|
|
snprintf(temp,TEMPSIZE,"FSB MPEG header");
|
2010-09-30 02:04:17 +02:00
|
|
|
break;
|
|
|
|
case meta_NUB_VAG:
|
|
|
|
snprintf(temp,TEMPSIZE,"VAG (NUB) header");
|
2010-10-12 02:16:49 +02:00
|
|
|
break;
|
|
|
|
case meta_PS3_PAST:
|
|
|
|
snprintf(temp,TEMPSIZE,"SNDP header");
|
2010-10-19 04:16:08 +02:00
|
|
|
break;
|
|
|
|
case meta_PS3_SGH_SGB:
|
|
|
|
snprintf(temp,TEMPSIZE,"SGH+SGB SGXD header");
|
2010-11-09 05:21:22 +01:00
|
|
|
break;
|
|
|
|
case meta_NGCA:
|
|
|
|
snprintf(temp,TEMPSIZE,"NGCA header");
|
2010-05-31 01:56:35 +02:00
|
|
|
break;
|
2010-11-24 05:27:59 +01:00
|
|
|
case meta_WII_RAS:
|
2010-11-22 02:45:39 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"RAS header");
|
2010-11-29 03:02:27 +01:00
|
|
|
break;
|
|
|
|
case meta_PS2_SPM:
|
|
|
|
snprintf(temp,TEMPSIZE,"SPM header");
|
2010-12-03 23:48:51 +01:00
|
|
|
break;
|
|
|
|
case meta_X360_TRA:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed DefJam Rapstar Audio File by .tra extension");
|
2010-12-06 18:30:48 +01:00
|
|
|
break;
|
|
|
|
case meta_PS2_VGS:
|
|
|
|
snprintf(temp,TEMPSIZE,"Princess Soft VGS header");
|
2010-12-06 23:22:06 +01:00
|
|
|
break;
|
|
|
|
case meta_PS2_IAB:
|
|
|
|
snprintf(temp,TEMPSIZE,"IAB header");
|
2010-12-29 13:33:33 +01:00
|
|
|
break;
|
|
|
|
case meta_PS2_STRLR:
|
|
|
|
snprintf(temp,TEMPSIZE,"STR L/R header");
|
2011-01-13 09:11:58 +01:00
|
|
|
break;
|
|
|
|
case meta_LSF_N1NJ4N:
|
|
|
|
snprintf(temp,TEMPSIZE,".lsf !n1nj4n header");
|
2011-01-17 22:22:10 +01:00
|
|
|
break;
|
|
|
|
case meta_PS3_VAWX:
|
|
|
|
snprintf(temp,TEMPSIZE,"VAWX header");
|
2011-02-06 10:49:57 +01:00
|
|
|
break;
|
|
|
|
case meta_PC_SNDS:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed Heavy Iron IMA by .snds extension");
|
2011-02-13 03:23:53 +01:00
|
|
|
break;
|
2011-02-22 07:57:50 +01:00
|
|
|
case meta_PS2_WMUS:
|
2011-02-13 03:23:53 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"assumed The Warriors Sony ADPCM by .wmus extension");
|
2011-02-15 19:24:50 +01:00
|
|
|
break;
|
2011-02-22 07:57:50 +01:00
|
|
|
case meta_HYPERSCAN_KVAG:
|
2011-02-15 19:24:50 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"Mattel Hyperscan KVAG");
|
2011-02-19 03:59:42 +01:00
|
|
|
break;
|
2011-02-22 07:57:50 +01:00
|
|
|
case meta_IOS_PSND:
|
2011-02-19 03:59:42 +01:00
|
|
|
snprintf(temp,TEMPSIZE,"PSND Header");
|
2011-02-22 07:57:50 +01:00
|
|
|
break;
|
|
|
|
case meta_BOS_ADP:
|
|
|
|
snprintf(temp,TEMPSIZE,"ADP! header");
|
2011-03-03 10:03:18 +01:00
|
|
|
break;
|
|
|
|
case meta_EB_SFX:
|
|
|
|
snprintf(temp,TEMPSIZE,"Excitebots .sfx header");
|
|
|
|
break;
|
|
|
|
case meta_EB_SF0:
|
|
|
|
snprintf(temp,TEMPSIZE,"assumed Excitebots .sf0 by extension");
|
2011-03-23 04:17:53 +01:00
|
|
|
break;
|
|
|
|
case meta_PS3_KLBS:
|
|
|
|
snprintf(temp,TEMPSIZE,"klBS Header");
|
2011-03-23 09:06:05 +01:00
|
|
|
break;
|
|
|
|
case meta_PS3_SGX:
|
|
|
|
snprintf(temp,TEMPSIZE,"PS3 SGXD/WAVE header");
|
2011-05-07 13:05:05 +02:00
|
|
|
break;
|
|
|
|
case meta_PS2_MTAF:
|
2011-05-08 05:47:20 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"Konami MTAF header");
|
|
|
|
break;
|
|
|
|
case meta_PS2_VAG1:
|
|
|
|
snprintf(temp,TEMPSIZE,"Konami VAG Mono header (VAG1)");
|
2011-05-08 06:09:34 +02:00
|
|
|
break;
|
|
|
|
case meta_PS2_VAG2:
|
|
|
|
snprintf(temp,TEMPSIZE,"Konami VAG Stereo header (VAG2)");
|
2011-05-18 22:33:00 +02:00
|
|
|
break;
|
|
|
|
case meta_TUN:
|
|
|
|
snprintf(temp,TEMPSIZE,"TUN 'ALP' header");
|
|
|
|
break;
|
|
|
|
case meta_WPD:
|
|
|
|
snprintf(temp,TEMPSIZE,"WPD 'DPW' header");
|
2011-07-22 07:32:10 +02:00
|
|
|
break;
|
|
|
|
case meta_MN_STR:
|
|
|
|
snprintf(temp,TEMPSIZE,"Mini Ninjas 'STR' header");
|
|
|
|
break;
|
|
|
|
case meta_PS2_MSS:
|
|
|
|
snprintf(temp,TEMPSIZE,"ShellShock Nam '67 'MSCC' header");
|
2012-03-21 04:30:36 +01:00
|
|
|
break;
|
|
|
|
case meta_PS2_HSF:
|
|
|
|
snprintf(temp,TEMPSIZE,"Lowrider 'HSF' header");
|
2012-04-14 18:07:21 +02:00
|
|
|
break;
|
|
|
|
case meta_PS3_IVAG:
|
|
|
|
snprintf(temp,TEMPSIZE,"PS3 'IVAG' Header");
|
2012-08-15 05:41:24 +02:00
|
|
|
break;
|
|
|
|
case meta_PS2_2PFS:
|
|
|
|
snprintf(temp,TEMPSIZE,"PS2 '2PFS' Header");
|
2012-08-31 07:12:04 +02:00
|
|
|
break;
|
|
|
|
case meta_RSD6OOGV:
|
|
|
|
snprintf(temp,TEMPSIZE,"RSD6/OOGV Header");
|
2013-09-03 20:14:14 +02:00
|
|
|
break;
|
|
|
|
case meta_UBI_CKD:
|
|
|
|
snprintf(temp,TEMPSIZE,"CKD 'RIFF' Header");
|
2013-09-03 20:27:36 +02:00
|
|
|
break;
|
|
|
|
case meta_PS2_VBK:
|
|
|
|
snprintf(temp,TEMPSIZE,"PS2 VBK Header");
|
2014-02-26 07:25:02 +01:00
|
|
|
break;
|
|
|
|
case meta_OTM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Otomedius OTM Header");
|
2014-02-26 07:31:28 +01:00
|
|
|
break;
|
|
|
|
case meta_CSTM:
|
|
|
|
snprintf(temp,TEMPSIZE,"Nintendo 3DS CSTM Header");
|
2010-11-22 02:45:39 +01:00
|
|
|
break;
|
2010-05-31 01:56:35 +02:00
|
|
|
default:
|
2009-05-10 09:14:29 +02:00
|
|
|
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
2008-03-03 22:38:11 +01:00
|
|
|
}
|
2008-03-11 02:27:59 +01:00
|
|
|
concatn(length,desc,temp);
|
2008-02-05 07:44:44 +01:00
|
|
|
}
|
2008-03-25 08:30:04 +01:00
|
|
|
|
|
|
|
/* */
|
2008-09-21 00:16:57 +02:00
|
|
|
const char * const dfs_pairs[][2] = {
|
2008-04-04 03:24:57 +02:00
|
|
|
{"L","R"},
|
|
|
|
{"l","r"},
|
2008-03-25 08:30:04 +01:00
|
|
|
{"_0","_1"},
|
2008-04-04 03:24:57 +02:00
|
|
|
{"left","right"},
|
2008-09-21 00:16:57 +02:00
|
|
|
{"Left","Right"},
|
2008-03-25 08:30:04 +01:00
|
|
|
};
|
2008-09-21 00:16:57 +02:00
|
|
|
#define DFS_PAIR_COUNT (sizeof(dfs_pairs)/sizeof(dfs_pairs[0]))
|
2008-03-25 08:30:04 +01:00
|
|
|
|
2008-05-20 17:18:38 +02:00
|
|
|
void try_dual_file_stereo(VGMSTREAM * opened_stream, STREAMFILE *streamFile) {
|
2013-05-27 05:55:50 +02:00
|
|
|
char filename[PATH_LIMIT];
|
2008-05-20 17:18:38 +02:00
|
|
|
char filename2[260];
|
2008-03-25 08:30:04 +01:00
|
|
|
char * ext;
|
|
|
|
int dfs_name= -1; /*-1=no stereo, 0=opened_stream is left, 1=opened_stream is right */
|
|
|
|
VGMSTREAM * new_stream = NULL;
|
2008-05-20 17:18:38 +02:00
|
|
|
STREAMFILE *dual_stream = NULL;
|
2008-03-25 08:30:04 +01:00
|
|
|
int i,j;
|
|
|
|
|
|
|
|
if (opened_stream->channels != 1) return;
|
2008-05-18 00:00:10 +02:00
|
|
|
|
2008-05-20 17:18:38 +02:00
|
|
|
streamFile->get_name(streamFile,filename,sizeof(filename));
|
|
|
|
|
2009-04-19 11:49:08 +02:00
|
|
|
/* vgmstream's layout stuff currently assumes a single file */
|
|
|
|
// fastelbja : no need ... this one works ok with dual file
|
2008-05-18 00:00:10 +02:00
|
|
|
//if (opened_stream->layout != layout_none) return;
|
2008-03-25 08:30:04 +01:00
|
|
|
|
|
|
|
/* we need at least a base and a name ending to replace */
|
|
|
|
if (strlen(filename)<2) return;
|
|
|
|
|
|
|
|
strcpy(filename2,filename);
|
|
|
|
|
|
|
|
/* look relative to the extension; */
|
|
|
|
ext = (char *)filename_extension(filename2);
|
|
|
|
|
|
|
|
/* we treat the . as part of the extension */
|
|
|
|
if (ext-filename2 >= 1 && ext[-1]=='.') ext--;
|
|
|
|
|
|
|
|
for (i=0; dfs_name==-1 && i<DFS_PAIR_COUNT; i++) {
|
|
|
|
for (j=0; dfs_name==-1 && j<2; j++) {
|
|
|
|
/* find a postfix on the name */
|
|
|
|
if (!memcmp(ext-strlen(dfs_pairs[i][j]),
|
|
|
|
dfs_pairs[i][j],
|
|
|
|
strlen(dfs_pairs[i][j]))) {
|
|
|
|
int other_name=j^1;
|
|
|
|
int moveby;
|
|
|
|
dfs_name=j;
|
|
|
|
|
|
|
|
/* move the extension */
|
|
|
|
moveby = strlen(dfs_pairs[i][other_name]) -
|
|
|
|
strlen(dfs_pairs[i][dfs_name]);
|
|
|
|
memmove(ext+moveby,ext,strlen(ext)+1); /* terminator, too */
|
|
|
|
|
|
|
|
/* make the new name */
|
|
|
|
memcpy(ext+moveby-strlen(dfs_pairs[i][other_name]),dfs_pairs[i][other_name],strlen(dfs_pairs[i][other_name]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* did we find a name for the other file? */
|
|
|
|
if (dfs_name==-1) goto fail;
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
printf("input is: %s\n"
|
2008-03-31 22:17:07 +02:00
|
|
|
"other file would be: %s\n",
|
|
|
|
filename,filename2);
|
2008-03-25 08:30:04 +01:00
|
|
|
#endif
|
|
|
|
|
2008-05-20 17:18:38 +02:00
|
|
|
dual_stream = streamFile->open(streamFile,filename2,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
2008-06-26 04:08:26 +02:00
|
|
|
if (!dual_stream) goto fail;
|
|
|
|
|
2008-05-20 17:18:38 +02:00
|
|
|
new_stream = init_vgmstream_internal(dual_stream,
|
2008-03-25 08:30:04 +01:00
|
|
|
0 /* don't do dual file on this, to prevent recursion */
|
|
|
|
);
|
2008-05-20 17:18:38 +02:00
|
|
|
close_streamfile(dual_stream);
|
2008-03-25 08:30:04 +01:00
|
|
|
|
|
|
|
/* see if we were able to open the file, and if everything matched nicely */
|
|
|
|
if (new_stream &&
|
|
|
|
new_stream->channels == 1 &&
|
|
|
|
/* we have seen legitimate pairs where these are off by one... */
|
|
|
|
/* but leaving it commented out until I can find those and recheck */
|
|
|
|
/* abs(new_stream->num_samples-opened_stream->num_samples <= 1) && */
|
|
|
|
new_stream->num_samples == opened_stream->num_samples &&
|
|
|
|
new_stream->sample_rate == opened_stream->sample_rate &&
|
|
|
|
new_stream->meta_type == opened_stream->meta_type &&
|
|
|
|
new_stream->coding_type == opened_stream->coding_type &&
|
|
|
|
new_stream->layout_type == opened_stream->layout_type &&
|
|
|
|
new_stream->loop_flag == opened_stream->loop_flag &&
|
|
|
|
/* check these even if there is no loop, because they should then
|
|
|
|
* be zero in both */
|
|
|
|
new_stream->loop_start_sample == opened_stream->loop_start_sample &&
|
|
|
|
new_stream->loop_end_sample == opened_stream->loop_end_sample &&
|
|
|
|
/* check even if the layout doesn't use them, because it is
|
|
|
|
* difficult to determine when it does, and they should be zero
|
|
|
|
* otherwise, anyway */
|
|
|
|
new_stream->interleave_block_size == opened_stream->interleave_block_size &&
|
2008-05-19 05:58:15 +02:00
|
|
|
new_stream->interleave_smallblock_size == opened_stream->interleave_smallblock_size) {
|
2008-03-25 08:30:04 +01:00
|
|
|
/* We seem to have a usable, matching file. Merge in the second channel. */
|
|
|
|
VGMSTREAMCHANNEL * new_chans;
|
|
|
|
VGMSTREAMCHANNEL * new_loop_chans = NULL;
|
|
|
|
VGMSTREAMCHANNEL * new_start_chans = NULL;
|
|
|
|
|
|
|
|
/* build the channels */
|
|
|
|
new_chans = calloc(2,sizeof(VGMSTREAMCHANNEL));
|
|
|
|
if (!new_chans) goto fail;
|
|
|
|
|
|
|
|
memcpy(&new_chans[dfs_name],&opened_stream->ch[0],sizeof(VGMSTREAMCHANNEL));
|
|
|
|
memcpy(&new_chans[dfs_name^1],&new_stream->ch[0],sizeof(VGMSTREAMCHANNEL));
|
|
|
|
|
|
|
|
/* loop and start will be initialized later, we just need to
|
|
|
|
* allocate them here */
|
|
|
|
new_start_chans = calloc(2,sizeof(VGMSTREAMCHANNEL));
|
|
|
|
if (!new_start_chans) {
|
|
|
|
free(new_chans);
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (opened_stream->loop_ch) {
|
|
|
|
new_loop_chans = calloc(2,sizeof(VGMSTREAMCHANNEL));
|
|
|
|
if (!new_loop_chans) {
|
|
|
|
free(new_chans);
|
|
|
|
free(new_start_chans);
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* remove the existing structures */
|
|
|
|
/* not using close_vgmstream as that would close the file */
|
|
|
|
free(opened_stream->ch);
|
|
|
|
free(new_stream->ch);
|
|
|
|
|
|
|
|
free(opened_stream->start_ch);
|
|
|
|
free(new_stream->start_ch);
|
|
|
|
|
|
|
|
if (opened_stream->loop_ch) {
|
|
|
|
free(opened_stream->loop_ch);
|
|
|
|
free(new_stream->loop_ch);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* fill in the new structures */
|
|
|
|
opened_stream->ch = new_chans;
|
|
|
|
opened_stream->start_ch = new_start_chans;
|
|
|
|
opened_stream->loop_ch = new_loop_chans;
|
|
|
|
|
|
|
|
/* stereo! */
|
|
|
|
opened_stream->channels = 2;
|
|
|
|
|
|
|
|
/* discard the second VGMSTREAM */
|
|
|
|
free(new_stream);
|
|
|
|
}
|
|
|
|
fail:
|
2008-05-20 17:18:38 +02:00
|
|
|
return;
|
2009-07-30 06:10:16 +02:00
|
|
|
}
|