2008-01-31 07:04:26 +01:00
|
|
|
/*
|
|
|
|
* vgmstream.h - definitions for VGMSTREAM, encapsulating a multi-channel, looped audio stream
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _VGMSTREAM_H
|
|
|
|
#define _VGMSTREAM_H
|
|
|
|
|
2019-03-11 14:49:29 +01:00
|
|
|
/* reasonable limits */
|
2013-05-27 05:55:50 +02:00
|
|
|
enum { PATH_LIMIT = 32768 };
|
2019-02-17 20:28:27 +01:00
|
|
|
enum { STREAM_NAME_SIZE = 255 };
|
2019-02-23 23:38:53 +01:00
|
|
|
enum { VGMSTREAM_MAX_CHANNELS = 64 };
|
2019-03-02 19:23:37 +01:00
|
|
|
enum { VGMSTREAM_MIN_SAMPLE_RATE = 300 }; /* 300 is Wwise min */
|
2019-04-07 01:43:59 +02:00
|
|
|
enum { VGMSTREAM_MAX_SAMPLE_RATE = 192000 }; /* found in some FSB5 */
|
2019-03-09 23:27:28 +01:00
|
|
|
enum { VGMSTREAM_MAX_SUBSONGS = 65535 };
|
2019-12-05 23:20:16 +01:00
|
|
|
enum { VGMSTREAM_MAX_NUM_SAMPLES = 1000000000 }; /* no ~5h vgm hopefully */
|
2013-05-27 05:55:50 +02:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
#include "streamfile.h"
|
|
|
|
|
2018-08-20 20:08:24 +02:00
|
|
|
/* Due mostly to licensing issues, Vorbis, MPEG, G.722.1, etc decoding is done by external libraries.
|
|
|
|
* Libs are disabled by default, defined on compile-time for builds that support it */
|
|
|
|
//#define VGM_USE_VORBIS
|
|
|
|
//#define VGM_USE_MPEG
|
2010-04-10 11:58:47 +02:00
|
|
|
//#define VGM_USE_G7221
|
2015-01-25 06:08:25 +01:00
|
|
|
//#define VGM_USE_G719
|
2017-01-08 01:09:20 +01:00
|
|
|
//#define VGM_USE_MP4V2
|
|
|
|
//#define VGM_USE_FDKAAC
|
|
|
|
//#define VGM_USE_MAIATRAC3PLUS
|
|
|
|
//#define VGM_USE_FFMPEG
|
2018-01-07 20:15:49 +01:00
|
|
|
//#define VGM_USE_ATRAC9
|
2018-08-12 00:58:20 +02:00
|
|
|
//#define VGM_USE_CELT
|
2021-01-12 15:11:24 +01:00
|
|
|
//#define VGM_USE_SPEEX
|
2018-01-07 20:15:49 +01:00
|
|
|
|
2008-06-15 06:01:03 +02:00
|
|
|
|
|
|
|
#ifdef VGM_USE_VORBIS
|
|
|
|
#include <vorbis/vorbisfile.h>
|
|
|
|
#endif
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
|
|
|
#include <mpg123.h>
|
|
|
|
#endif
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2013-06-14 02:42:24 +02:00
|
|
|
#ifdef VGM_USE_MP4V2
|
2012-08-30 14:35:12 +02:00
|
|
|
#define MP4V2_NO_STDINT_DEFS
|
|
|
|
#include <mp4v2/mp4v2.h>
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2012-08-30 14:35:12 +02:00
|
|
|
|
2013-06-14 02:42:24 +02:00
|
|
|
#ifdef VGM_USE_FDKAAC
|
2012-08-30 14:35:12 +02:00
|
|
|
#include <aacdecoder_lib.h>
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2012-08-30 14:35:12 +02:00
|
|
|
|
2013-06-26 11:54:15 +02:00
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2017-05-01 10:56:40 +02:00
|
|
|
#include <maiatrac3plus.h>
|
2013-06-26 11:54:15 +02:00
|
|
|
#endif
|
|
|
|
|
2016-07-17 08:02:27 +02:00
|
|
|
#ifdef VGM_USE_FFMPEG
|
|
|
|
#include <libavcodec/avcodec.h>
|
|
|
|
#include <libavformat/avformat.h>
|
2017-09-24 18:40:59 +02:00
|
|
|
#include <libswresample/swresample.h>
|
2016-07-17 08:02:27 +02:00
|
|
|
#endif
|
|
|
|
|
2017-05-01 10:56:40 +02:00
|
|
|
#include <clHCA.h>
|
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
#include "coding/g72x_state.h"
|
2008-08-03 16:58:03 +02:00
|
|
|
#include "coding/nwa_decoder.h"
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2008-05-06 05:35:37 +02:00
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
/* The encoding type specifies the format the sound data itself takes */
|
|
|
|
typedef enum {
|
2020-08-15 18:23:49 +02:00
|
|
|
coding_SILENCE, /* generates silence */
|
|
|
|
|
2017-08-18 18:54:21 +02:00
|
|
|
/* PCM */
|
2008-01-31 07:04:26 +01:00
|
|
|
coding_PCM16LE, /* little endian 16-bit PCM */
|
2017-01-08 01:09:20 +01:00
|
|
|
coding_PCM16BE, /* big endian 16-bit PCM */
|
2017-11-18 02:20:52 +01:00
|
|
|
coding_PCM16_int, /* 16-bit PCM with sample-level interleave (for blocks) */
|
2008-07-14 21:21:45 +02:00
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
coding_PCM8, /* 8-bit PCM */
|
2017-12-24 01:39:24 +01:00
|
|
|
coding_PCM8_int, /* 8-bit PCM with sample-level interleave (for blocks) */
|
2009-04-28 18:52:49 +02:00
|
|
|
coding_PCM8_U, /* 8-bit PCM, unsigned (0x80 = 0) */
|
2017-11-18 02:20:52 +01:00
|
|
|
coding_PCM8_U_int, /* 8-bit PCM, unsigned (0x80 = 0) with sample-level interleave (for blocks) */
|
2018-08-26 16:36:08 +02:00
|
|
|
coding_PCM8_SB, /* 8-bit PCM, sign bit (others are 2's complement) */
|
2019-01-09 20:30:15 +01:00
|
|
|
coding_PCM4, /* 4-bit PCM, signed */
|
|
|
|
coding_PCM4_U, /* 4-bit PCM, unsigned */
|
2017-08-18 18:54:21 +02:00
|
|
|
|
2017-06-09 22:26:09 +02:00
|
|
|
coding_ULAW, /* 8-bit u-Law (non-linear PCM) */
|
2017-12-24 01:39:24 +01:00
|
|
|
coding_ULAW_int, /* 8-bit u-Law (non-linear PCM) with sample-level interleave (for blocks) */
|
2017-10-08 17:51:54 +02:00
|
|
|
coding_ALAW, /* 8-bit a-Law (non-linear PCM) */
|
2008-07-14 21:21:45 +02:00
|
|
|
|
2017-08-18 18:54:21 +02:00
|
|
|
coding_PCMFLOAT, /* 32 bit float PCM */
|
|
|
|
|
|
|
|
/* ADPCM */
|
2008-01-31 07:04:26 +01:00
|
|
|
coding_CRI_ADX, /* CRI ADX */
|
2017-05-13 23:04:30 +02:00
|
|
|
coding_CRI_ADX_fixed, /* CRI ADX, encoding type 2 with fixed coefficients */
|
2017-05-14 00:37:24 +02:00
|
|
|
coding_CRI_ADX_exp, /* CRI ADX, encoding type 4 with exponential scale */
|
2017-01-08 01:09:20 +01:00
|
|
|
coding_CRI_ADX_enc_8, /* CRI ADX, type 8 encryption (God Hand) */
|
|
|
|
coding_CRI_ADX_enc_9, /* CRI ADX, type 9 encryption (PSO2) */
|
|
|
|
|
|
|
|
coding_NGC_DSP, /* Nintendo DSP ADPCM */
|
2017-12-06 21:04:04 +01:00
|
|
|
coding_NGC_DSP_subint, /* Nintendo DSP ADPCM with frame subinterframe */
|
2017-01-08 01:09:20 +01:00
|
|
|
coding_NGC_DTK, /* Nintendo DTK ADPCM (hardware disc), also called TRK or ADP */
|
|
|
|
coding_NGC_AFC, /* Nintendo AFC ADPCM */
|
2020-05-01 16:04:23 +02:00
|
|
|
coding_VADPCM, /* Silicon Graphics VADPCM */
|
2017-01-08 01:09:20 +01:00
|
|
|
|
|
|
|
coding_G721, /* CCITT G.721 */
|
|
|
|
|
|
|
|
coding_XA, /* CD-ROM XA */
|
2018-01-04 23:38:22 +01:00
|
|
|
coding_PSX, /* Sony PS ADPCM (VAG) */
|
2017-07-01 23:02:24 +02:00
|
|
|
coding_PSX_badflags, /* Sony PS ADPCM with custom flag byte */
|
2019-08-11 19:38:40 +02:00
|
|
|
coding_PSX_cfg, /* Sony PS ADPCM with configurable frame size (int math) */
|
|
|
|
coding_PSX_pivotal, /* Sony PS ADPCM with configurable frame size (float math) */
|
2017-01-08 01:09:20 +01:00
|
|
|
coding_HEVAG, /* Sony PSVita ADPCM */
|
|
|
|
|
2017-07-21 19:19:58 +02:00
|
|
|
coding_EA_XA, /* Electronic Arts EA-XA ADPCM v1 (stereo) aka "EA ADPCM" */
|
|
|
|
coding_EA_XA_int, /* Electronic Arts EA-XA ADPCM v1 (mono/interleave) */
|
|
|
|
coding_EA_XA_V2, /* Electronic Arts EA-XA ADPCM v2 */
|
|
|
|
coding_MAXIS_XA, /* Maxis EA-XA ADPCM */
|
2019-01-12 02:26:38 +01:00
|
|
|
coding_EA_XAS_V0, /* Electronic Arts EA-XAS ADPCM v0 */
|
|
|
|
coding_EA_XAS_V1, /* Electronic Arts EA-XAS ADPCM v1 */
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2017-11-19 03:32:21 +01:00
|
|
|
coding_IMA, /* IMA ADPCM (stereo or mono, low nibble first) */
|
|
|
|
coding_IMA_int, /* IMA ADPCM (mono/interleave, low nibble first) */
|
2017-11-17 17:18:17 +01:00
|
|
|
coding_DVI_IMA, /* DVI IMA ADPCM (stereo or mono, high nibble first) */
|
2018-01-04 23:38:22 +01:00
|
|
|
coding_DVI_IMA_int, /* DVI IMA ADPCM (mono/interleave, high nibble first) */
|
2017-11-19 03:32:21 +01:00
|
|
|
coding_3DS_IMA, /* 3DS IMA ADPCM */
|
2018-08-02 18:22:01 +02:00
|
|
|
coding_SNDS_IMA, /* Heavy Iron Studios .snds IMA ADPCM */
|
|
|
|
coding_OTNS_IMA, /* Omikron The Nomad Soul IMA ADPCM */
|
|
|
|
coding_WV6_IMA, /* Gorilla Systems WV6 4-bit IMA ADPCM */
|
2018-09-06 20:25:04 +02:00
|
|
|
coding_ALP_IMA, /* High Voltage ALP 4-bit IMA ADPCM */
|
2018-10-04 19:43:37 +02:00
|
|
|
coding_FFTA2_IMA, /* Final Fantasy Tactics A2 4-bit IMA ADPCM */
|
2019-02-23 00:12:58 +01:00
|
|
|
coding_BLITZ_IMA, /* Blitz Games 4-bit IMA ADPCM */
|
2018-08-02 18:22:01 +02:00
|
|
|
|
2017-06-24 23:30:10 +02:00
|
|
|
coding_MS_IMA, /* Microsoft IMA ADPCM */
|
2018-02-17 12:30:14 +01:00
|
|
|
coding_XBOX_IMA, /* XBOX IMA ADPCM */
|
2018-03-23 21:21:44 +01:00
|
|
|
coding_XBOX_IMA_mch, /* XBOX IMA ADPCM (multichannel) */
|
2018-03-27 23:32:01 +02:00
|
|
|
coding_XBOX_IMA_int, /* XBOX IMA ADPCM (mono/interleave) */
|
2017-11-19 03:32:21 +01:00
|
|
|
coding_NDS_IMA, /* IMA ADPCM w/ NDS layout */
|
|
|
|
coding_DAT4_IMA, /* Eurocom 'DAT4' IMA ADPCM */
|
2017-04-29 02:53:36 +02:00
|
|
|
coding_RAD_IMA, /* Radical IMA ADPCM */
|
2018-03-27 23:32:01 +02:00
|
|
|
coding_RAD_IMA_mono, /* Radical IMA ADPCM (mono/interleave) */
|
2009-08-30 04:16:54 +02:00
|
|
|
coding_APPLE_IMA4, /* Apple Quicktime IMA4 */
|
2017-02-04 19:19:51 +01:00
|
|
|
coding_FSB_IMA, /* FMOD's FSB multichannel IMA ADPCM */
|
2017-04-11 19:59:29 +02:00
|
|
|
coding_WWISE_IMA, /* Audiokinetic Wwise IMA ADPCM */
|
2017-06-24 23:30:10 +02:00
|
|
|
coding_REF_IMA, /* Reflections IMA ADPCM */
|
2017-08-28 16:07:09 +02:00
|
|
|
coding_AWC_IMA, /* Rockstar AWC IMA ADPCM */
|
2017-11-05 17:06:40 +01:00
|
|
|
coding_UBI_IMA, /* Ubisoft IMA ADPCM */
|
2020-12-06 17:06:05 +01:00
|
|
|
coding_UBI_SCE_IMA, /* Ubisoft SCE IMA ADPCM */
|
2018-08-19 00:38:08 +02:00
|
|
|
coding_H4M_IMA, /* H4M IMA ADPCM (stereo or mono, high nibble first) */
|
2020-01-07 18:44:17 +01:00
|
|
|
coding_MTF_IMA, /* Capcom MT Framework IMA ADPCM */
|
2020-07-05 21:04:48 +02:00
|
|
|
coding_CD_IMA, /* Crystal Dynamics IMA ADPCM */
|
2018-08-19 00:38:08 +02:00
|
|
|
|
2018-08-02 17:15:09 +02:00
|
|
|
coding_MSADPCM, /* Microsoft ADPCM (stereo/mono) */
|
2019-01-19 23:08:26 +01:00
|
|
|
coding_MSADPCM_int, /* Microsoft ADPCM (mono) */
|
2018-08-02 17:15:09 +02:00
|
|
|
coding_MSADPCM_ck, /* Microsoft ADPCM (Cricket Audio variation) */
|
2017-04-11 19:59:29 +02:00
|
|
|
coding_WS, /* Westwood Studios VBR ADPCM */
|
2019-03-02 21:12:00 +01:00
|
|
|
|
2019-09-21 19:15:01 +02:00
|
|
|
coding_AICA, /* Yamaha AICA ADPCM (stereo) */
|
|
|
|
coding_AICA_int, /* Yamaha AICA ADPCM (mono/interleave) */
|
2019-03-02 21:12:00 +01:00
|
|
|
coding_ASKA, /* Aska ADPCM */
|
2019-03-03 02:30:52 +01:00
|
|
|
coding_NXAP, /* NXAP ADPCM */
|
2019-03-02 21:12:00 +01:00
|
|
|
|
2020-01-11 12:33:27 +01:00
|
|
|
coding_TGC, /* Tiger Game.com 4-bit ADPCM */
|
2020-01-11 11:52:24 +01:00
|
|
|
|
2017-07-01 23:02:24 +02:00
|
|
|
coding_NDS_PROCYON, /* Procyon Studio ADPCM */
|
2017-01-08 01:09:20 +01:00
|
|
|
coding_L5_555, /* Level-5 0x555 ADPCM */
|
|
|
|
coding_LSF, /* lsf ADPCM (Fastlane Street Racing iPhone)*/
|
2017-07-21 19:19:58 +02:00
|
|
|
coding_MTAF, /* Konami MTAF ADPCM */
|
2017-05-18 19:16:44 +02:00
|
|
|
coding_MTA2, /* Konami MTA2 ADPCM */
|
2017-04-28 17:26:25 +02:00
|
|
|
coding_MC3, /* Paradigm MC3 3-bit ADPCM */
|
2018-03-08 22:55:50 +01:00
|
|
|
coding_FADPCM, /* FMOD FADPCM 4-bit ADPCM */
|
2018-07-18 00:52:24 +02:00
|
|
|
coding_ASF, /* Argonaut ASF 4-bit ADPCM */
|
2019-02-10 01:36:05 +01:00
|
|
|
coding_DSA, /* Ocean DSA 4-bit ADPCM */
|
2018-07-27 17:11:11 +02:00
|
|
|
coding_XMD, /* Konami XMD 4-bit ADPCM */
|
2018-12-27 16:14:59 +01:00
|
|
|
coding_PCFX, /* PC-FX 4-bit ADPCM */
|
2019-09-08 21:12:13 +02:00
|
|
|
coding_OKI16, /* OKI 4-bit ADPCM with 16-bit output and modified expand */
|
|
|
|
coding_OKI4S, /* OKI 4-bit ADPCM with 16-bit output and cuadruple step */
|
2019-08-29 00:54:49 +02:00
|
|
|
coding_PTADPCM, /* Platinum 4-bit ADPCM */
|
2020-05-01 09:15:01 +02:00
|
|
|
coding_IMUSE, /* LucasArts iMUSE Variable ADPCM */
|
2021-01-23 15:50:32 +01:00
|
|
|
coding_COMPRESSWAVE, /* CompressWave Huffman ADPCM */
|
2017-01-08 01:09:20 +01:00
|
|
|
|
|
|
|
/* others */
|
|
|
|
coding_SDX2, /* SDX2 2:1 Squareroot-Delta-Exact compression DPCM */
|
|
|
|
coding_SDX2_int, /* SDX2 2:1 Squareroot-Delta-Exact compression with sample-level interleave */
|
|
|
|
coding_CBD2, /* CBD2 2:1 Cuberoot-Delta-Exact compression DPCM */
|
2020-10-11 00:01:11 +02:00
|
|
|
coding_CBD2_int, /* CBD2 2:1 Cuberoot-Delta-Exact compression, with sample-level interleave */
|
2018-09-06 17:45:34 +02:00
|
|
|
coding_SASSC, /* Activision EXAKT SASSC 8-bit DPCM */
|
|
|
|
coding_DERF, /* DERF 8-bit DPCM */
|
2020-10-11 00:01:11 +02:00
|
|
|
coding_WADY, /* WADY 8-bit DPCM */
|
|
|
|
coding_NWA, /* VisualArt's NWA DPCM */
|
2017-01-08 01:09:20 +01:00
|
|
|
coding_ACM, /* InterPlay ACM */
|
2018-11-10 00:09:03 +01:00
|
|
|
coding_CIRCUS_ADPCM, /* Circus 8-bit ADPCM */
|
2019-09-02 20:46:42 +02:00
|
|
|
coding_UBI_ADPCM, /* Ubisoft 4/6-bit ADPCM */
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2017-12-03 13:44:55 +01:00
|
|
|
coding_EA_MT, /* Electronic Arts MicroTalk (linear-predictive speech codec) */
|
2020-03-07 23:14:56 +01:00
|
|
|
coding_CIRCUS_VQ, /* Circus VQ */
|
2019-12-27 01:29:56 +01:00
|
|
|
coding_RELIC, /* Relic Codec (DCT-based) */
|
2017-01-08 01:09:20 +01:00
|
|
|
coding_CRI_HCA, /* CRI High Compression Audio (MDCT-based) */
|
|
|
|
|
|
|
|
#ifdef VGM_USE_VORBIS
|
2018-03-08 23:32:58 +01:00
|
|
|
coding_OGG_VORBIS, /* Xiph Vorbis with Ogg layer (MDCT-based) */
|
2017-07-28 23:26:58 +02:00
|
|
|
coding_VORBIS_custom, /* Xiph Vorbis with custom layer (MDCT-based) */
|
2017-01-08 01:09:20 +01:00
|
|
|
#endif
|
|
|
|
|
2008-07-05 13:49:29 +02:00
|
|
|
#ifdef VGM_USE_MPEG
|
2017-07-29 13:05:23 +02:00
|
|
|
coding_MPEG_custom, /* MPEG audio with custom features (MDCT-based) */
|
2017-08-05 17:54:50 +02:00
|
|
|
coding_MPEG_ealayer3, /* EALayer3, custom MPEG frames */
|
2017-07-29 13:05:23 +02:00
|
|
|
coding_MPEG_layer1, /* MP1 MPEG audio (MDCT-based) */
|
|
|
|
coding_MPEG_layer2, /* MP2 MPEG audio (MDCT-based) */
|
|
|
|
coding_MPEG_layer3, /* MP3 MPEG audio (MDCT-based) */
|
2008-07-05 13:49:29 +02:00
|
|
|
#endif
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2010-03-21 05:23:18 +01:00
|
|
|
#ifdef VGM_USE_G7221
|
2017-01-08 01:09:20 +01:00
|
|
|
coding_G7221C, /* ITU G.722.1 annex C (Polycom Siren 14) */
|
2015-01-25 06:08:25 +01:00
|
|
|
#endif
|
2008-07-20 07:41:41 +02:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
#ifdef VGM_USE_G719
|
|
|
|
coding_G719, /* ITU G.719 annex B (Polycom Siren 22) */
|
2016-07-17 08:02:27 +02:00
|
|
|
#endif
|
2012-08-30 14:35:12 +02:00
|
|
|
|
2013-06-14 02:42:24 +02:00
|
|
|
#if defined(VGM_USE_MP4V2) && defined(VGM_USE_FDKAAC)
|
2018-01-04 23:38:22 +01:00
|
|
|
coding_MP4_AAC, /* AAC (MDCT-based) */
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2013-06-26 11:54:15 +02:00
|
|
|
|
|
|
|
#ifdef VGM_USE_MAIATRAC3PLUS
|
2018-01-04 23:38:22 +01:00
|
|
|
coding_AT3plus, /* Sony ATRAC3plus (MDCT-based) */
|
2017-01-08 01:09:20 +01:00
|
|
|
#endif
|
|
|
|
|
2017-12-29 00:29:33 +01:00
|
|
|
#ifdef VGM_USE_ATRAC9
|
|
|
|
coding_ATRAC9, /* Sony ATRAC9 (MDCT-based) */
|
|
|
|
#endif
|
|
|
|
|
2018-08-12 00:58:20 +02:00
|
|
|
#ifdef VGM_USE_CELT
|
|
|
|
coding_CELT_FSB, /* Custom Xiph CELT (MDCT-based) */
|
|
|
|
#endif
|
|
|
|
|
2021-01-12 15:11:24 +01:00
|
|
|
#ifdef VGM_USE_SPEEX
|
|
|
|
coding_SPEEX, /* Custom Speex (CELP-based) */
|
|
|
|
#endif
|
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
#ifdef VGM_USE_FFMPEG
|
|
|
|
coding_FFmpeg, /* Formats handled by FFmpeg (ATRAC3, XMA, AC3, etc) */
|
2013-06-26 11:54:15 +02:00
|
|
|
#endif
|
2008-01-31 07:04:26 +01:00
|
|
|
} coding_t;
|
|
|
|
|
|
|
|
/* The layout type specifies how the sound data is laid out in the file */
|
|
|
|
typedef enum {
|
|
|
|
/* generic */
|
|
|
|
layout_none, /* straight data */
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
/* interleave */
|
|
|
|
layout_interleave, /* equal interleave throughout the stream */
|
2008-07-14 14:31:19 +02:00
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
/* headered blocks */
|
2018-03-29 19:00:04 +02:00
|
|
|
layout_blocked_ast,
|
|
|
|
layout_blocked_halpst,
|
|
|
|
layout_blocked_xa,
|
2017-11-25 01:18:27 +01:00
|
|
|
layout_blocked_ea_schl,
|
2017-11-18 02:20:52 +01:00
|
|
|
layout_blocked_ea_1snh,
|
2018-03-08 23:26:10 +01:00
|
|
|
layout_blocked_caf,
|
2018-03-23 18:34:37 +01:00
|
|
|
layout_blocked_wsi,
|
2018-03-29 19:00:04 +02:00
|
|
|
layout_blocked_str_snds,
|
|
|
|
layout_blocked_ws_aud,
|
|
|
|
layout_blocked_matx,
|
2017-11-23 22:48:11 +01:00
|
|
|
layout_blocked_dec,
|
2018-03-29 19:00:04 +02:00
|
|
|
layout_blocked_xvas,
|
|
|
|
layout_blocked_vs,
|
2018-12-22 19:47:17 +01:00
|
|
|
layout_blocked_mul,
|
2018-03-29 19:00:04 +02:00
|
|
|
layout_blocked_gsb,
|
|
|
|
layout_blocked_thp,
|
|
|
|
layout_blocked_filp,
|
2018-02-17 21:15:21 +01:00
|
|
|
layout_blocked_ea_swvr,
|
2018-02-25 16:52:57 +01:00
|
|
|
layout_blocked_adm,
|
2018-03-29 19:00:04 +02:00
|
|
|
layout_blocked_bdsp,
|
|
|
|
layout_blocked_mxch,
|
2017-11-25 01:18:27 +01:00
|
|
|
layout_blocked_ivaud, /* GTA IV .ivaud blocks */
|
2018-03-29 19:00:04 +02:00
|
|
|
layout_blocked_tra, /* DefJam Rapstar .tra blocks */
|
|
|
|
layout_blocked_ps2_iab,
|
2018-12-22 20:09:01 +01:00
|
|
|
layout_blocked_vs_str,
|
2018-02-25 16:52:57 +01:00
|
|
|
layout_blocked_rws,
|
|
|
|
layout_blocked_hwas,
|
2017-11-25 01:18:27 +01:00
|
|
|
layout_blocked_ea_sns, /* newest Electronic Arts blocks, found in SNS/SNU/SPS/etc formats */
|
2017-08-28 16:07:09 +02:00
|
|
|
layout_blocked_awc, /* Rockstar AWC */
|
2017-11-23 22:32:31 +01:00
|
|
|
layout_blocked_vgs, /* Guitar Hero II (PS2) */
|
2020-10-01 22:02:54 +02:00
|
|
|
layout_blocked_xwav,
|
2018-01-13 11:36:35 +01:00
|
|
|
layout_blocked_xvag_subsong, /* XVAG subsongs [God of War III (PS4)] */
|
2018-03-29 15:39:33 +02:00
|
|
|
layout_blocked_ea_wve_au00, /* EA WVE au00 blocks */
|
|
|
|
layout_blocked_ea_wve_ad10, /* EA WVE Ad10 blocks */
|
2018-03-29 17:01:46 +02:00
|
|
|
layout_blocked_sthd, /* Dream Factory STHD */
|
2018-06-03 13:08:41 +02:00
|
|
|
layout_blocked_h4m, /* H4M video */
|
2018-07-22 23:13:03 +02:00
|
|
|
layout_blocked_xa_aiff, /* XA in AIFF files [Crusader: No Remorse (SAT), Road Rash (3DO)] */
|
2018-12-22 20:09:01 +01:00
|
|
|
layout_blocked_vs_square,
|
2020-03-08 22:15:06 +01:00
|
|
|
layout_blocked_vid1,
|
2020-04-05 13:09:05 +02:00
|
|
|
layout_blocked_ubi_sce,
|
2010-10-03 10:04:17 +02:00
|
|
|
|
2008-02-13 15:31:21 +01:00
|
|
|
/* otherwise odd */
|
2018-03-30 21:28:32 +02:00
|
|
|
layout_segmented, /* song divided in segments (song sections) */
|
|
|
|
layout_layered, /* song divided in layers (song channels) */
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
} layout_t;
|
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
/* The meta type specifies how we know what we know about the file.
|
|
|
|
* We may know because of a header we read, some of it may have been guessed from filenames, etc. */
|
2008-01-31 07:04:26 +01:00
|
|
|
typedef enum {
|
2020-08-15 18:23:49 +02:00
|
|
|
meta_SILENCE,
|
2018-08-26 19:16:24 +02:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_DSP_STD, /* Nintendo standard GC ADPCM (DSP) header */
|
2008-01-31 07:04:26 +01:00
|
|
|
meta_DSP_CSTR, /* Star Fox Assault "Cstr" */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_DSP_RS03, /* Retro: Metroid Prime 2 "RS03" */
|
2008-01-31 07:04:26 +01:00
|
|
|
meta_DSP_STM, /* Paper Mario 2 STM */
|
2018-08-26 19:16:24 +02:00
|
|
|
meta_AGSC, /* Retro: Metroid Prime 2 title */
|
|
|
|
meta_CSMP, /* Retro: Metroid Prime 3 (Wii), Donkey Kong Country Returns (Wii) */
|
|
|
|
meta_RFRM, /* Retro: Donkey Kong Country Tropical Freeze (Wii U) */
|
2008-05-15 00:26:44 +02:00
|
|
|
meta_DSP_MPDSP, /* Monopoly Party single header stereo */
|
2008-05-16 00:06:33 +02:00
|
|
|
meta_DSP_JETTERS, /* Bomberman Jetters .dsp */
|
2018-04-21 02:14:21 +02:00
|
|
|
meta_DSP_MSS, /* Free Radical GC games */
|
|
|
|
meta_DSP_GCM, /* some of Traveller's Tales games */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_DSP_STR, /* Conan .str files */
|
2008-06-15 11:23:34 +02:00
|
|
|
meta_DSP_SADB, /* .sad */
|
2008-06-29 03:30:13 +02:00
|
|
|
meta_DSP_WSI, /* .wsi */
|
2018-08-12 17:13:51 +02:00
|
|
|
meta_IDSP_TT, /* Traveller's Tales games */
|
2008-10-11 06:00:57 +02:00
|
|
|
meta_DSP_WII_MUS, /* .mus */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_DSP_WII_WSD, /* Phantom Brave (WII) */
|
|
|
|
meta_WII_NDP, /* Vertigo (Wii) */
|
|
|
|
meta_DSP_YGO, /* Konami: Yu-Gi-Oh! The Falsebound Kingdom (NGC), Hikaru no Go 3 (NGC) */
|
2008-05-28 13:36:17 +02:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_STRM, /* Nintendo STRM */
|
2017-11-25 00:43:18 +01:00
|
|
|
meta_RSTM, /* Nintendo RSTM (Revolution Stream, similar to STRM) */
|
2008-03-03 22:38:11 +01:00
|
|
|
meta_AFC, /* AFC */
|
2008-03-04 01:46:55 +01:00
|
|
|
meta_AST, /* AST */
|
2008-05-06 03:01:06 +02:00
|
|
|
meta_RWSD, /* single-stream RWSD */
|
2008-12-20 23:57:54 +01:00
|
|
|
meta_RWAR, /* single-stream RWAR */
|
2009-01-20 02:03:33 +01:00
|
|
|
meta_RWAV, /* contents of RWAR */
|
2014-08-03 01:10:45 +02:00
|
|
|
meta_CWAV, /* contents of CWAR */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_FWAV, /* contents of FWAR */
|
2008-05-17 01:14:47 +02:00
|
|
|
meta_RSTM_SPM, /* RSTM with 44->22khz hack */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_THP, /* THP movie files */
|
2009-01-01 04:24:57 +01:00
|
|
|
meta_RSTM_shrunken, /* Atlus' mutant shortened RSTM */
|
2020-06-21 01:17:19 +02:00
|
|
|
meta_SWAV,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_NDS_RRDS, /* Ridge Racer DS */
|
2009-09-05 14:18:34 +02:00
|
|
|
meta_WII_BNS, /* Wii BNS Banner Sound (similar to RSTM) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_WIIU_BTSND, /* Wii U Boot Sound */
|
2008-12-12 00:16:09 +01:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_ADX_03, /* CRI ADX "type 03" */
|
|
|
|
meta_ADX_04, /* CRI ADX "type 04" */
|
|
|
|
meta_ADX_05, /* CRI ADX "type 05" */
|
2008-08-02 12:24:28 +02:00
|
|
|
meta_AIX, /* CRI AIX */
|
2009-01-03 12:08:44 +01:00
|
|
|
meta_AAX, /* CRI AAX */
|
2011-01-04 15:20:49 +01:00
|
|
|
meta_UTF_DSP, /* CRI ADPCM_WII, like AAX with DSP */
|
2008-05-03 21:44:49 +02:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_NGC_ADPDTK, /* NGC DTK/ADP (.adp/dkt DTK) [no header_id] */
|
|
|
|
meta_RSF, /* Retro Studios RSF (Metroid Prime .rsf) [no header_id] */
|
2008-03-04 08:15:25 +01:00
|
|
|
meta_HALPST, /* HAL Labs HALPST */
|
2008-04-02 19:50:50 +02:00
|
|
|
meta_GCSW, /* GCSW (PCM) */
|
2018-03-08 23:26:10 +01:00
|
|
|
meta_CAF, /* tri-Crescendo CAF */
|
2010-01-10 22:22:20 +01:00
|
|
|
meta_MYSPD, /* U-Sing .myspd */
|
2010-01-19 20:40:41 +01:00
|
|
|
meta_HIS, /* Her Ineractive .his */
|
2010-03-21 05:23:18 +01:00
|
|
|
meta_BNSF, /* Bandai Namco Sound Format */
|
2009-01-23 15:06:14 +01:00
|
|
|
|
2018-12-08 02:50:54 +01:00
|
|
|
meta_XA, /* CD-ROM XA */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_SShd, /* .ADS with SShd header */
|
2019-03-11 14:49:29 +01:00
|
|
|
meta_NPS,
|
2017-05-13 13:01:16 +02:00
|
|
|
meta_PS2_RXWS, /* Sony games (Genji, Okage Shadow King, Arc The Lad Twilight of Spirits) */
|
2019-09-02 22:32:02 +02:00
|
|
|
meta_RAW_INT,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_EXST, /* Shadow of Colossus EXST */
|
2020-07-16 21:47:50 +02:00
|
|
|
meta_SVAG_KCET,
|
2018-08-22 20:39:31 +02:00
|
|
|
meta_PS_HEADERLESS, /* headerless PS-ADPCM */
|
2021-01-24 20:36:59 +01:00
|
|
|
meta_MIB_MIH,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_MIC, /* KOEI MIC File */
|
|
|
|
meta_PS2_VAGi, /* VAGi Interleaved File */
|
|
|
|
meta_PS2_VAGp, /* VAGp Mono File */
|
|
|
|
meta_PS2_pGAV, /* VAGp with Little Endian Header */
|
2019-11-01 08:29:37 +01:00
|
|
|
meta_PS2_VAGp_AAAP, /* Acclaim Austin Audio VAG header */
|
2019-08-15 22:07:12 +02:00
|
|
|
meta_SEB,
|
2018-08-04 21:02:10 +02:00
|
|
|
meta_STR_WAV, /* Blitz Games STR+WAV files */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_ILD, /* ILD File */
|
|
|
|
meta_PS2_PNB, /* PsychoNauts Bgm File */
|
2018-08-12 02:19:17 +02:00
|
|
|
meta_VPK, /* VPK Audio File */
|
2008-06-25 18:42:13 +02:00
|
|
|
meta_PS2_BMDX, /* Beatmania thing */
|
2008-07-06 14:23:37 +02:00
|
|
|
meta_PS2_IVB, /* Langrisser 3 IVB */
|
2009-05-01 17:03:51 +02:00
|
|
|
meta_PS2_SND, /* some Might & Magics SSND header */
|
2018-11-01 16:39:53 +01:00
|
|
|
meta_SVS, /* Square SVS */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_XSS, /* Dino Crisis 3 */
|
|
|
|
meta_SL3, /* Test Drive Unlimited */
|
|
|
|
meta_HGC1, /* Knights of the Temple 2 */
|
|
|
|
meta_AUS, /* Various Capcom games */
|
|
|
|
meta_RWS, /* RenderWare games (only when using RW Audio middleware) */
|
2009-01-23 15:06:14 +01:00
|
|
|
meta_FSB1, /* FMOD Sample Bank, version 1 */
|
2016-12-29 14:06:57 +01:00
|
|
|
meta_FSB2, /* FMOD Sample Bank, version 2 */
|
|
|
|
meta_FSB3, /* FMOD Sample Bank, version 3.0/3.1 */
|
2009-01-23 15:06:14 +01:00
|
|
|
meta_FSB4, /* FMOD Sample Bank, version 4 */
|
2014-04-24 06:31:04 +02:00
|
|
|
meta_FSB5, /* FMOD Sample Bank, version 5 */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_RWX, /* Air Force Delta Storm (XBOX) */
|
|
|
|
meta_XWB, /* Microsoft XACT framework (Xbox, X360, Windows) */
|
2017-06-24 23:33:49 +02:00
|
|
|
meta_PS2_XA30, /* Driver - Parallel Lines (PS2) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_MUSC, /* Krome PS2 games */
|
2019-08-03 23:35:10 +02:00
|
|
|
meta_MUSX,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_LEG, /* Legaia 2 [no header_id] */
|
|
|
|
meta_FILP, /* Resident Evil - Dead Aim */
|
2019-03-22 21:12:33 +01:00
|
|
|
meta_IKM,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_SFS, /* Baroque */
|
|
|
|
meta_BG00, /* Ibara, Mushihimesama */
|
|
|
|
meta_PS2_RSTM, /* Midnight Club 3 */
|
|
|
|
meta_PS2_KCES, /* Dance Dance Revolution */
|
|
|
|
meta_PS2_DXH, /* Tokobot Plus - Myteries of the Karakuri */
|
2019-01-05 20:20:08 +01:00
|
|
|
meta_VSV,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_SCD_PCM, /* Lunar - Eternal Blue */
|
|
|
|
meta_PS2_PCM, /* Konami KCEJ East: Ephemeral Fantasia, Yu-Gi-Oh! The Duelists of the Roses, 7 Blades */
|
2018-03-25 11:08:36 +02:00
|
|
|
meta_PS2_RKV, /* Legacy of Kain - Blood Omen 2 (PS2) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_VAS, /* Pro Baseball Spirits 5 */
|
|
|
|
meta_PS2_TEC, /* TECMO badflagged stream */
|
|
|
|
meta_PS2_ENTH, /* Enthusia */
|
|
|
|
meta_SDT, /* Baldur's Gate - Dark Alliance */
|
|
|
|
meta_NGC_TYDSP, /* Ty - The Tasmanian Tiger */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_CAPDSP, /* Capcom DSP Header [no header_id] */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_DC_STR, /* SEGA Stream Asset Builder */
|
|
|
|
meta_DC_STR_V2, /* variant of SEGA Stream Asset Builder */
|
|
|
|
meta_NGC_BH2PCM, /* Bio Hazard 2 */
|
2019-10-05 14:51:49 +02:00
|
|
|
meta_SAP,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_DC_IDVI, /* Eldorado Gate */
|
|
|
|
meta_KRAW, /* Geometry Wars - Galaxies */
|
|
|
|
meta_PS2_OMU, /* PS2 Int file with Header */
|
|
|
|
meta_PS2_XA2, /* XG3 Extreme-G Racing */
|
2019-08-28 23:11:46 +02:00
|
|
|
meta_NUB,
|
2018-08-12 18:04:19 +02:00
|
|
|
meta_IDSP_NL, /* Mario Strikers Charged (Wii) */
|
|
|
|
meta_IDSP_IE, /* Defencer (GC) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_SPT_SPD, /* Various (SPT+SPT DSP) */
|
|
|
|
meta_ISH_ISD, /* Various (ISH+ISD DSP) */
|
|
|
|
meta_GSP_GSB, /* Tecmo games (Super Swing Golf 1 & 2, Quamtum Theory) */
|
|
|
|
meta_YDSP, /* WWE Day of Reckoning */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_FFCC_STR, /* Final Fantasy: Crystal Chronicles */
|
2018-04-07 11:37:44 +02:00
|
|
|
meta_UBI_JADE, /* Beyond Good & Evil, Rayman Raving Rabbids */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_GCA, /* Metal Slug Anthology */
|
|
|
|
meta_MSVP, /* Popcap Hits */
|
|
|
|
meta_NGC_SSM, /* Golden Gashbell Full Power */
|
|
|
|
meta_PS2_JOE, /* Wall-E / Pixar games */
|
|
|
|
meta_NGC_YMF, /* WWE WrestleMania X8 */
|
2020-05-24 16:32:14 +02:00
|
|
|
meta_SADL,
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_PS2_CCC, /* Tokyo Xtreme Racer DRIFT 2 */
|
2018-12-08 02:45:19 +01:00
|
|
|
meta_FAG, /* Jackie Chan - Stuntmaster */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_PS2_MIHB, /* Merged MIH+MIB */
|
|
|
|
meta_NGC_PDT, /* Mario Party 6 */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_DC_ASD, /* Miss Moonligh */
|
|
|
|
meta_NAOMI_SPSD, /* Guilty Gear X */
|
2019-08-10 17:24:06 +02:00
|
|
|
meta_RSD,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_ASS, /* ASS */
|
2018-11-01 16:34:53 +01:00
|
|
|
meta_SEG, /* Eragon */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_NDS_STRM_FFTA2, /* Final Fantasy Tactics A2 */
|
|
|
|
meta_STR_ASR, /* Donkey Kong Jet Race */
|
|
|
|
meta_ZWDSP, /* Zack and Wiki */
|
|
|
|
meta_VGS, /* Guitar Hero Encore - Rocks the 80s */
|
2019-03-04 20:08:33 +01:00
|
|
|
meta_DCS_WAV,
|
2019-01-05 04:36:20 +01:00
|
|
|
meta_SMP,
|
2008-12-24 01:00:10 +01:00
|
|
|
meta_WII_SNG, /* Excite Trucks */
|
2018-12-22 19:47:17 +01:00
|
|
|
meta_MUL,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_SAT_BAKA, /* Crypt Killer */
|
2019-12-15 01:37:56 +01:00
|
|
|
meta_VSF,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_VSF_TTA, /* Tiny Toon Adventures: Defenders of the Universe */
|
|
|
|
meta_ADS, /* Gauntlet Dark Legends (GC) */
|
|
|
|
meta_PS2_SPS, /* Ape Escape 2 */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_PS2_XA2_RRP, /* RC Revenge Pro */
|
|
|
|
meta_NGC_DSP_KONAMI, /* Konami DSP header, found in various games */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_UBI_CKD, /* Ubisoft CKD RIFF header (Rayman Origins Wii) */
|
2019-09-02 22:32:02 +02:00
|
|
|
meta_RAW_WAVM,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_XBOX_WVS, /* XBOX WVS */
|
|
|
|
meta_NGC_WVS, /* Metal Arms - Glitch in the System */
|
|
|
|
meta_XBOX_MATX, /* XBOX MATX */
|
2019-09-02 22:32:02 +02:00
|
|
|
meta_XMU,
|
|
|
|
meta_XVAS,
|
2017-07-23 17:09:55 +02:00
|
|
|
meta_EA_SCHL, /* Electronic Arts SCHl with variable header */
|
|
|
|
meta_EA_SCHL_fixed, /* Electronic Arts SCHl with fixed header */
|
2017-07-23 03:46:55 +02:00
|
|
|
meta_EA_BNK, /* Electronic Arts BNK */
|
2017-11-18 02:20:52 +01:00
|
|
|
meta_EA_1SNH, /* Electronic Arts 1SNh/EACS */
|
2019-01-02 17:17:14 +01:00
|
|
|
meta_EA_EACS,
|
2019-09-02 22:32:02 +02:00
|
|
|
meta_RAW_PCM,
|
2008-06-10 03:20:54 +02:00
|
|
|
meta_GENH, /* generic header */
|
2008-07-01 05:23:44 +02:00
|
|
|
meta_AIFC, /* Audio Interchange File Format AIFF-C */
|
2008-07-01 18:11:59 +02:00
|
|
|
meta_AIFF, /* Audio Interchange File Format */
|
2008-07-02 15:39:51 +02:00
|
|
|
meta_STR_SNDS, /* .str with SNDS blocks and SHDR header */
|
2008-07-03 04:20:52 +02:00
|
|
|
meta_WS_AUD, /* Westwood Studios .aud */
|
|
|
|
meta_WS_AUD_old, /* Westwood Studios .aud, old style */
|
2008-07-06 20:05:04 +02:00
|
|
|
meta_RIFF_WAVE, /* RIFF, for WAVs */
|
2017-11-25 00:43:18 +01:00
|
|
|
meta_RIFF_WAVE_POS, /* .wav + .pos for looping (Ys Complete PC) */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_RIFF_WAVE_labl, /* RIFF w/ loop Markers in LIST-adtl-labl */
|
2008-10-08 02:09:11 +02:00
|
|
|
meta_RIFF_WAVE_smpl, /* RIFF w/ loop data in smpl chunk */
|
2018-02-23 23:30:55 +01:00
|
|
|
meta_RIFF_WAVE_wsmp, /* RIFF w/ loop data in wsmp chunk */
|
2009-01-04 16:36:06 +01:00
|
|
|
meta_RIFF_WAVE_MWV, /* .mwv RIFF w/ loop data in ctrl chunk pflt */
|
2009-05-25 22:59:50 +02:00
|
|
|
meta_RIFX_WAVE, /* RIFX, for big-endian WAVs */
|
|
|
|
meta_RIFX_WAVE_smpl, /* RIFX w/ loop data in smpl chunk */
|
2017-09-24 22:27:33 +02:00
|
|
|
meta_XNB, /* XNA Game Studio 4.0 */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_PC_MXST, /* Lego Island MxSt */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_SAB, /* Worms 4 Mayhem SAB+SOB file */
|
2008-07-11 02:41:21 +02:00
|
|
|
meta_NWA, /* Visual Art's NWA */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_NWA_NWAINFOINI, /* Visual Art's NWA w/ NWAINFO.INI for looping */
|
|
|
|
meta_NWA_GAMEEXEINI, /* Visual Art's NWA w/ Gameexe.ini for looping */
|
2017-11-15 23:26:38 +01:00
|
|
|
meta_SAT_DVI, /* Konami KCE Nagoya DVI (SAT games) */
|
|
|
|
meta_DC_KCEY, /* Konami KCE Yokohama KCEYCOMP (DC games) */
|
2008-07-20 07:41:41 +02:00
|
|
|
meta_ACM, /* InterPlay ACM header */
|
|
|
|
meta_MUS_ACM, /* MUS playlist of InterPlay ACM files */
|
2017-11-23 22:48:11 +01:00
|
|
|
meta_DEC, /* Falcom PC games (Xanadu Next, Gurumin) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_VS, /* Men in Black .vs */
|
2017-07-29 11:46:53 +02:00
|
|
|
meta_FFXI_BGW, /* FFXI (PC) BGW */
|
|
|
|
meta_FFXI_SPW, /* FFXI (PC) SPW */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_STS_WII, /* Shikigami No Shiro 3 STS Audio File */
|
|
|
|
meta_PS2_P2BT, /* Pop'n'Music 7 Audio File */
|
|
|
|
meta_PS2_GBTS, /* Pop'n'Music 9 Audio File */
|
2010-09-16 13:53:36 +02:00
|
|
|
meta_NGC_DSP_IADP, /* Gamecube Interleave DSP */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_TK5, /* Tekken 5 Stream Files */
|
|
|
|
meta_PS2_MCG, /* Gunvari MCG Files (was name .GCM on disk) */
|
2009-03-13 00:42:56 +01:00
|
|
|
meta_ZSD, /* Dragon Booster ZSD */
|
2018-12-23 13:39:50 +01:00
|
|
|
meta_REDSPARK, /* "RedSpark" RSD (MadWorld) */
|
|
|
|
meta_IVAUD, /* .ivaud GTA IV */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_NDS_HWAS, /* Spider-Man 3, Tony Hawk's Downhill Jam, possibly more... */
|
|
|
|
meta_NGC_LPS, /* Rave Master (Groove Adventure Rave)(GC) */
|
|
|
|
meta_NAOMI_ADPCM, /* NAOMI/NAOMI2 ARcade games */
|
|
|
|
meta_SD9, /* beatmaniaIIDX16 - EMPRESS (Arcade) */
|
|
|
|
meta_2DX9, /* beatmaniaIIDX16 - EMPRESS (Arcade) */
|
2009-07-11 13:28:36 +02:00
|
|
|
meta_PS2_VGV, /* Rune: Viking Warlord */
|
2009-08-25 19:50:43 +02:00
|
|
|
meta_NGC_GCUB, /* Sega Soccer Slam */
|
|
|
|
meta_MAXIS_XA, /* Sim City 3000 (PC) */
|
|
|
|
meta_NGC_SCK_DSP, /* Scorpion King (NGC) */
|
2009-08-30 04:16:54 +02:00
|
|
|
meta_CAFF, /* iPhone .caf */
|
2009-09-04 06:19:39 +02:00
|
|
|
meta_EXAKT_SC, /* Activision EXAKT .SC (PS2) */
|
2009-09-11 20:40:26 +02:00
|
|
|
meta_WII_WAS, /* DiRT 2 (WII) */
|
2010-02-19 12:28:29 +01:00
|
|
|
meta_PONA_3DO, /* Policenauts (3DO) */
|
|
|
|
meta_PONA_PSX, /* Policenauts (PSX) */
|
2009-10-15 11:24:04 +02:00
|
|
|
meta_XBOX_HLWAV, /* Half Life 2 (XBOX) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_AST, /* Some KOEI game (PS2) */
|
|
|
|
meta_DMSG, /* Nightcaster II - Equinox (XBOX) */
|
|
|
|
meta_NGC_DSP_AAAP, /* Turok: Evolution (NGC), Vexx (NGC) */
|
2010-04-20 22:26:10 +02:00
|
|
|
meta_PS2_STER, /* Juuni Kokuki: Kakukaku Taru Ou Michi Beni Midori no Uka */
|
|
|
|
meta_PS2_WB, /* Shooting Love. ~TRIZEAL~ */
|
2010-03-23 21:57:12 +01:00
|
|
|
meta_S14, /* raw Siren 14, 24kbit mono */
|
|
|
|
meta_SSS, /* raw Siren 14, 48kbit stereo */
|
2010-04-20 22:26:10 +02:00
|
|
|
meta_PS2_GCM, /* NamCollection */
|
|
|
|
meta_PS2_SMPL, /* Homura */
|
|
|
|
meta_PS2_MSA, /* Psyvariar -Complete Edition- */
|
|
|
|
meta_PS2_VOI, /* RAW Danger (Zettaizetsumei Toshi 2 - Itetsuita Kiokutachi) [PS2] */
|
2010-04-10 14:06:25 +02:00
|
|
|
meta_P3D, /* Prototype P3D */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_TK1, /* Tekken (NamCollection) */
|
2018-03-25 11:08:36 +02:00
|
|
|
meta_NGC_RKV, /* Legacy of Kain - Blood Omen 2 (GC) */
|
2010-04-20 22:26:10 +02:00
|
|
|
meta_DSP_DDSP, /* Various (2 dsp files stuck together */
|
|
|
|
meta_NGC_DSP_MPDS, /* Big Air Freestyle, Terminator 3 */
|
|
|
|
meta_DSP_STR_IG, /* Micro Machines, Superman Superman: Shadow of Apokolis */
|
2018-02-17 21:15:21 +01:00
|
|
|
meta_EA_SWVR, /* Future Cop L.A.P.D., Freekstyle */
|
2010-05-02 21:16:35 +02:00
|
|
|
meta_PS2_B1S, /* 7 Wonders of the ancient world */
|
|
|
|
meta_PS2_WAD, /* The golden Compass */
|
|
|
|
meta_DSP_XIII, /* XIII, possibly more (Ubisoft header???) */
|
|
|
|
meta_DSP_CABELAS, /* Cabelas games */
|
2018-02-25 15:04:29 +01:00
|
|
|
meta_PS2_ADM, /* Dragon Quest V (PS2) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_LPCM, /* Ah! My Goddess */
|
2010-05-10 10:02:22 +02:00
|
|
|
meta_DSP_BDSP, /* Ah! My Goddess */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_VMS, /* Autobahn Raser - Police Madness */
|
|
|
|
meta_XAU, /* XPEC Entertainment (Beat Down (PS2 Xbox), Spectral Force Chronicle (PS2)) */
|
2010-06-13 06:41:26 +02:00
|
|
|
meta_GH3_BAR, /* Guitar Hero III Mobile .bar */
|
2010-09-11 19:53:33 +02:00
|
|
|
meta_FFW, /* Freedom Fighters [NGC] */
|
|
|
|
meta_DSP_DSPW, /* Sengoku Basara 3 [WII] */
|
2010-08-28 03:43:40 +02:00
|
|
|
meta_PS2_JSTM, /* Tantei Jinguji Saburo - Kind of Blue (PS2) */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_SQEX_SCD, /* Square-Enix SCD */
|
2010-09-11 19:53:33 +02:00
|
|
|
meta_NGC_NST_DSP, /* Animaniacs [NGC] */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_BAF, /* Bizarre Creations (Blur, James Bond) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_XVAG, /* Ratchet & Clank Future: Quest for Booty (PS3) */
|
|
|
|
meta_PS3_CPS, /* Eternal Sonata (PS3) */
|
2019-03-11 14:49:29 +01:00
|
|
|
meta_MSF,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS3_PAST, /* Bakugan Battle Brawlers (PS3) */
|
2017-07-29 13:05:23 +02:00
|
|
|
meta_SGXD, /* Sony: Folklore, Genji, Tokyo Jungle (PS3), Brave Story, Kurohyo (PSP) */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_NGCA, /* GoldenEye 007 (Wii) */
|
|
|
|
meta_WII_RAS, /* Donkey Kong Country Returns (Wii) */
|
|
|
|
meta_PS2_SPM, /* Lethal Skies Elite Pilot: Team SW */
|
|
|
|
meta_X360_TRA, /* Def Jam Rapstar */
|
|
|
|
meta_PS2_VGS, /* Princess Soft PS2 games */
|
|
|
|
meta_PS2_IAB, /* Ueki no Housoku - Taosu ze Robert Juudan!! (PS2) */
|
2018-12-22 20:09:01 +01:00
|
|
|
meta_VS_STR, /* The Bouncer */
|
2011-01-13 09:11:58 +01:00
|
|
|
meta_LSF_N1NJ4N, /* .lsf n1nj4n Fastlane Street Racing (iPhone) */
|
2020-09-25 16:52:12 +02:00
|
|
|
meta_XWAV,
|
2019-09-02 22:32:02 +02:00
|
|
|
meta_RAW_SNDS,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_WMUS, /* The Warriors (PS2) */
|
|
|
|
meta_HYPERSCAN_KVAG, /* Hyperscan KVAG/BVG */
|
|
|
|
meta_IOS_PSND, /* Crash Bandicoot Nitro Kart 2 (iOS) */
|
|
|
|
meta_BOS_ADP, /* ADP! (Balls of Steel, PC) */
|
|
|
|
meta_OTNS_ADP, /* Omikron: The Nomad Soul .adp (PC/DC) */
|
|
|
|
meta_EB_SFX, /* Excitebots .sfx */
|
|
|
|
meta_EB_SF0, /* Excitebots .sf0 */
|
2019-03-11 11:58:57 +01:00
|
|
|
meta_MTAF,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_VAG1, /* Metal Gear Solid 3 VAG1 */
|
|
|
|
meta_PS2_VAG2, /* Metal Gear Solid 3 VAG2 */
|
|
|
|
meta_TUN, /* LEGO Racers (PC) */
|
|
|
|
meta_WPD, /* Shuffle! (PC) */
|
|
|
|
meta_MN_STR, /* Mini Ninjas (PC/PS3/WII) */
|
|
|
|
meta_MSS, /* Guerilla: ShellShock Nam '67 (PS2/Xbox), Killzone (PS2) */
|
|
|
|
meta_PS2_HSF, /* Lowrider (PS2) */
|
2019-11-24 20:38:16 +01:00
|
|
|
meta_IVAG,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_PS2_2PFS, /* Konami: Mahoromatic: Moetto - KiraKira Maid-San, GANTZ (PS2) */
|
|
|
|
meta_PS2_VBK, /* Disney's Stitch - Experiment 626 */
|
|
|
|
meta_OTM, /* Otomedius (Arcade) */
|
|
|
|
meta_CSTM, /* Nintendo 3DS CSTM (Century Stream) */
|
|
|
|
meta_FSTM, /* Nintendo Wii U FSTM (caFe? Stream) */
|
2019-11-24 10:47:54 +01:00
|
|
|
meta_IDSP_NAMCO,
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_KT_WIIBGM, /* Koei Tecmo WiiBGM */
|
2018-04-29 19:24:01 +02:00
|
|
|
meta_KTSS, /* Koei Tecmo Nintendo Stream (KNS) */
|
2017-07-29 13:05:23 +02:00
|
|
|
meta_MCA, /* Capcom MCA "MADP" */
|
|
|
|
meta_XB3D_ADX, /* Xenoblade Chronicles 3D ADX */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_HCA, /* CRI HCA */
|
2020-07-16 22:07:20 +02:00
|
|
|
meta_SVAG_SNK,
|
2017-01-08 12:59:04 +01:00
|
|
|
meta_PS2_VDS_VDM, /* Graffiti Kingdom */
|
2018-08-19 19:09:37 +02:00
|
|
|
meta_FFMPEG, /* any file supported by FFmpeg */
|
2017-01-08 14:19:32 +01:00
|
|
|
meta_X360_CXS, /* Eternal Sonata (Xbox 360) */
|
2017-02-12 14:42:02 +01:00
|
|
|
meta_AKB, /* SQEX iOS */
|
2017-03-19 00:44:58 +01:00
|
|
|
meta_X360_PASX, /* Namco PASX (Soul Calibur II HD X360) */
|
2017-03-18 19:26:39 +01:00
|
|
|
meta_XMA_RIFF, /* Microsoft RIFF XMA */
|
2017-03-19 00:44:58 +01:00
|
|
|
meta_X360_AST, /* Dead Rising (X360) */
|
2017-04-02 12:27:21 +02:00
|
|
|
meta_WWISE_RIFF, /* Audiokinetic Wwise RIFF/RIFX */
|
2017-04-07 18:01:04 +02:00
|
|
|
meta_UBI_RAKI, /* Ubisoft RAKI header (Rayman Legends, Just Dance 2017) */
|
2017-04-22 15:00:22 +02:00
|
|
|
meta_SXD, /* Sony SXD (Gravity Rush, Freedom Wars PSV) */
|
2017-04-22 19:25:54 +02:00
|
|
|
meta_OGL, /* Shin'en Wii/WiiU (Jett Rocket (Wii), FAST Racing NEO (WiiU)) */
|
2017-04-28 17:26:25 +02:00
|
|
|
meta_MC3, /* Paradigm games (T3 PS2, MX Rider PS2, MI: Operation Surma PS2) */
|
2017-05-13 01:55:31 +02:00
|
|
|
meta_GTD, /* Knights Contract (X360/PS3), Valhalla Knights 3 (PSV) */
|
2020-10-17 19:05:50 +02:00
|
|
|
meta_TA_AAC,
|
2019-03-11 11:58:57 +01:00
|
|
|
meta_MTA2,
|
2017-06-09 22:26:09 +02:00
|
|
|
meta_NGC_ULW, /* Burnout 1 (GC only) */
|
2019-07-28 15:11:17 +02:00
|
|
|
meta_XA_XA30,
|
|
|
|
meta_XA_04SW,
|
2017-07-15 11:49:28 +02:00
|
|
|
meta_TXTH, /* generic text header */
|
2017-07-29 11:46:53 +02:00
|
|
|
meta_SK_AUD, /* Silicon Knights .AUD (Eternal Darkness GC) */
|
2017-07-29 23:21:32 +02:00
|
|
|
meta_AHX, /* CRI AHX header */
|
2017-08-12 18:42:38 +02:00
|
|
|
meta_STM, /* Angel Studios/Rockstar San Diego Games */
|
2017-08-18 19:24:19 +02:00
|
|
|
meta_BINK, /* RAD Game Tools BINK audio/video */
|
2017-08-20 02:18:48 +02:00
|
|
|
meta_EA_SNU, /* Electronic Arts SNU (Dead Space) */
|
2017-08-28 15:14:24 +02:00
|
|
|
meta_AWC, /* Rockstar AWC (GTA5, RDR) */
|
2018-04-21 21:52:30 +02:00
|
|
|
meta_OPUS, /* Nintendo Opus [Lego City Undercover (Switch)] */
|
2020-02-22 20:40:07 +01:00
|
|
|
meta_RAW_AL,
|
2017-11-05 17:06:40 +01:00
|
|
|
meta_PC_AST, /* Dead Rising (PC) */
|
2017-11-23 22:32:31 +01:00
|
|
|
meta_NAAC, /* Namco AAC (3DS) */
|
2017-11-05 17:06:40 +01:00
|
|
|
meta_UBI_SB, /* Ubisoft banks */
|
2017-11-27 20:22:10 +01:00
|
|
|
meta_EZW, /* EZ2DJ (Arcade) EZWAV */
|
|
|
|
meta_VXN, /* Gameloft mobile games */
|
2017-12-01 17:27:49 +01:00
|
|
|
meta_EA_SNR_SNS, /* Electronic Arts SNR+SNS (Burnout Paradise) */
|
|
|
|
meta_EA_SPS, /* Electronic Arts SPS (Burnout Crash) */
|
2020-03-08 22:15:06 +01:00
|
|
|
meta_VID1,
|
2017-12-03 01:41:25 +01:00
|
|
|
meta_PC_FLX, /* Ultima IX PC */
|
2018-01-04 23:38:22 +01:00
|
|
|
meta_MOGG, /* Harmonix Music Systems MOGG Vorbis */
|
2017-01-08 14:19:32 +01:00
|
|
|
meta_OGG_VORBIS, /* Ogg Vorbis */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_OGG_SLI, /* Ogg Vorbis file w/ companion .sli for looping */
|
2018-12-01 02:47:57 +01:00
|
|
|
meta_OPUS_SLI, /* Ogg Opus file w/ companion .sli for looping */
|
2017-01-08 01:09:20 +01:00
|
|
|
meta_OGG_SFL, /* Ogg Vorbis file w/ .sfl (RIFF SFPL) for looping */
|
2018-10-04 20:43:23 +02:00
|
|
|
meta_OGG_KOVS, /* Ogg Vorbis with header and encryption (Koei Tecmo Games) */
|
|
|
|
meta_OGG_encrypted, /* Ogg Vorbis with encryption */
|
2018-01-13 17:47:40 +01:00
|
|
|
meta_KMA9, /* Koei Tecmo [Nobunaga no Yabou - Souzou (Vita)] */
|
2018-01-27 11:00:21 +01:00
|
|
|
meta_XWC, /* Starbreeze games */
|
2018-01-27 22:34:48 +01:00
|
|
|
meta_SQEX_SAB, /* Square-Enix newest middleware (sound) */
|
|
|
|
meta_SQEX_MAB, /* Square-Enix newest middleware (music) */
|
2018-03-03 18:46:12 +01:00
|
|
|
meta_WAF, /* KID WAF [Ever 17 (PC)] */
|
2018-03-24 12:13:40 +01:00
|
|
|
meta_WAVE, /* EngineBlack games [Mighty Switch Force! (3DS)] */
|
|
|
|
meta_WAVE_segmented, /* EngineBlack games, segmented [Shantae and the Pirate's Curse (PC)] */
|
2018-03-23 22:41:42 +01:00
|
|
|
meta_SMV, /* Cho Aniki Zero (PSP) */
|
2018-03-24 12:13:40 +01:00
|
|
|
meta_NXAP, /* Nex Entertainment games [Time Crisis 4 (PS3), Time Crisis Razing Storm (PS3)] */
|
2018-03-29 15:39:33 +02:00
|
|
|
meta_EA_WVE_AU00, /* Electronic Arts PS movies [Future Cop - L.A.P.D. (PS), Supercross 2000 (PS)] */
|
|
|
|
meta_EA_WVE_AD10, /* Electronic Arts PS movies [Wing Commander 3/4 (PS)] */
|
2018-03-29 17:01:46 +02:00
|
|
|
meta_STHD, /* STHD .stx [Kakuto Chojin (Xbox)] */
|
2018-03-30 21:37:11 +02:00
|
|
|
meta_MP4, /* MP4/AAC */
|
2018-03-31 13:10:57 +02:00
|
|
|
meta_PCM_SRE, /* .PCM+SRE [Viewtiful Joe (PS2)] */
|
2018-03-31 13:28:30 +02:00
|
|
|
meta_DSP_MCADPCM, /* Skyrim (Switch) */
|
2018-04-07 11:31:43 +02:00
|
|
|
meta_UBI_LYN, /* Ubisoft LyN engine [The Adventures of Tintin (multi)] */
|
2018-04-07 13:35:33 +02:00
|
|
|
meta_MSB_MSH, /* sfx companion of MIH+MIB */
|
2018-04-15 00:48:37 +02:00
|
|
|
meta_TXTP, /* generic text playlist */
|
2018-04-15 01:08:27 +02:00
|
|
|
meta_SMC_SMH, /* Wangan Midnight (System 246) */
|
2018-04-20 18:27:08 +02:00
|
|
|
meta_PPST, /* PPST [Parappa the Rapper (PSP)] */
|
2020-10-01 21:22:34 +02:00
|
|
|
meta_SPS_N1,
|
2018-04-29 20:28:27 +02:00
|
|
|
meta_UBI_BAO, /* Ubisoft BAO */
|
2018-04-29 21:04:55 +02:00
|
|
|
meta_DSP_SWITCH_AUDIO, /* Gal Gun 2 (Switch) */
|
2018-06-03 13:08:41 +02:00
|
|
|
meta_H4M, /* Hudson HVQM4 video [Resident Evil 0 (GC), Tales of Symphonia (GC)] */
|
2018-07-18 00:52:24 +02:00
|
|
|
meta_ASF, /* Argonaut ASF [Croc 2 (PC)] */
|
2018-07-27 17:11:11 +02:00
|
|
|
meta_XMD, /* Konami XMD [Silent Hill 4 (Xbox), Castlevania: Curse of Darkness (Xbox)] */
|
2018-08-02 17:15:09 +02:00
|
|
|
meta_CKS, /* Cricket Audio stream [Part Time UFO (Android), Mega Man 1-6 (Android)] */
|
|
|
|
meta_CKB, /* Cricket Audio bank [Fire Emblem Heroes (Android), Mega Man 1-6 (Android)] */
|
2018-08-02 18:22:01 +02:00
|
|
|
meta_WV6, /* Gorilla Systems PC games */
|
2018-08-13 23:03:39 +02:00
|
|
|
meta_WAVEBATCH, /* Firebrand Games */
|
2018-08-14 00:28:15 +02:00
|
|
|
meta_HD3_BD3, /* Sony PS3 bank */
|
2018-08-15 17:34:17 +02:00
|
|
|
meta_BNK_SONY, /* Sony Scream Tool bank */
|
2018-08-19 16:42:39 +02:00
|
|
|
meta_SCD_SSCF, /* Square Enix SCD old version */
|
2018-08-28 18:47:56 +02:00
|
|
|
meta_DSP_VAG, /* Penny-Punching Princess (Switch) sfx */
|
|
|
|
meta_DSP_ITL, /* Charinko Hero (GC) */
|
|
|
|
meta_A2M, /* Scooby-Doo! Unmasked (PS2) */
|
|
|
|
meta_AHV, /* Headhunter (PS2) */
|
|
|
|
meta_MSV, /* Fight Club (PS2) */
|
2019-01-26 17:04:43 +01:00
|
|
|
meta_SDF,
|
2018-08-28 18:47:56 +02:00
|
|
|
meta_SVG, /* Hunter - The Reckoning - Wayward (PS2) */
|
|
|
|
meta_VIS, /* AirForce Delta Strike (PS2) */
|
|
|
|
meta_VAI, /* Ratatouille (GC) */
|
|
|
|
meta_AIF_ASOBO, /* Ratatouille (PC) */
|
|
|
|
meta_AO, /* Cloudphobia (PC) */
|
|
|
|
meta_APC, /* MegaRace 3 (PC) */
|
|
|
|
meta_WV2, /* Slave Zero (PC) */
|
|
|
|
meta_XAU_KONAMI, /* Yu-Gi-Oh - The Dawn of Destiny (Xbox) */
|
2018-09-06 17:45:34 +02:00
|
|
|
meta_DERF, /* Stupid Invaders (PC) */
|
2020-05-24 16:32:14 +02:00
|
|
|
meta_SADF,
|
2018-09-09 15:29:34 +02:00
|
|
|
meta_UTK,
|
2018-09-10 02:24:59 +02:00
|
|
|
meta_NXA,
|
2018-09-22 17:45:02 +02:00
|
|
|
meta_ADPCM_CAPCOM,
|
2018-09-23 04:26:11 +02:00
|
|
|
meta_UE4OPUS,
|
2018-10-07 23:27:31 +02:00
|
|
|
meta_XWMA,
|
2018-10-10 00:49:04 +02:00
|
|
|
meta_VA3, /* DDR Supernova 2 AC */
|
2018-10-13 21:01:58 +02:00
|
|
|
meta_XOPUS,
|
2018-12-22 20:09:01 +01:00
|
|
|
meta_VS_SQUARE,
|
2018-11-09 21:23:31 +01:00
|
|
|
meta_NWAV,
|
2018-11-09 22:57:35 +01:00
|
|
|
meta_XPCM,
|
2018-11-17 17:52:07 +01:00
|
|
|
meta_MSF_TAMASOFT,
|
2018-12-01 14:01:52 +01:00
|
|
|
meta_XPS_DAT,
|
2018-12-08 00:10:44 +01:00
|
|
|
meta_ZSND,
|
2019-08-03 12:22:09 +02:00
|
|
|
meta_DSP_ADPY,
|
|
|
|
meta_DSP_ADPX,
|
2018-12-23 13:38:18 +01:00
|
|
|
meta_OGG_OPUS,
|
|
|
|
meta_IMC,
|
2019-01-12 02:26:38 +01:00
|
|
|
meta_GIN,
|
2019-02-10 01:36:05 +01:00
|
|
|
meta_DSF,
|
|
|
|
meta_208,
|
2019-02-17 23:17:14 +01:00
|
|
|
meta_DSP_DS2,
|
2019-02-24 11:34:09 +01:00
|
|
|
meta_MUS_VC,
|
2019-03-09 23:27:28 +01:00
|
|
|
meta_STRM_ABYLIGHT,
|
2019-03-12 00:41:20 +01:00
|
|
|
meta_MSF_KONAMI,
|
|
|
|
meta_XWMA_KONAMI,
|
2019-03-16 00:10:28 +01:00
|
|
|
meta_9TAV,
|
2019-06-26 08:26:44 +02:00
|
|
|
meta_BWAV,
|
2019-07-12 12:14:39 +02:00
|
|
|
meta_RAD,
|
2019-07-21 15:08:39 +02:00
|
|
|
meta_SMACKER,
|
2019-08-02 21:11:55 +02:00
|
|
|
meta_MZRT,
|
2019-08-04 11:57:48 +02:00
|
|
|
meta_XAVS,
|
2019-08-11 19:38:40 +02:00
|
|
|
meta_PSF,
|
2019-08-12 20:05:58 +02:00
|
|
|
meta_DSP_ITL_i,
|
2019-08-15 16:25:52 +02:00
|
|
|
meta_IMA,
|
2019-09-08 15:07:48 +02:00
|
|
|
meta_XMV_VALVE,
|
2019-09-08 20:24:47 +02:00
|
|
|
meta_UBI_HX,
|
2019-09-08 21:12:13 +02:00
|
|
|
meta_BMP_KONAMI,
|
2019-11-03 22:56:37 +01:00
|
|
|
meta_ISB,
|
2019-11-10 22:17:21 +01:00
|
|
|
meta_XSSB,
|
2019-12-15 18:21:31 +01:00
|
|
|
meta_XMA_UE3,
|
2020-01-07 18:44:17 +01:00
|
|
|
meta_FWSE,
|
2019-12-27 01:33:37 +01:00
|
|
|
meta_FDA,
|
2020-01-11 12:33:27 +01:00
|
|
|
meta_TGC,
|
2020-01-24 20:10:29 +01:00
|
|
|
meta_KWB,
|
2020-02-03 00:23:07 +01:00
|
|
|
meta_LRMD,
|
2020-04-04 18:37:53 +02:00
|
|
|
meta_WWISE_FX,
|
2020-04-15 05:42:55 +02:00
|
|
|
meta_DIVA,
|
2020-05-01 09:15:01 +02:00
|
|
|
meta_IMUSE,
|
2020-05-23 23:12:45 +02:00
|
|
|
meta_KTSR,
|
2020-05-29 18:28:32 +02:00
|
|
|
meta_KAT,
|
2020-06-06 16:15:06 +02:00
|
|
|
meta_PCM_SUCCESS,
|
2020-07-16 22:51:58 +02:00
|
|
|
meta_ADP_KONAMI,
|
2020-09-25 16:58:59 +02:00
|
|
|
meta_SDRH,
|
2020-10-11 00:01:11 +02:00
|
|
|
meta_WADY,
|
2020-10-11 01:10:02 +02:00
|
|
|
meta_DSP_SQEX,
|
2020-11-09 20:40:24 +01:00
|
|
|
meta_DSP_WIIVOICE,
|
2020-12-09 17:29:09 +01:00
|
|
|
meta_SBK,
|
2020-12-19 14:52:04 +01:00
|
|
|
meta_DSP_WIIADPCM,
|
2020-12-19 16:53:15 +01:00
|
|
|
meta_DSP_CWAC,
|
2021-01-23 15:50:32 +01:00
|
|
|
meta_COMPRESSWAVE,
|
2021-01-24 20:17:07 +01:00
|
|
|
meta_KTAC,
|
2021-01-24 21:02:27 +01:00
|
|
|
meta_MJB_MJH,
|
2008-01-31 07:04:26 +01:00
|
|
|
} meta_t;
|
|
|
|
|
2019-03-02 15:57:41 +01:00
|
|
|
/* standard WAVEFORMATEXTENSIBLE speaker positions */
|
|
|
|
typedef enum {
|
|
|
|
speaker_FL = (1 << 0), /* front left */
|
|
|
|
speaker_FR = (1 << 1), /* front right */
|
|
|
|
speaker_FC = (1 << 2), /* front center */
|
|
|
|
speaker_LFE = (1 << 3), /* low frequency effects */
|
|
|
|
speaker_BL = (1 << 4), /* back left */
|
|
|
|
speaker_BR = (1 << 5), /* back right */
|
|
|
|
speaker_FLC = (1 << 6), /* front left center */
|
|
|
|
speaker_FRC = (1 << 7), /* front right center */
|
|
|
|
speaker_BC = (1 << 8), /* back center */
|
|
|
|
speaker_SL = (1 << 9), /* side left */
|
|
|
|
speaker_SR = (1 << 10), /* side right */
|
|
|
|
|
|
|
|
speaker_TC = (1 << 11), /* top center*/
|
|
|
|
speaker_TFL = (1 << 12), /* top front left */
|
|
|
|
speaker_TFC = (1 << 13), /* top front center */
|
|
|
|
speaker_TFR = (1 << 14), /* top front right */
|
|
|
|
speaker_TBL = (1 << 15), /* top back left */
|
|
|
|
speaker_TBC = (1 << 16), /* top back center */
|
|
|
|
speaker_TBR = (1 << 17), /* top back left */
|
|
|
|
|
|
|
|
} speaker_t;
|
|
|
|
|
|
|
|
/* typical mappings that metas may use to set channel_layout (but plugin must actually use it)
|
2020-11-22 19:00:01 +01:00
|
|
|
* (in order, so 3ch file could be mapped to FL FR FC or FL FR LFE but not LFE FL FR)
|
|
|
|
* not too sure about names but no clear standards */
|
2019-03-02 15:57:41 +01:00
|
|
|
typedef enum {
|
|
|
|
mapping_MONO = speaker_FC,
|
|
|
|
mapping_STEREO = speaker_FL | speaker_FR,
|
|
|
|
mapping_2POINT1 = speaker_FL | speaker_FR | speaker_LFE,
|
2020-11-22 19:00:01 +01:00
|
|
|
mapping_2POINT1_xiph = speaker_FL | speaker_FR | speaker_FC, /* aka 3STEREO? */
|
2019-03-02 15:57:41 +01:00
|
|
|
mapping_QUAD = speaker_FL | speaker_FR | speaker_BL | speaker_BR,
|
|
|
|
mapping_QUAD_surround = speaker_FL | speaker_FR | speaker_FC | speaker_BC,
|
2020-11-22 19:00:01 +01:00
|
|
|
mapping_QUAD_side = speaker_FL | speaker_FR | speaker_SL | speaker_SR,
|
2019-03-02 15:57:41 +01:00
|
|
|
mapping_5POINT0 = speaker_FL | speaker_FR | speaker_LFE | speaker_BL | speaker_BR,
|
|
|
|
mapping_5POINT0_xiph = speaker_FL | speaker_FR | speaker_FC | speaker_BL | speaker_BR,
|
2020-11-22 19:00:01 +01:00
|
|
|
mapping_5POINT0_surround = speaker_FL | speaker_FR | speaker_FC | speaker_SL | speaker_SR,
|
2019-03-02 15:57:41 +01:00
|
|
|
mapping_5POINT1 = speaker_FL | speaker_FR | speaker_FC | speaker_LFE | speaker_BL | speaker_BR,
|
|
|
|
mapping_5POINT1_surround = speaker_FL | speaker_FR | speaker_FC | speaker_LFE | speaker_SL | speaker_SR,
|
|
|
|
mapping_7POINT0 = speaker_FL | speaker_FR | speaker_FC | speaker_LFE | speaker_BC | speaker_FLC | speaker_FRC,
|
|
|
|
mapping_7POINT1 = speaker_FL | speaker_FR | speaker_FC | speaker_LFE | speaker_BL | speaker_BR | speaker_FLC | speaker_FRC,
|
|
|
|
mapping_7POINT1_surround = speaker_FL | speaker_FR | speaker_FC | speaker_LFE | speaker_BL | speaker_BR | speaker_SL | speaker_SR,
|
|
|
|
} mapping_t;
|
|
|
|
|
2020-06-21 00:33:21 +02:00
|
|
|
typedef struct {
|
2020-07-26 11:19:52 +02:00
|
|
|
int config_set; /* some of the mods below are set */
|
|
|
|
|
2020-07-21 19:22:17 +02:00
|
|
|
/* modifiers */
|
2020-06-21 00:33:21 +02:00
|
|
|
int play_forever;
|
2020-07-21 19:22:17 +02:00
|
|
|
int ignore_loop;
|
|
|
|
int force_loop;
|
|
|
|
int really_force_loop;
|
|
|
|
int ignore_fade;
|
|
|
|
|
|
|
|
/* processing */
|
2020-07-22 23:29:38 +02:00
|
|
|
double loop_count;
|
2020-07-21 19:22:17 +02:00
|
|
|
int32_t pad_begin;
|
|
|
|
int32_t trim_begin;
|
2020-07-23 21:10:55 +02:00
|
|
|
int32_t body_time;
|
2020-07-21 19:22:17 +02:00
|
|
|
int32_t trim_end;
|
|
|
|
double fade_delay; /* not in samples for backwards compatibility */
|
2020-06-21 00:33:21 +02:00
|
|
|
double fade_time;
|
2020-07-21 19:22:17 +02:00
|
|
|
int32_t pad_end;
|
|
|
|
|
2020-07-22 23:29:38 +02:00
|
|
|
double pad_begin_s;
|
|
|
|
double trim_begin_s;
|
2020-07-23 21:10:55 +02:00
|
|
|
double body_time_s;
|
2020-07-22 23:29:38 +02:00
|
|
|
double trim_end_s;
|
|
|
|
//double fade_delay_s;
|
|
|
|
//double fade_time_s;
|
|
|
|
double pad_end_s;
|
|
|
|
|
2020-07-21 19:22:17 +02:00
|
|
|
/* internal flags */
|
|
|
|
int pad_begin_set;
|
|
|
|
int trim_begin_set;
|
2020-07-23 21:10:55 +02:00
|
|
|
int body_time_set;
|
2020-07-21 19:22:17 +02:00
|
|
|
int loop_count_set;
|
|
|
|
int trim_end_set;
|
2020-06-21 00:33:21 +02:00
|
|
|
int fade_delay_set;
|
2020-07-21 19:22:17 +02:00
|
|
|
int fade_time_set;
|
|
|
|
int pad_end_set;
|
|
|
|
|
2020-11-02 01:07:39 +01:00
|
|
|
/* for lack of a better place... */
|
|
|
|
int is_txtp;
|
|
|
|
int is_mini_txtp;
|
2020-07-22 23:29:38 +02:00
|
|
|
|
2020-06-21 00:33:21 +02:00
|
|
|
} play_config_t;
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2020-07-17 22:35:32 +02:00
|
|
|
|
2020-07-21 19:22:17 +02:00
|
|
|
typedef struct {
|
|
|
|
int input_channels;
|
|
|
|
int output_channels;
|
|
|
|
|
2020-07-26 20:15:13 +02:00
|
|
|
int32_t pad_begin_duration;
|
2020-07-22 23:29:38 +02:00
|
|
|
int32_t pad_begin_left;
|
2020-07-26 20:15:13 +02:00
|
|
|
int32_t trim_begin_duration;
|
2020-07-22 23:29:38 +02:00
|
|
|
int32_t trim_begin_left;
|
2020-07-26 20:15:13 +02:00
|
|
|
int32_t body_duration;
|
2020-07-21 19:22:17 +02:00
|
|
|
int32_t fade_duration;
|
2020-07-22 23:29:38 +02:00
|
|
|
int32_t fade_left;
|
2020-07-26 20:15:13 +02:00
|
|
|
int32_t fade_start;
|
|
|
|
int32_t pad_end_duration;
|
2020-07-29 19:34:55 +02:00
|
|
|
//int32_t pad_end_left;
|
2020-07-26 20:15:13 +02:00
|
|
|
int32_t pad_end_start;
|
2020-07-21 19:22:17 +02:00
|
|
|
|
|
|
|
int32_t play_duration; /* total samples that the stream lasts (after applying all config) */
|
|
|
|
int32_t play_position; /* absolute sample where stream is */
|
2020-11-02 01:07:39 +01:00
|
|
|
|
2020-07-21 19:22:17 +02:00
|
|
|
} play_state_t;
|
|
|
|
|
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
/* info for a single vgmstream channel */
|
2008-01-31 07:04:26 +01:00
|
|
|
typedef struct {
|
2020-07-17 22:35:32 +02:00
|
|
|
STREAMFILE* streamfile; /* file used by this channel */
|
2008-01-31 07:04:26 +01:00
|
|
|
off_t channel_start_offset; /* where data for this channel begins */
|
2019-02-15 22:28:20 +01:00
|
|
|
off_t offset; /* current location in the file */
|
2008-01-31 07:04:26 +01:00
|
|
|
|
2008-07-04 02:06:51 +02:00
|
|
|
off_t frame_header_offset; /* offset of the current frame header (for WS) */
|
|
|
|
int samples_left_in_frame; /* for WS */
|
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
/* format specific */
|
|
|
|
|
|
|
|
/* adpcm */
|
2020-05-01 16:04:23 +02:00
|
|
|
int16_t adpcm_coef[16]; /* formats with decode coefficients built in (DSP, some ADX) */
|
|
|
|
int32_t adpcm_coef_3by32[0x60]; /* Level-5 0x555 */
|
|
|
|
int16_t vadpcm_coefs[8*2*8]; /* VADPCM: max 8 groups * max 2 order * fixed 8 subframe coefs */
|
2008-01-31 07:04:26 +01:00
|
|
|
union {
|
2020-05-01 16:04:23 +02:00
|
|
|
int16_t adpcm_history1_16; /* previous sample */
|
2008-01-31 07:04:26 +01:00
|
|
|
int32_t adpcm_history1_32;
|
|
|
|
};
|
|
|
|
union {
|
2020-05-01 16:04:23 +02:00
|
|
|
int16_t adpcm_history2_16; /* previous previous sample */
|
2008-01-31 07:04:26 +01:00
|
|
|
int32_t adpcm_history2_32;
|
|
|
|
};
|
2009-01-04 16:36:06 +01:00
|
|
|
union {
|
|
|
|
int16_t adpcm_history3_16;
|
|
|
|
int32_t adpcm_history3_32;
|
|
|
|
};
|
2016-12-21 20:44:16 +01:00
|
|
|
union {
|
|
|
|
int16_t adpcm_history4_16;
|
|
|
|
int32_t adpcm_history4_32;
|
|
|
|
};
|
2008-02-05 10:21:20 +01:00
|
|
|
|
2020-07-17 22:35:32 +02:00
|
|
|
//double adpcm_history1_double;
|
|
|
|
//double adpcm_history2_double;
|
2009-03-05 17:08:23 +01:00
|
|
|
|
2020-05-01 16:04:23 +02:00
|
|
|
int adpcm_step_index; /* for IMA */
|
|
|
|
int adpcm_scale; /* for MS ADPCM */
|
2008-02-14 23:10:08 +01:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
/* state for G.721 decoder, sort of big but we might as well keep it around */
|
|
|
|
struct g72x_state g72x_state;
|
2008-04-02 18:11:53 +02:00
|
|
|
|
2008-12-24 08:19:15 +01:00
|
|
|
/* ADX encryption */
|
|
|
|
int adx_channels;
|
|
|
|
uint16_t adx_xor;
|
|
|
|
uint16_t adx_mult;
|
|
|
|
uint16_t adx_add;
|
2009-01-10 01:07:12 +01:00
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
} VGMSTREAMCHANNEL;
|
|
|
|
|
2020-07-17 22:35:32 +02:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
/* main vgmstream info */
|
2008-01-31 07:04:26 +01:00
|
|
|
typedef struct {
|
2019-02-15 22:28:20 +01:00
|
|
|
/* basic config */
|
2018-09-07 19:34:31 +02:00
|
|
|
int32_t num_samples; /* the actual max number of samples */
|
|
|
|
int32_t sample_rate; /* sample rate in Hz */
|
|
|
|
int channels; /* number of channels */
|
|
|
|
coding_t coding_type; /* type of encoding */
|
|
|
|
layout_t layout_type; /* type of layout */
|
|
|
|
meta_t meta_type; /* type of metadata */
|
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* loopin config */
|
2018-09-07 19:34:31 +02:00
|
|
|
int loop_flag; /* is this stream looped? */
|
|
|
|
int32_t loop_start_sample; /* first sample of the loop (included in the loop) */
|
|
|
|
int32_t loop_end_sample; /* last sample of the loop (not included in the loop) */
|
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* layouts/block config */
|
2018-09-07 19:34:31 +02:00
|
|
|
size_t interleave_block_size; /* interleave, or block/frame size (depending on the codec) */
|
2019-08-12 19:23:49 +02:00
|
|
|
size_t interleave_first_block_size; /* different interleave for first block */
|
|
|
|
size_t interleave_first_skip; /* data skipped before interleave first (needed to skip other channels) */
|
2018-09-07 19:34:31 +02:00
|
|
|
size_t interleave_last_block_size; /* smaller interleave for last block */
|
2019-10-20 01:24:59 +02:00
|
|
|
size_t frame_size; /* for codecs with configurable size */
|
2017-08-12 11:27:10 +02:00
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* subsong config */
|
2018-09-07 19:34:31 +02:00
|
|
|
int num_streams; /* for multi-stream formats (0=not set/one stream, 1=one stream) */
|
|
|
|
int stream_index; /* selected subsong (also 1-based) */
|
|
|
|
size_t stream_size; /* info to properly calculate bitrate in case of subsongs */
|
2017-11-16 19:47:42 +01:00
|
|
|
char stream_name[STREAM_NAME_SIZE]; /* name of the current stream (info), if the file stores it and it's filled */
|
2008-01-31 07:04:26 +01:00
|
|
|
|
2019-03-02 15:57:41 +01:00
|
|
|
/* mapping config (info for plugins) */
|
|
|
|
uint32_t channel_layout; /* order: FL FR FC LFE BL BR FLC FRC BC SL SR etc (WAVEFORMATEX flags where FL=lowest bit set) */
|
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* other config */
|
2018-09-07 19:34:31 +02:00
|
|
|
int allow_dual_stereo; /* search for dual stereo (file_L.ext + file_R.ext = single stereo file) */
|
2019-03-09 20:50:58 +01:00
|
|
|
|
2020-07-17 22:35:32 +02:00
|
|
|
|
2017-11-26 01:25:27 +01:00
|
|
|
/* layout/block state */
|
2017-12-08 01:20:09 +01:00
|
|
|
size_t full_block_size; /* actual data size of an entire block (ie. may be fixed, include padding/headers, etc) */
|
2020-07-17 22:35:32 +02:00
|
|
|
int32_t current_sample; /* sample point within the file (for loop detection) */
|
2018-08-25 20:46:54 +02:00
|
|
|
int32_t samples_into_block; /* number of samples into the current block/interleave/segment/etc */
|
2008-01-31 07:04:26 +01:00
|
|
|
off_t current_block_offset; /* start of this block (offset of block header) */
|
2017-07-01 23:02:24 +02:00
|
|
|
size_t current_block_size; /* size in usable bytes of the block we're in now (used to calculate num_samples per block) */
|
2020-07-17 22:35:32 +02:00
|
|
|
int32_t current_block_samples; /* size in samples of the block we're in now (used over current_block_size if possible) */
|
2008-01-31 07:04:26 +01:00
|
|
|
off_t next_block_offset; /* offset of header of the next block */
|
2020-07-17 22:35:32 +02:00
|
|
|
|
|
|
|
/* loop state (saved when loop is hit to restore later) */
|
|
|
|
int32_t loop_current_sample; /* saved from current_sample (same as loop_start_sample, but more state-like) */
|
2017-01-08 01:09:20 +01:00
|
|
|
int32_t loop_samples_into_block;/* saved from samples_into_block */
|
2008-01-31 07:04:26 +01:00
|
|
|
off_t loop_block_offset; /* saved from current_block_offset */
|
|
|
|
size_t loop_block_size; /* saved from current_block_size */
|
2020-07-17 22:35:32 +02:00
|
|
|
int32_t loop_block_samples; /* saved from current_block_samples */
|
2008-01-31 07:04:26 +01:00
|
|
|
off_t loop_next_block_offset; /* saved from next_block_offset */
|
2020-07-17 22:35:32 +02:00
|
|
|
int hit_loop; /* save config when loop is hit, but first time only */
|
2008-01-31 07:04:26 +01:00
|
|
|
|
2017-05-18 19:55:00 +02:00
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* decoder config/state */
|
2017-04-11 19:59:29 +02:00
|
|
|
int codec_endian; /* little/big endian marker; name is left vague but usually means big endian */
|
2019-02-15 22:28:20 +01:00
|
|
|
int codec_config; /* flags for codecs or layouts with minor variations; meaning is up to them */
|
2017-01-08 01:09:20 +01:00
|
|
|
int32_t ws_output_size; /* WS ADPCM: output bytes for this block */
|
2008-07-03 23:21:01 +02:00
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
|
|
|
|
/* main state */
|
2020-07-16 21:43:01 +02:00
|
|
|
VGMSTREAMCHANNEL* ch; /* array of channels */
|
|
|
|
VGMSTREAMCHANNEL* start_ch; /* shallow copy of channels as they were at the beginning of the stream (for resets) */
|
|
|
|
VGMSTREAMCHANNEL* loop_ch; /* shallow copy of channels as they were at the loop point (for loops) */
|
2019-02-15 22:28:20 +01:00
|
|
|
void* start_vgmstream; /* shallow copy of the VGMSTREAM as it was at the beginning of the stream (for resets) */
|
2008-12-12 00:16:09 +01:00
|
|
|
|
2020-07-16 21:43:01 +02:00
|
|
|
void* mixing_data; /* state for mixing effects */
|
2019-03-09 20:50:58 +01:00
|
|
|
|
|
|
|
/* Optional data the codec needs for the whole stream. This is for codecs too
|
2019-02-15 22:28:20 +01:00
|
|
|
* different from vgmstream's structure to be reasonably shoehorned.
|
2008-06-15 06:01:03 +02:00
|
|
|
* Note also that support must be added for resetting, looping and
|
|
|
|
* closing for every codec that uses this, as it will not be handled. */
|
2020-07-16 21:43:01 +02:00
|
|
|
void* codec_data;
|
2018-08-23 18:00:34 +02:00
|
|
|
/* Same, for special layouts. layout_data + codec_data may exist at the same time. */
|
2020-07-16 21:43:01 +02:00
|
|
|
void* layout_data;
|
2019-03-09 20:50:58 +01:00
|
|
|
|
2020-07-21 19:22:17 +02:00
|
|
|
|
|
|
|
/* play config/state */
|
2020-07-26 11:19:52 +02:00
|
|
|
int config_enabled; /* config can be used */
|
2020-07-21 19:22:17 +02:00
|
|
|
play_config_t config; /* player config (applied over decoding) */
|
|
|
|
play_state_t pstate; /* player state (applied over decoding) */
|
|
|
|
int loop_count; /* counter of complete loops (1=looped once) */
|
|
|
|
int loop_target; /* max loops before continuing with the stream end (loops forever if not set) */
|
2020-08-03 23:15:59 +02:00
|
|
|
sample_t* tmpbuf; /* garbage buffer used for seeking/trimming */
|
|
|
|
size_t tmpbuf_size; /* for all channels (samples = tmpbuf_size / channels) */
|
2020-07-21 19:22:17 +02:00
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
} VGMSTREAM;
|
|
|
|
|
2008-06-15 06:01:03 +02:00
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* for files made of "continuous" segments, one per section of a song (using a complete sub-VGMSTREAM) */
|
2009-01-03 12:08:44 +01:00
|
|
|
typedef struct {
|
|
|
|
int segment_count;
|
2020-07-17 22:35:32 +02:00
|
|
|
VGMSTREAM** segments;
|
2009-01-03 12:08:44 +01:00
|
|
|
int current_segment;
|
2020-07-17 22:35:32 +02:00
|
|
|
sample_t* buffer;
|
2019-03-16 00:49:52 +01:00
|
|
|
int input_channels; /* internal buffer channels */
|
|
|
|
int output_channels; /* resulting channels (after mixing, if applied) */
|
2020-11-22 19:00:01 +01:00
|
|
|
int mixed_channels; /* segments have different number of channels */
|
2018-03-10 20:25:57 +01:00
|
|
|
} segmented_layout_data;
|
2009-01-03 12:08:44 +01:00
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* for files made of "parallel" layers, one per group of channels (using a complete sub-VGMSTREAM) */
|
2018-03-30 21:28:32 +02:00
|
|
|
typedef struct {
|
|
|
|
int layer_count;
|
2020-07-17 22:35:32 +02:00
|
|
|
VGMSTREAM** layers;
|
|
|
|
sample_t* buffer;
|
2019-03-16 00:49:52 +01:00
|
|
|
int input_channels; /* internal buffer channels */
|
|
|
|
int output_channels; /* resulting channels (after mixing, if applied) */
|
2020-07-26 11:19:52 +02:00
|
|
|
int external_looping; /* don't loop using per-layer loops, but layout's own looping */
|
2018-03-30 21:28:32 +02:00
|
|
|
} layered_layout_data;
|
|
|
|
|
2020-07-16 21:43:01 +02:00
|
|
|
|
2020-07-17 19:42:05 +02:00
|
|
|
|
|
|
|
/* libacm interface */
|
|
|
|
typedef struct {
|
|
|
|
STREAMFILE* streamfile;
|
|
|
|
void* handle;
|
|
|
|
void* io_config;
|
|
|
|
} acm_codec_data;
|
|
|
|
|
|
|
|
|
2016-07-17 08:02:27 +02:00
|
|
|
#ifdef VGM_USE_FFMPEG
|
|
|
|
typedef struct {
|
2017-09-24 18:40:59 +02:00
|
|
|
/*** IO internals ***/
|
2020-07-17 22:35:32 +02:00
|
|
|
STREAMFILE* streamfile;
|
2017-09-24 18:40:59 +02:00
|
|
|
|
2018-09-10 02:19:34 +02:00
|
|
|
uint64_t start; // absolute start within the streamfile
|
|
|
|
uint64_t offset; // absolute offset within the streamfile
|
|
|
|
uint64_t size; // max size within the streamfile
|
|
|
|
uint64_t logical_offset; // computed offset FFmpeg sees (including fake header)
|
|
|
|
uint64_t logical_size; // computed size FFmpeg sees (including fake header)
|
2016-07-17 08:02:27 +02:00
|
|
|
|
2017-09-24 18:40:59 +02:00
|
|
|
uint64_t header_size; // fake header (parseable by FFmpeg) prepended on reads
|
2019-10-13 18:43:13 +02:00
|
|
|
uint8_t* header_block; // fake header data (ie. RIFF)
|
2017-09-24 18:40:59 +02:00
|
|
|
|
2017-02-12 13:17:01 +01:00
|
|
|
/*** "public" API (read-only) ***/
|
2016-07-17 08:02:27 +02:00
|
|
|
// stream info
|
|
|
|
int channels;
|
|
|
|
int sampleRate;
|
|
|
|
int bitrate;
|
2016-12-10 15:53:29 +01:00
|
|
|
// extra info: 0 if unknown or not fixed
|
|
|
|
int64_t totalSamples; // estimated count (may not be accurate for some demuxers)
|
2017-02-12 13:17:01 +01:00
|
|
|
int64_t skipSamples; // number of start samples that will be skipped (encoder delay), for looping adjustments
|
2017-03-04 02:05:07 +01:00
|
|
|
int streamCount; // number of FFmpeg audio streams
|
2016-07-17 08:02:27 +02:00
|
|
|
|
2019-08-25 20:46:29 +02:00
|
|
|
/*** internal state ***/
|
|
|
|
// config
|
2019-03-30 02:15:22 +01:00
|
|
|
int channel_remap_set;
|
2019-10-13 18:43:13 +02:00
|
|
|
int channel_remap[32]; /* map of channel > new position */
|
2019-10-13 18:55:52 +02:00
|
|
|
int invert_floats_set;
|
2019-10-13 18:43:13 +02:00
|
|
|
int skip_samples_set; /* flag to know skip samples were manually added from vgmstream */
|
|
|
|
int force_seek; /* flags for special seeking in faulty formats */
|
|
|
|
int bad_init;
|
2019-03-30 02:15:22 +01:00
|
|
|
|
2016-07-17 08:02:27 +02:00
|
|
|
// FFmpeg context used for metadata
|
|
|
|
AVCodec *codec;
|
|
|
|
|
|
|
|
// FFmpeg decoder state
|
|
|
|
unsigned char *buffer;
|
|
|
|
AVIOContext *ioCtx;
|
|
|
|
int streamIndex;
|
|
|
|
AVFormatContext *formatCtx;
|
|
|
|
AVCodecContext *codecCtx;
|
2019-10-13 18:43:13 +02:00
|
|
|
AVFrame *frame; /* last decoded frame */
|
|
|
|
AVPacket *packet; /* last read data packet */
|
2017-09-24 18:40:59 +02:00
|
|
|
|
2019-10-13 18:43:13 +02:00
|
|
|
int read_packet;
|
|
|
|
int end_of_stream;
|
|
|
|
int end_of_audio;
|
|
|
|
|
|
|
|
/* sample state */
|
|
|
|
int32_t samples_discard;
|
|
|
|
int32_t samples_consumed;
|
|
|
|
int32_t samples_filled;
|
2017-09-24 18:40:59 +02:00
|
|
|
|
2016-07-17 08:02:27 +02:00
|
|
|
} ffmpeg_codec_data;
|
|
|
|
#endif
|
|
|
|
|
2013-06-14 02:42:24 +02:00
|
|
|
#ifdef VGM_USE_MP4V2
|
2012-08-30 14:35:12 +02:00
|
|
|
typedef struct {
|
2020-07-17 22:35:32 +02:00
|
|
|
STREAMFILE* streamfile;
|
2018-01-04 23:38:22 +01:00
|
|
|
uint64_t start;
|
|
|
|
uint64_t offset;
|
|
|
|
uint64_t size;
|
2012-08-30 14:35:12 +02:00
|
|
|
} mp4_streamfile;
|
|
|
|
|
2013-06-14 02:42:24 +02:00
|
|
|
#ifdef VGM_USE_FDKAAC
|
2012-08-30 14:35:12 +02:00
|
|
|
typedef struct {
|
2018-01-04 23:38:22 +01:00
|
|
|
mp4_streamfile if_file;
|
|
|
|
MP4FileHandle h_mp4file;
|
|
|
|
MP4TrackId track_id;
|
|
|
|
unsigned long sampleId, numSamples;
|
|
|
|
UINT codec_init_data_size;
|
|
|
|
HANDLE_AACDECODER h_aacdecoder;
|
|
|
|
unsigned int sample_ptr, samples_per_frame, samples_discard;
|
|
|
|
INT_PCM sample_buffer[( (6) * (2048)*4 )];
|
2012-08-30 14:35:12 +02:00
|
|
|
} mp4_aac_codec_data;
|
2013-06-14 02:42:24 +02:00
|
|
|
#endif
|
2020-07-16 21:43:01 +02:00
|
|
|
#endif //VGM_USE_MP4V2
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2020-09-28 03:07:10 +02:00
|
|
|
// VGMStream description in structure format
|
|
|
|
typedef struct {
|
|
|
|
int sample_rate;
|
|
|
|
int channels;
|
|
|
|
struct mixing_info {
|
|
|
|
int input_channels;
|
|
|
|
int output_channels;
|
|
|
|
} mixing_info;
|
|
|
|
int channel_layout;
|
|
|
|
struct loop_info {
|
|
|
|
int start;
|
|
|
|
int end;
|
|
|
|
} loop_info;
|
|
|
|
size_t num_samples;
|
|
|
|
char encoding[128];
|
|
|
|
char layout[128];
|
|
|
|
struct interleave_info {
|
|
|
|
int value;
|
|
|
|
int first_block;
|
|
|
|
int last_block;
|
|
|
|
} interleave_info;
|
|
|
|
int frame_size;
|
|
|
|
char metadata[128];
|
|
|
|
int bitrate;
|
|
|
|
struct stream_info {
|
|
|
|
int current;
|
|
|
|
int total;
|
|
|
|
char name[128];
|
|
|
|
} stream_info;
|
|
|
|
} vgmstream_info;
|
2017-12-06 16:55:41 +01:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
/* -------------------------------------------------------------------------*/
|
|
|
|
/* vgmstream "public" API */
|
|
|
|
/* -------------------------------------------------------------------------*/
|
|
|
|
|
2008-01-31 07:04:26 +01:00
|
|
|
/* do format detection, return pointer to a usable VGMSTREAM, or NULL on failure */
|
2020-07-18 00:12:44 +02:00
|
|
|
VGMSTREAM* init_vgmstream(const char* const filename);
|
2008-01-31 07:04:26 +01:00
|
|
|
|
2017-11-10 20:26:44 +01:00
|
|
|
/* init with custom IO via streamfile */
|
2020-07-17 22:35:32 +02:00
|
|
|
VGMSTREAM* init_vgmstream_from_STREAMFILE(STREAMFILE* sf);
|
2008-03-25 08:30:04 +01:00
|
|
|
|
2008-05-19 05:58:15 +02:00
|
|
|
/* reset a VGMSTREAM to start of stream */
|
2020-07-17 22:35:32 +02:00
|
|
|
void reset_vgmstream(VGMSTREAM* vgmstream);
|
2008-05-19 05:58:15 +02:00
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
/* close an open vgmstream */
|
2020-07-17 22:35:32 +02:00
|
|
|
void close_vgmstream(VGMSTREAM* vgmstream);
|
2008-01-31 07:04:26 +01:00
|
|
|
|
2008-02-05 07:21:57 +01:00
|
|
|
/* calculate the number of samples to be played based on looping parameters */
|
2020-07-17 22:35:32 +02:00
|
|
|
int32_t get_vgmstream_play_samples(double looptimes, double fadeseconds, double fadedelayseconds, VGMSTREAM* vgmstream);
|
2008-01-31 07:04:26 +01:00
|
|
|
|
2020-07-26 17:16:46 +02:00
|
|
|
/* Decode data into sample buffer. Returns < sample_count on stream end */
|
|
|
|
int render_vgmstream(sample_t* buffer, int32_t sample_count, VGMSTREAM* vgmstream);
|
2008-01-31 07:04:26 +01:00
|
|
|
|
2020-07-29 19:34:55 +02:00
|
|
|
/* Seek to sample position (next render starts from that point). Use only after config is set (vgmstream_apply_config) */
|
2020-07-26 20:15:13 +02:00
|
|
|
void seek_vgmstream(VGMSTREAM* vgmstream, int32_t seek_sample);
|
|
|
|
|
2017-12-06 15:32:52 +01:00
|
|
|
/* Write a description of the stream into array pointed by desc, which must be length bytes long.
|
|
|
|
* Will always be null-terminated if length > 0 */
|
2020-07-17 22:35:32 +02:00
|
|
|
void describe_vgmstream(VGMSTREAM* vgmstream, char* desc, int length);
|
2020-09-28 03:07:10 +02:00
|
|
|
void describe_vgmstream_info(VGMSTREAM* vgmstream, vgmstream_info* desc);
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2017-12-06 15:32:52 +01:00
|
|
|
/* Return the average bitrate in bps of all unique files contained within this stream. */
|
2020-07-17 22:35:32 +02:00
|
|
|
int get_vgmstream_average_bitrate(VGMSTREAM* vgmstream);
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2018-09-07 19:34:31 +02:00
|
|
|
/* List supported formats and return elements in the list, for plugins that need to know.
|
|
|
|
* The list disables some common formats that may conflict (.wav, .ogg, etc). */
|
2020-07-18 00:12:44 +02:00
|
|
|
const char** vgmstream_get_formats(size_t* size);
|
2017-11-10 20:26:44 +01:00
|
|
|
|
2019-09-30 00:56:29 +02:00
|
|
|
/* same, but for common-but-disabled formats in the above list. */
|
2020-07-18 00:12:44 +02:00
|
|
|
const char** vgmstream_get_common_formats(size_t* size);
|
2019-09-30 00:56:29 +02:00
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* Force enable/disable internal looping. Should be done before playing anything (or after reset),
|
2017-12-06 16:55:41 +01:00
|
|
|
* and not all codecs support arbitrary loop values ATM. */
|
|
|
|
void vgmstream_force_loop(VGMSTREAM* vgmstream, int loop_flag, int loop_start_sample, int loop_end_sample);
|
|
|
|
|
2018-09-07 19:34:31 +02:00
|
|
|
/* Set number of max loops to do, then play up to stream end (for songs with proper endings) */
|
|
|
|
void vgmstream_set_loop_target(VGMSTREAM* vgmstream, int loop_target);
|
|
|
|
|
2019-09-15 15:47:41 +02:00
|
|
|
/* Return 1 if vgmstream detects from the filename that said file can be used even if doesn't physically exist */
|
|
|
|
int vgmstream_is_virtual_filename(const char* filename);
|
|
|
|
|
2017-01-08 01:09:20 +01:00
|
|
|
/* -------------------------------------------------------------------------*/
|
|
|
|
/* vgmstream "private" API */
|
|
|
|
/* -------------------------------------------------------------------------*/
|
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* Allocate initial memory for the VGMSTREAM */
|
2020-07-26 18:36:47 +02:00
|
|
|
VGMSTREAM* allocate_vgmstream(int channel_count, int looped);
|
2017-01-08 01:09:20 +01:00
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* Prepare the VGMSTREAM's initial state once parsed and ready, but before playing. */
|
2020-07-17 22:35:32 +02:00
|
|
|
void setup_vgmstream(VGMSTREAM* vgmstream);
|
2019-02-15 22:28:20 +01:00
|
|
|
|
|
|
|
/* Open the stream for reading at offset (taking into account layouts, channels and so on).
|
|
|
|
* Returns 0 on failure */
|
2020-07-17 22:35:32 +02:00
|
|
|
int vgmstream_open_stream(VGMSTREAM* vgmstream, STREAMFILE* sf, off_t start_offset);
|
|
|
|
int vgmstream_open_stream_bf(VGMSTREAM* vgmstream, STREAMFILE* sf, off_t start_offset, int force_multibuffer);
|
2017-01-14 00:59:54 +01:00
|
|
|
|
2019-02-15 22:28:20 +01:00
|
|
|
/* Get description info */
|
2020-07-17 22:35:32 +02:00
|
|
|
void get_vgmstream_coding_description(VGMSTREAM* vgmstream, char* out, size_t out_size);
|
|
|
|
void get_vgmstream_layout_description(VGMSTREAM* vgmstream, char* out, size_t out_size);
|
|
|
|
void get_vgmstream_meta_description(VGMSTREAM* vgmstream, char* out, size_t out_size);
|
2017-11-10 20:26:44 +01:00
|
|
|
|
2020-07-26 11:19:52 +02:00
|
|
|
void setup_state_vgmstream(VGMSTREAM* vgmstream);
|
2009-08-30 04:16:54 +02:00
|
|
|
#endif
|