vgmstream - A library for playback of various streamed audio formats used in video games.
Go to file
Daniel Richard G bc45567208 Various updates to the Autotools build system:
Makefile.audacious.am:

* Add test/ subdirectory to the Autotools build

* Add version.h to EXTRA_DIST so that "make distcheck" passes

audacious/Makefile.audacious.am:

* Install Audacious plug-in into the appropriate directory

* No need to include CXXFLAGS in AM_CXXFLAGS, as the former is already
  included in the compiler invocation

configure.ac:

* Need to link to libvorbis in order for static-library builds
  (--disable-shared) to link correctly

* Only add GCC-specific compiler flags if GCC is detected

* Tightened up the GCC warning flags

* Don't set LIBS, so that different targets can link against different
  libraries

* Generate makefile for test/ subdirectory

src/Makefile.audacious.am:

* Install libvgmstream into the library directory

* Removed GCC-specific flag from AM_CFLAGS

* No need to include CFLAGS in AM_CFLAGS, as the former is already
  included in the compiler invocation

* Add libvgmstream dependencies via LIBADD instead of global LIBS var

test/Makefile.audacious.am:

* New makefile template for test/ subdirectory

unbootstrap:

* Also remove "compile" script from bootstrap
2017-12-25 22:18:55 -05:00
audacious Various updates to the Autotools build system: 2017-12-25 22:18:55 -05:00
ext_includes Updated FFmpeg. 2017-12-03 14:03:39 -08:00
ext_libs Updated FFmpeg. 2017-12-03 14:03:39 -08:00
fb2k Automate foobar2000 file type registration service. 2017-12-09 17:44:50 -08:00
src Various updates to the Autotools build system: 2017-12-25 22:18:55 -05:00
test Various updates to the Autotools build system: 2017-12-25 22:18:55 -05:00
winamp Add compiler flag to enable Winamp unicode 2017-11-10 21:01:29 +01:00
xmplay Remove/simplify formats.h and move to vgmstream.h for simpler API 2017-11-10 20:26:44 +01:00
.gitignore Rename xmp-vgmstream to xmplay 2017-05-01 17:22:36 +02:00
bootstrap Rename unix to audacious (folder and makefiles) 2017-05-01 17:08:52 +02:00
BUILD.md Update docs 2017-12-24 01:30:57 +01:00
configure.ac Various updates to the Autotools build system: 2017-12-25 22:18:55 -05:00
COPYING JSTM (.stm) from Tantei Jinguji Saburo - Kind of Blue. Includes a simple XOR obfuscation. 2010-08-28 01:43:40 +00:00
Makefile Rename readme 2017-10-14 13:43:21 +02:00
Makefile.audacious.am Various updates to the Autotools build system: 2017-12-25 22:18:55 -05:00
README.md Update docs 2017-12-24 01:30:57 +01:00
unbootstrap Various updates to the Autotools build system: 2017-12-25 22:18:55 -05:00
version.bat Move version.bat/h to root and use it for all Visual Studio modules 2017-01-15 23:09:37 +01:00
version.h Move version.bat/h to root and use it for all Visual Studio modules 2017-01-15 23:09:37 +01:00
version.mk And add a few missing things. 2016-06-28 00:28:29 -07:00
version.sh Update to build with mingw, added at3plus support to Winamp plugin, Capcom mca, WiiU btsnd, MH3U dspw 2015-01-21 19:28:43 -05:00
vgmstream_full.sln Rename xmp-vgmstream to xmplay 2017-05-01 17:22:36 +02:00
vgmstream.sln Update the VC solution file to include the test project, and set it's 2015-05-20 02:35:30 -04:00

vgmstream

This is vgmstream, a library for playing streamed (pre-recorded) audio from video games.

There are multiple end-user bits:

  • a command line decoder called "test.exe"
  • a Winamp plugin called "in_vgmstream"
  • a foobar2000 component called "foo_input_vgmstream"
  • an XMPlay plugin called "xmp-vgmstream"
  • an Audacious plugin called "libvgmstream"

Help and newest builds can be found here: https://www.hcs64.com/

Latest development is usually here: https://github.com/kode54/vgmstream/

Needed extra files (for Windows)

Support for some codecs (Ogg Vorbis, MPEG audio, etc) is done with external libraries, so you will need to have certain DLL files.

In the case of the foobar2000 component they are all bundled for convenience, or you can get them here: https://github.com/kode54/vgmstream/tree/master/ext_libs (bundled here: https://f.losno.co/vgmstream-win32-deps.zip, may not be latest).

Put libvorbis.dll, libmpg123-0.dll, libg7221_decode.dll, libg719_decode.dll, at3plusdecoder.dll, avcodec-vgmstream-58.dll, avformat-vgmstream-58.dll, avutil-vgmstream-56.dll and swresample-vgmstream-3.dll somewhere Windows can find them.

For Winamp/XMPlay/test.exe this means in the directory with the .exe, or in a system directory, or any other directory in the PATH variable.

test.exe

Usage: test.exe [-o outfile.wav] [options] infile
Options:
    -o outfile.wav: name of output .wav file, default is dump.wav
    -l loop count: loop count, default 2.0
    -f fade time: fade time (seconds), default 10.0
    -d fade delay: fade delay (seconds, default 0.0
    -i: ignore looping information and play the whole stream once
    -p: output to stdout (for piping into another program)
    -P: output to stdout even if stdout is a terminal
    -c: loop forever (continuously)
    -m: print metadata only, don't decode
    -x: decode and print adxencd command line to encode as ADX
    -g: decode and print oggenc command line to encode as OGG
    -b: decode and print batch variable commands
    -L: append a smpl chunk and create a looping wav
    -e: force end-to-end looping
    -E: force end-to-end looping even if file has real loop points
    -r outfile2.wav: output a second time after resetting
    -2 N: only output the Nth (first is 0) set of stereo channels
    -F: don't fade after N loops and play the rest of the stream
    -s N: select subtream N, if the format supports multiple streams

Typical usage would be: test -o happy.wav happy.adx to decode happy.adx to happy.wav.

in_vgmstream

Drop the in_vgmstream.dll in your Winamp plugins directory. Please follow the above instructions for installing the other files needed.

xmp-vgmstream

Drop the xmp-vgmstream.dll in your XMPlay plugins directory. Please follow the above instructions for installing the other files needed.

Note that there are minor differences compared to in_vgmstream. Since XMPlay supports Winamp plugins you may also use in_vgmstream.dll instead.

Because the XMPlay MP3 decoder incorrectly tries to play some vgmstream exts, you need to manually fix it by going to options > plugins > input > vgmstream and in the "priority filetypes" put: ahx,asf,awc,ckd,fsb,genh,msf,p3d,rak,scd,txth,xvag

foo_input_vgmstream

Every file should be installed automatically by the .fb2k-component bundle.

Audacious plugin

Needs to be manually built. Instructions can be found in the build document.

Supported codec types

Quick list of codecs vgmstream supports, including many obscure ones that are used in few games.

  • PCM 16-bit
  • PCM 8-bit (signed/unsigned)
  • PCM 32-bit float
  • u-Law/a-LAW
  • CRI ADX (standard, fixed, exponential, encrypted)
  • Nintendo DSP ADPCM a.k.a GC ADPCM
  • Nintendo DTK ADPCM
  • Nintendo AFC ADPCM
  • ITU-T G.721
  • CD-ROM XA ADPCM
  • Sony PSX ADPCM a.k.a VAG (badflags, bmdx, configurable)
  • Sony HEVAG
  • Electronic Arts EA-XA (stereo, mono, Maxis)
  • Electronic Arts EA-XAS
  • DVI/IMA ADPCM (stereo/mono + high/low nibble, 3DS, Omikron, SNDS, etc)
  • Microsoft MS IMA ADPCM (standard, Xbox, NDS, Radical, Wwise, FSB, etc)
  • Microsoft MS ADPCM
  • Westwood VBR ADPCM
  • Yamaha AICA ADPCM
  • Procyon Studio ADPCM
  • Level-5 0x555 ADPCM
  • Activision EXAKT SASSC DPCM
  • lsf ADPCM
  • Konami MTAF ADPCM
  • Konami MTA2 ADPCM
  • Paradigm MC3 ADPCM
  • SDX2 2:1 Squareroot-Delta-Exact compression DPCM
  • CBD2 2:1 Cuberoot-Delta-Exact compression DPCM
  • InterPlay ACM
  • Visual Art's NWA
  • CRI HCA
  • Electronic Arts MicroTalk a.k.a. UTK or UMT
  • Xiph Vorbis (Ogg, FSB5, Wwise, OGL, Silicon Knights)
  • MPEG MP1/2/3 (standard, AHX, XVAG, FSB, AWC, P3D, etc)
  • ITU-T G.722.1 (Polycom Siren 7)
  • ITU-T G.722.1 annex C (Polycom Siren 14)
  • ITU G.719 annex B (Polycom Siren 22)
  • Electronic Arts EALayer3
  • Electronic Arts EA-XMA
  • Sony ATRAC3, ATRAC3plus
  • Microsoft XMA1/2
  • Microsoft WMA v1, WMA v2, WMAPro
  • AAC
  • Bink
  • AC3/SPDIF
  • Xiph Opus (Ogg, Switch)
  • FLAC
  • Others

Note that vgmstream doesn't (can't) reproduce in-game music 1:1, as internal resampling, filters, volume, etc, are not replicated. Some codecs are not fully accurate compared to the games due to minor bugs, but in most cases it isn't audible.

Supported file types

As manakoAT likes to say, the extension doesn't really mean anything, but it's the most obvious way to identify files.

This list is not complete and many other files are supported.

  • PS2/PSX ADPCM:
    • .ads/.ss2
    • .ass
    • .ast
    • .bg00
    • .bmdx
    • .ccc
    • .cnk
    • .dxh
    • .enth
    • .fag
    • .filp
    • .gcm
    • .gms
    • .hgc1
    • .ikm
    • .ild
    • .ivb
    • .joe
    • .kces
    • .khv
    • .leg
    • .mcg
    • .mib, .mi4 (w/ or w/o .mih)
    • .mic
    • .mihb (merged mih+mib)
    • .msa
    • .msvp
    • .musc
    • .npsf
    • .pnb
    • .psh
    • .rkv
    • .rnd
    • .rstm
    • .rws
    • .rxw
    • .snd
    • .sfs
    • .sl3
    • .smpl (w/ bad flags)
    • .ster
    • .str+.sth
    • .str (MGAV blocked)
    • .sts
    • .svag
    • .svs
    • .tec (w/ bad flags)
    • .tk5 (w/ bad flags)
    • .vas
    • .vag
    • .vgs (w/ bad flags)
    • .vig
    • .vpk
    • .vs
    • .vsf
    • .wp2
    • .xa2
    • .xa30
    • .xwb+xwh
  • GC/Wii/3DS DSP ADPCM:
    • .aaap
    • .agsc
    • .asr
    • .bns
    • .bo2
    • .capdsp
    • .cfn
    • .ddsp
    • .dsp
      • standard, optional dual file stereo
      • RS03
      • Cstr
      • _lr.dsp
      • MPDS
    • .gca
    • .gcm
    • .gsp+.gsp
    • .hps
    • .idsp
    • .ish+.isd
    • .lps
    • .mca
    • .mpdsp
    • .mss
    • .mus (not quite right)
    • .ndp
    • .pdt
    • .sdt
    • .smp
    • .sns
    • .spt+.spd
    • .ssm
    • .stm/.dsp
    • .str
    • .str+.sth
    • .sts
    • .swd
    • .thp, .dsp
    • .tydsp
    • .vjdsp
    • .waa, .wac, .wad, .wam
    • .was
    • .wsd
    • .wsi
    • .ydsp
    • .ymf
    • .zwdsp
  • PCM:
    • .aiff (8 bit, 16 bit)
    • .asd (16 bit)
    • .baka (16 bit)
    • .bh2pcm (16 bit)
    • .dmsg (16 bit)
    • .gcsw (16 bit)
    • .gcw (16 bit)
    • .his (8 bit)
    • .int (16 bit)
    • .pcm (8 bit, 16 bit)
    • .kraw (16 bit)
    • .raw (16 bit)
    • .rwx (16 bit)
    • .sap (16 bit)
    • .snd (16 bit)
    • .sps (16 bit)
    • .str (16 bit)
    • .xss (16 bit)
    • .voi (16 bit)
    • .wb (16 bit)
    • .zsd (8 bit)
  • Xbox IMA ADPCM:
    • .matx
    • .wavm
    • .wvs
    • .xmu
    • .xvas
    • .xwav
  • Yamaha ADPCM:
    • .adpcm
    • .dcs+.dcsw
    • .str
    • .spsd
  • IMA ADPCM:
    • .bar (IMA ADPCM)
    • .pcm/dvi (DVI IMA ADPCM)
    • .hwas (IMA ADPCM)
    • .dvi/idvi (DVI IMA ADPCM)
    • .ivaud (IMA ADPCM)
    • .myspd (IMA ADPCM)
    • .strm (IMA ADPCM)
  • multi:
    • .aifc (SDX2 DPCM, DVI IMA ADPCM)
    • .asf/as4 (8/16 bit PCM, DVI IMA ADPCM)
    • .ast (GC AFC ADPCM, 16 bit PCM)
    • .aud (IMA ADPCM, WS DPCM)
    • .aus (PSX ADPCM, Xbox IMA ADPCM)
    • .brstm (GC DSP ADPCM, 8/16 bit PCM)
    • .emff (PSX APDCM, GC DSP ADPCM)
    • .fsb/wii (PSX ADPCM, GC DSP ADPCM, Xbox IMA ADPCM, MPEG audio, FSB Vorbis, MS XMA)
    • .msf (PCM, PSX ADPCM, ATRAC3, MP3)
    • .musx (PSX ADPCM, Xbox IMA ADPCM, DAT4 IMA ADPCM)
    • .nwa (16 bit PCM, NWA DPCM)
    • .p3d (Radical ADPCM, Radical MP3, XMA2)
    • .psw (PSX ADPCM, GC DSP ADPCM)
    • .rwar, .rwav (GC DSP ADPCM, 8/16 bit PCM)
    • .rws (PSX ADPCM, XBOX IMA ADPCM, GC DSP ADPCM, 16 bit PCM)
    • .rwsd (GC DSP ADPCM, 8/16 bit PCM)
    • .rsd (PSX ADPCM, 16 bit PCM, GC DSP ADPCM, Xbox IMA ADPCM, Radical ADPCM)
    • .rrds (NDS IMA ADPCM)
    • .sad (GC DSP ADPCM, NDS IMA ADPCM, Procyon Studios NDS ADPCM)
    • .sgd/sgb+sgh/sgx (PSX ADPCM, ATRAC3plus, AC3)
    • .seg (Xbox IMA ADPCM, PS2 ADPCM)
    • .sng/asf/str/eam/aud (8/16 bit PCM, EA-XA ADPCM, PSX ADPCM, GC DSP ADPCM, XBOX IMA ADPCM, MPEG audio, EALayer3)
    • .strm (NDS IMA ADPCM, 8/16 bit PCM)
    • .sb0..7 (Ubi IMA ADPCM, GC DSP ADPCM, PSX ADPCM, Xbox IMA ADPCM, ATRAC3)
    • .swav (NDS IMA ADPCM, 8/16 bit PCM)
    • .xwb (PCM, Xbox IMA ADPCM, MS ADPCM, XMA, XWMA, ATRAC3)
    • .xwb+xwh (PCM, PSX ADPCM, ATRAC3)
    • .wav/lwav (unsigned 8 bit PCM, 16 bit PCM, GC DSP ADPCM, MS IMA ADPCM, XBOX IMA ADPCM)
    • .wem [lwav/logg/xma] (PCM, Wwise Vorbis, Wwise IMA ADPCM, XMA, XWMA, GC DSP ADPCM, Wwise Opus)
  • etc:
    • .2dx9 (MS ADPCM)
    • .aax (CRI ADX ADPCM)
    • .acm (InterPlay ACM)
    • .adp (GC DTK ADPCM)
    • .adx (CRI ADX ADPCM)
    • .afc (GC AFC ADPCM)
    • .ahx (MPEG-2 Layer II)
    • .aix (CRI ADX ADPCM)
    • .at3 (Sony ATRAC3 / ATRAC3plus)
    • .aud (Silicon Knights Vorbis)
    • .baf (PSX configurable ADPCM)
    • .bgw (PSX configurable ADPCM)
    • .bnsf (G.722.1)
    • .caf (Apple IMA4 ADPCM, others)
    • .dec/de2 (MS ADPCM)
    • .hca (CRI High Compression Audio)
    • .pcm/kcey (DVI IMA ADPCM)
    • .lsf (LSF ADPCM)
    • .mc3 (Paradigm MC3 ADPCM)
    • .mp4/lmp4 (AAC)
    • .msf (PCM, PSX ADPCM, ATRAC3, MP3)
    • .mtaf (Konami ADPCM)
    • .mta2 (Konami XAS-like ADPCM)
    • .mwv (Level-5 0x555 ADPCM)
    • .ogg/logg (Ogg Vorbis)
    • .ogl (Shin'en Vorbis)
    • .rsf (CCITT G.721 ADPCM)
    • .sab (Worms 4 soundpacks)
    • .s14/sss (G.722.1)
    • .sc (Activision EXAKT SASSC DPCM)
    • .scd (MS ADPCM, MPEG Audio, 16 bit PCM)
    • .sd9 (MS ADPCM)
    • .smp (MS ADPCM)
    • .spw (PSX configurable ADPCM)
    • .stm/lstm [amts/ps2stm/stma] (16 bit PCM, DVI IMA ADPCM, GC DSP ADPCM)
    • .str (SDX2 DPCM)
    • .stx (GC AFC ADPCM)
    • .ulw (u-Law PCM)
    • .um3 (Ogg Vorbis)
    • .xa (CD-ROM XA audio)
    • .xma (MS XMA/XMA2)
  • artificial/generic headers:
    • .genh (lots)
    • .txth (lots)
  • loop assists:
    • .mus (playlist for .acm)
    • .pos (loop info for .wav: 32 bit LE loop start sample + loop end sample)
    • .sli (loop info for .ogg)
    • .sfl (loop info for .ogg)
  • other:
    • .adxkey (decryption key for .adx, in start/mult/add format)
    • .ahxkey (decryption key for .ahx, in start/mult/add format)
    • .hcakey (decryption key for .hca, in HCA Decoder format)
    • .vgmstream + .pos (FFmpeg formats + loop assist)

Enjoy! hcs