mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 06:50:20 +01:00
rename test.exe to vgmstream-cli.exe
- for consistency, plus since users may have to deal with new DLLs better do this now
This commit is contained in:
parent
540bac50e3
commit
1c6a9f1072
5
Makefile
5
Makefile
@ -12,7 +12,7 @@ DEF_CFLAGS += -DVGMSTREAM_VERSION_AUTO -DVGM_LOG_OUTPUT
|
||||
|
||||
###############################################################################
|
||||
### external defs
|
||||
# currently aimed to WIN32 builds but vgmstream_cli should work for others (or use autotools instead)
|
||||
# currently aimed to WIN32 builds but vgmstream-cli should work for others (or use autotools instead)
|
||||
export TARGET_OS = $(OS)
|
||||
|
||||
#for Win builds with vgmstream123
|
||||
@ -28,6 +28,7 @@ ifeq ($(TARGET_OS),Windows_NT)
|
||||
STRIP = strip
|
||||
WINDRES = windres
|
||||
DLLTOOL = dlltool
|
||||
#DLLTOOL = dlltool -m i386:x86-64 --as-flags --64
|
||||
|
||||
# same thing, the above should be available
|
||||
#CC = i686-w64-mingw32-gcc
|
||||
@ -225,7 +226,7 @@ ifeq ($(TARGET_OS),Windows_NT)
|
||||
ZIP_FILES = COPYING
|
||||
ZIP_FILES += README.md
|
||||
ZIP_FILES += doc/USAGE.md
|
||||
ZIP_FILES += cli/test.exe
|
||||
ZIP_FILES += cli/vgmstream-cli.exe
|
||||
ZIP_FILES += winamp/in_vgmstream.dll
|
||||
ZIP_FILES += xmplay/xmp-vgmstream.dll
|
||||
ZIP_FILES += ext_libs/*.dll
|
||||
|
@ -28,7 +28,7 @@ More documentation: https://github.com/vgmstream/vgmstream/tree/master/doc
|
||||
|
||||
## Getting vgmstream
|
||||
There are multiple end-user components:
|
||||
- [test.exe/vgmstream-cli](doc/USAGE.md#testexevgmstream-cli-command-line-decoder): A command-line decoder.
|
||||
- [vgmstream-cli](doc/USAGE.md#testexevgmstream-cli-command-line-decoder): A command-line decoder.
|
||||
- [in_vgmstream](doc/USAGE.md#in_vgmstream-winamp-plugin): A Winamp plugin.
|
||||
- [foo_input_vgmstream](doc/USAGE.md#foo_input_vgmstream-foobar2000-plugin): A foobar2000 component.
|
||||
- [xmp-vgmstream](doc/USAGE.md#xmp-vgmstream-xmplay-plugin): An XMPlay plugin.
|
||||
@ -38,7 +38,7 @@ There are multiple end-user components:
|
||||
The main library (plain *vgmstream*) is the code that handles the internal conversion, while the
|
||||
above components are what you use to get sound.
|
||||
|
||||
If you just want to convert game audio to `.wav`, easiest would be getting *test.exe/vgmstream-cli* (see
|
||||
If you just want to convert game audio to `.wav`, easiest would be getting *vgmstream-cli* (see
|
||||
below) then drag-and-drop one or more files to the executable. This should create `(file.extension).wav`,
|
||||
if the format is supported. More usable would be installing a music player like *foobar2000* (for
|
||||
Windows) or *Audacious* (for Linux) then the appropriate component, so you can listen to VGM without
|
||||
|
@ -3,15 +3,9 @@
|
||||
add_executable(vgmstream_cli
|
||||
vgmstream_cli.c)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(vgmstream_cli PROPERTIES
|
||||
PREFIX ""
|
||||
OUTPUT_NAME "test")
|
||||
else()
|
||||
set_target_properties(vgmstream_cli PROPERTIES
|
||||
PREFIX ""
|
||||
OUTPUT_NAME "vgmstream-cli")
|
||||
endif()
|
||||
set_target_properties(vgmstream_cli PROPERTIES
|
||||
PREFIX ""
|
||||
OUTPUT_NAME "vgmstream-cli")
|
||||
|
||||
# Link to the vgmstream library
|
||||
target_link_libraries(vgmstream_cli libvgmstream)
|
||||
|
@ -13,7 +13,7 @@ LDFLAGS += -L../src -lvgmstream -lm $(EXTRA_LDFLAGS)
|
||||
TARGET_EXT_LIBS =
|
||||
|
||||
ifeq ($(TARGET_OS),Windows_NT)
|
||||
OUTPUT_CLI = test.exe
|
||||
OUTPUT_CLI = vgmstream-cli.exe
|
||||
OUTPUT_123 = vgmstream123.exe
|
||||
|
||||
# -DUSE_ALLOCA
|
||||
|
@ -508,8 +508,8 @@ class App(object):
|
||||
if self.cfg.cli:
|
||||
clis.append(self.cfg.cli)
|
||||
else:
|
||||
clis.append('vgmstream_cli')
|
||||
clis.append('test.exe')
|
||||
clis.append('vgmstream-cli')
|
||||
clis.append('test.exe') #for old CLIs
|
||||
|
||||
for cli in clis:
|
||||
try:
|
||||
|
@ -26,7 +26,7 @@
|
||||
</SccLocalPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<TargetName>test</TargetName>
|
||||
<TargetName>vgmstream-cli</TargetName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
|
@ -51,7 +51,7 @@ AllowShortIfStatementsOnASingleLine: Never
|
||||
### Code quality
|
||||
There is quite a bit of code that could be improved overall, and parts can feel a bit hacked together and brittle. But given how niche the project is and how few contributors there are, priority is given to adding and improving formats.
|
||||
|
||||
For regression testing there is a simple script that compares output of a previous version of vgmstream_cli with current. Some bugs may drastically change output when fixed (for example adjusting loops or decoding) so it could be hard to automate and maintain. There isn't an automated test suite at the moment, so tests are manually done as needed.
|
||||
For regression testing there is a simple script that compares output of a previous version of vgmstream-cli with current. Some bugs may drastically change output when fixed (for example adjusting loops or decoding) so it could be hard to automate and maintain. There isn't an automated test suite at the moment, so tests are manually done as needed.
|
||||
|
||||
Code is checked for leaks from time to time using detection tools, but most of vgmstream formats are quite simple and don't need to manage memory. It's mainly useful for files using external decoders or complex segmented/layered layout combos.
|
||||
```
|
||||
@ -59,7 +59,7 @@ Code is checked for leaks from time to time using detection tools, but most of v
|
||||
make vgmstream_cli EXTRA_CFLAGS="-g" STRIP=echo
|
||||
|
||||
# find leaks
|
||||
drmemory -- vgmstream_cli -o file.ext
|
||||
drmemory -- vgmstream-cli -o file.ext
|
||||
```
|
||||
|
||||
Code is reasonably secure: some parts like IO are designed in a way should avoid segfaults, memory allocation is kept to minimum, and buffer handling is often very limited and simple making overflows unlikely. However, parts may cause division-by-zero or even infinite loops on bad data (fixed as known), no fuzz testing is done (some segfaults may remain, specially for complex codecs), and since vgmstream uses some external libraries/codecs there may be issues with old versions (updated at times).
|
||||
@ -114,7 +114,7 @@ Quick list of some audio terms used through vgmstream, applied to code. Mainly m
|
||||
vgmstream works by parsing a music stream header (*meta/*), preparing/controlling data and sample buffers (*layout/*) and decoding the compressed data into listenable PCM samples (*coding/*).
|
||||
|
||||
Very simplified it goes like this:
|
||||
- player (test.exe, plugin, etc) opens a file stream (STREAMFILE) *[plugin's main/decode]*
|
||||
- player (CLI, plugin, etc) opens a file stream (STREAMFILE) *[plugin's main/decode]*
|
||||
- init tries all parsers (metas) until one works *[init_vgmstream]*
|
||||
- parser reads header (channels, sample rate, loop points) and set ups the VGMSTREAM struct, if the format is correct *[init_vgmstream_(format-name)]*
|
||||
- player finds total_samples to play, based on the number of loops and other settings *[get_vgmstream_play_samples]*
|
||||
|
48
doc/USAGE.md
48
doc/USAGE.md
@ -13,17 +13,17 @@ Put the following files somewhere Windows can find them:
|
||||
- `libvorbis.dll`
|
||||
- `libmpg123-0.dll`
|
||||
- `libg719_decode.dll`
|
||||
- `avcodec-vgmstream-58.dll`
|
||||
- `avformat-vgmstream-58.dll`
|
||||
- `avutil-vgmstream-56.dll`
|
||||
- `swresample-vgmstream-3.dll`
|
||||
- `avcodec-vgmstream-59.dll`
|
||||
- `avformat-vgmstream-59.dll`
|
||||
- `avutil-vgmstream-57.dll`
|
||||
- `swresample-vgmstream-4.dll`
|
||||
- `libatrac9.dll`
|
||||
- `libcelt-0061.dll`
|
||||
- `libcelt-0110.dll`
|
||||
- `libspeex.dll`
|
||||
|
||||
For command line (`test.exe`) and XMPlay this means in the directory with the main `.exe`,
|
||||
or possibly a directory in the PATH variable.
|
||||
For command line (`vgmstream-cli.exe`) and XMPlay this means in the directory with the main
|
||||
`.exe`, or possibly a directory in the PATH variable.
|
||||
|
||||
For Winamp, the above `.dll` also go near main `winamp.exe`, but note that `in_vgmstream.dll`
|
||||
plugin itself goes in `Plugins`.
|
||||
@ -34,25 +34,25 @@ automatically, though not all may enabled at the moment due to build scripts iss
|
||||
|
||||
## Components
|
||||
|
||||
### test.exe/vgmstream-cli (command line decoder)
|
||||
*Windows*: unzip `test.exe` and follow the above instructions for installing needed extra files.
|
||||
`test.exe` is used for historical reasons, but you can call it `vgmstream-cli.exe`, anyway.
|
||||
### vgmstream-cli (command line decoder)
|
||||
*Windows*: unzip `vgmstream-cli` and follow the above instructions for installing needed extra files.
|
||||
This tool was called `test.exe` before for historical reasons (rename back if needed).
|
||||
|
||||
*Others*: build instructions can be found in the [BUILD.md](BUILD.md) document (can be compiled
|
||||
with CMake/Make/autotools).
|
||||
|
||||
Converts playable files to `.wav`. Typical usage would be:
|
||||
- `test.exe -o happy.wav happy.adx` to decode `happy.adx` to `happy.wav`.
|
||||
- `vgmstream-cli -o happy.wav happy.adx` to decode `happy.adx` to `happy.wav`.
|
||||
|
||||
If command-line isn't your thing you can simply drag and drop one or multiple
|
||||
files to the executable to decode them as `(filename.ext).wav`.
|
||||
|
||||
There are multiple options that alter how the file is converted, for example:
|
||||
- `test.exe -m file.adx`: print info but don't decode
|
||||
- `test.exe -i -o file_noloop.wav file.hca`: convert without looping
|
||||
- `test.exe -s 2 -F file.fsb`: write 2nd subsong + ending after 2.0 loops
|
||||
- `test.exe -l 3.0 -f 5.0 -d 3.0 file.wem`: 3 loops, 3s delay, 5s fade
|
||||
- `test.exe -o bgm_?f.wav file1.adx file2.adx`: convert multiple files to `bgm_(name).wav`
|
||||
- `vgmstream-cli -m file.adx`: print info but don't decode
|
||||
- `vgmstream-cli -i -o file_noloop.wav file.hca`: convert without looping
|
||||
- `vgmstream-cli -s 2 -F file.fsb`: write 2nd subsong + ending after 2.0 loops
|
||||
- `vgmstream-cli -l 3.0 -f 5.0 -d 3.0 file.wem`: 3 loops, 3s delay, 5s fade
|
||||
- `vgmstream-cli -o bgm_?f.wav file1.adx file2.adx`: convert multiple files to `bgm_(name).wav`
|
||||
|
||||
Available commands are printed when run with no flags. Note that you can also
|
||||
achieve similar results for other plugins using TXTP, described later.
|
||||
@ -63,7 +63,7 @@ Output filename in `-o` may use wildcards:
|
||||
- `?n`: internal stream name, or input filename if format doesn't have name
|
||||
- `?f`: input filename
|
||||
|
||||
For example `test.exe -s 2 -o ?04s_?n.wav file.fsb` could generate `0002_song1.wav`.
|
||||
For example `vgmstream-cli -s 2 -o ?04s_?n.wav file.fsb` could generate `0002_song1.wav`.
|
||||
Default output filename is `?f.wav`, or `?f#?s.wav` if you set subsongs (`-s/-S`).
|
||||
|
||||
|
||||
@ -221,17 +221,17 @@ is able to contain them. Easiest to use would be the *foobar/winamp/Audacious*
|
||||
plugins, that are able to "unpack" those subsongs automatically into the playlist.
|
||||
|
||||
With CLI tools, you can select a subsong using the `-s` flag followed by a number,
|
||||
for example: `text.exe -s 5 file.bank` or `vgmstream123 -s 5 file.bank`.
|
||||
for example: `vgmstream-cli -s 5 file.bank` or `vgmstream123 -s 5 file.bank`.
|
||||
|
||||
Using *vgmstream-cli* you can convert multiple subsongs at once using the `-S` flag.
|
||||
**WARNING, MAY TAKE A LOT OF SPACE!** Some files have been observed to contain +20000
|
||||
subsongs, so don't use this lightly. Remember to set an output name (`-o`) with subsong
|
||||
wildcards (or leave it alone for the defaults).
|
||||
- `test.exe -s 1 -S 100 file.bank`: writes from subsong 1 to subsong 100
|
||||
- `test.exe -s 101 -S 0 file.bank`: writes from subsong 101 to max subsong (automatically changes 0 to max)
|
||||
- `test.exe -S 0 file.bank`: writes from subsong 1 to max subsong
|
||||
- `test.exe -s 1 -S 5 -o bgm.wav file.bank`: writes 5 subsongs, but all overwrite the same file = wrong.
|
||||
- `test.exe -s 1 -S 5 -o bgm_?02s.wav file.bank`: writes 5 subsongs, each named differently = correct.
|
||||
- `vgmstream-cli -s 1 -S 100 file.bank`: writes from subsong 1 to subsong 100
|
||||
- `vgmstream-cli -s 101 -S 0 file.bank`: writes from subsong 101 to max subsong (automatically changes 0 to max)
|
||||
- `vgmstream-cli -S 0 file.bank`: writes from subsong 1 to max subsong
|
||||
- `vgmstream-cli -s 1 -S 5 -o bgm.wav file.bank`: writes 5 subsongs, but all overwrite the same file = wrong.
|
||||
- `vgmstream-cli -s 1 -S 5 -o bgm_?02s.wav file.bank`: writes 5 subsongs, each named differently = correct.
|
||||
|
||||
For other players without support, or to play only a few choice subsongs, you
|
||||
can create multiple `.txtp` (explained later) to select one, like `bgm.sxd#10.txtp`
|
||||
@ -239,7 +239,7 @@ can create multiple `.txtp` (explained later) to select one, like `bgm.sxd#10.tx
|
||||
|
||||
You can use this python script to autogenerate one `.txtp` per subsong:
|
||||
https://github.com/vgmstream/vgmstream/tree/master/cli/tools/txtp_maker.py
|
||||
Put in the same dir as test.exe/vgmstream_cli, then to drag-and-drop files with
|
||||
Put in the same dir as *vgmstream-cli*, then to drag-and-drop files with
|
||||
subsongs to `txtp_maker.py` (it has CLI options to control output too).
|
||||
|
||||
### Common and unknown extensions
|
||||
@ -881,7 +881,7 @@ boss2_3ningumi_ver6.adx #l 1.0 #F .txtp
|
||||
You can also use it in CLI for quick access to some txtp-exclusive functions:
|
||||
```
|
||||
# force change sample rate to 22050 (don't forget to use " with spaces)
|
||||
test.exe -o btl_koopa1_44k_lp.wav "btl_koopa1_44k_lp.brstm #h22050.txtp"
|
||||
vgmstream-cli -o btl_koopa1_44k_lp.wav "btl_koopa1_44k_lp.brstm #h22050.txtp"
|
||||
```
|
||||
|
||||
Support for this feature is limited by player itself, as foobar and Winamp allow
|
||||
|
@ -200,7 +200,7 @@ $cliFiles = @(
|
||||
"ext_libs/*.dll",
|
||||
"ext_libs/libspeex/*.dll",
|
||||
"$configuration/in_vgmstream.dll",
|
||||
"$configuration/test.exe",
|
||||
"$configuration/vgmstream-cli.exe",
|
||||
"$configuration/xmp-vgmstream.dll",
|
||||
"COPYING",
|
||||
"README.md"
|
||||
@ -221,7 +221,7 @@ function MakePackage
|
||||
{
|
||||
Build
|
||||
|
||||
if(!(Test-Path "$configuration/test.exe")) {
|
||||
if(!(Test-Path "$configuration/vgmstream-cli.exe")) {
|
||||
Write-Error "Unable to find binaries, check for compilation errors"
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user