Merge pull request #932 from bnnm/xsh-etc

- Add .xsh+xsd/xss variations [Minority Report (Xbox)]
- Ignore loop count 0 in foobar/winamp
- build: tweaks
This commit is contained in:
bnnm 2021-08-27 22:26:49 +02:00 committed by GitHub
commit 3cf27332d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 85 additions and 56 deletions

View File

@ -1,3 +1,5 @@
# github workflow to automate builds
name: Linux build
on: [push, pull_request]
@ -18,17 +20,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Fetch Git Tags
- name: Fetch Git tags
run: |
git fetch --prune --unshallow --tags
- name: Install Dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libmpg123-dev libvorbis-dev libavformat-dev libavcodec-dev libavutil-dev libswresample-dev
sudo apt-get install -y libao-dev audacious-dev libjansson-dev
- name: Create Build Environment
- name: Create build environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
@ -48,34 +50,35 @@ jobs:
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Upload CLI Tools Artifact
uses: actions/upload-artifact@v2
with:
path: |
${{runner.workspace}}/build/cli/vgmstream_cli
${{runner.workspace}}/build/cli/vgmstream123
name: vgmstream_cli
- name: Upload Audacious Plugin Artifact
uses: actions/upload-artifact@v2
with:
path: ${{runner.workspace}}/build/audacious/vgmstream.so
name: vgmstream-audacious
- name: Upload Artifacts to S3
if: github.event_name != 'pull_request'
working-directory: ${{runner.workspace}}/build
shell: bash
env:
AWS_DEFAULT_REGION: us-west-1
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
run: |
cd cli
tar cvfz vgmstream-cli.tar.gz vgmstream_cli vgmstream123
cd ../audacious
tar cvfz vgmstream-audacious.tar.gz vgmstream.so
cd ..
aws s3 cp cli/vgmstream-cli.tar.gz s3://vgmstream-builds/${{github.sha}}/linux/vgmstream-cli.tar.gz --acl public-read
aws s3 cp audacious/vgmstream-audacious.tar.gz s3://vgmstream-builds/${{github.sha}}/linux/vgmstream-audacious.tar.gz --acl public-read
# not useful since sharing artifacts between Linux distros ain't fun
#- name: Upload CLI tools artifact
# uses: actions/upload-artifact@v2
# with:
# path: |
# ${{runner.workspace}}/build/cli/vgmstream-cli
# ${{runner.workspace}}/build/cli/vgmstream123
# name: vgmstream-cli
#- name: Upload Audacious plugin artifact
# uses: actions/upload-artifact@v2
# with:
# path: ${{runner.workspace}}/build/audacious/vgmstream.so
# name: vgmstream-audacious
#- name: Upload artifacts to S3
# if: github.event_name != 'pull_request'
# working-directory: ${{runner.workspace}}/build
# shell: bash
# env:
# AWS_DEFAULT_REGION: us-west-1
# AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
# AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
# run: |
# cd cli
# tar cvfz vgmstream-cli.tar.gz vgmstream-cli vgmstream123
# cd ../audacious
# tar cvfz vgmstream-audacious.tar.gz vgmstream.so
# cd ..
# aws s3 cp cli/vgmstream-cli.tar.gz s3://vgmstream-builds/${{github.sha}}/linux/vgmstream-cli.tar.gz --acl public-read
# aws s3 cp audacious/vgmstream-audacious.tar.gz s3://vgmstream-builds/${{github.sha}}/linux/vgmstream-audacious.tar.gz --acl public-read

View File

@ -1,4 +1,4 @@
# This is a basic workflow to help you get started with Actions
# github workflow to automate builds
name: Windows build

View File

@ -40,6 +40,10 @@ void input_vgmstream::load_settings() {
override_title = cfg_OverrideTitle;
//exts_unknown_on = cfg_ExtsUnknownOn;
//exts_common_on = cfg_ExtsCommonOn;
/* exact 0 was allowed before (AKA "intro only") but confuses people and may result in unplayable files */
if (loop_count <= 0)
loop_count = 1;
}
void input_vgmstream::g_load_cfg(int *accept_unknown, int *accept_common) {
//todo improve

View File

@ -200,7 +200,7 @@ $cliPdbFiles = @(
function Package
{
if(!(Test-Path "Release/test.exe")) { Build }
Build
if(!(Test-Path "Release/test.exe")) {
Write-Error "Unable to find binaries, check for compilation errors"

View File

@ -2,7 +2,7 @@
#include "../coding/coding.h"
/* XSH+XSD/XSS - from Treyarch games [Spider-Man 2002 (Xbox), Kelly Slater's Pro Surfer (Xbox)] */
/* XSH+XSD/XSS - from Treyarch games */
VGMSTREAM* init_vgmstream_xsh_xsd_xss(STREAMFILE* sf) {
VGMSTREAM* vgmstream = NULL;
STREAMFILE* sf_body = NULL;
@ -30,34 +30,47 @@ VGMSTREAM* init_vgmstream_xsh_xsd_xss(STREAMFILE* sf) {
if (target_subsong < 0 || target_subsong > total_subsongs || total_subsongs < 1) goto fail;
switch(version) {
case 0x009D:
case 0x009D: /* Spider-Man 2002 (Xbox) */
offset = 0x0c + (target_subsong-1) * 0x60;
name_offset = offset + 0x00;
name_size = 0x20;
stream_type = read_u32le(offset + 0x20,sf);
stream_offset = read_u32le(offset + 0x24,sf);
stream_size = read_u32le(offset + 0x28,sf);
flags = read_u32le(offset + 0x34,sf);
/* 0x38: flags? */
offset += 0x20;
stream_type = read_u32le(offset + 0x00,sf);
stream_offset = read_u32le(offset + 0x04,sf);
stream_size = read_u32le(offset + 0x08,sf);
flags = read_u32le(offset + 0x14,sf);
/* 0x18: flags? */
num_samples = 0;
offset = offset + 0x3c;
offset += 0x1c;
break;
case 0x0100:
offset = 0x0c + (target_subsong-1) * 0x64;
case 0x0100: /* Kelly Slater's Pro Surfer (Xbox) */
case 0x0101: /* Minority Report: Everybody Runs (Xbox), NHL 2K3 (Xbox) */
/* NHL has stream IDs instead of names */
if (read_u32le(0x0c,sf) > 0x1000) {
offset = 0x0c + (target_subsong-1) * 0x64;
name_offset = offset + 0x00;
name_size = 0x20;
offset += 0x20;
}
else {
offset = 0x0c + (target_subsong-1) * 0x48;
name_offset = offset + 0x00;
name_size = 0x00;
offset += 0x04;
}
name_offset = offset + 0x00;
name_size = 0x20;
stream_type = read_u32le(offset + 0x20,sf);
stream_offset = read_u32le(offset + 0x24,sf);
stream_size = read_u32le(offset + 0x28,sf);
flags = read_u32le(offset + 0x34,sf);
num_samples = read_u32le(offset + 0x38,sf);
/* 0x3c: flags? */
stream_type = read_u32le(offset + 0x00,sf);
stream_offset = read_u32le(offset + 0x04,sf);
stream_size = read_u32le(offset + 0x08,sf);
flags = read_u32le(offset + 0x14,sf);
num_samples = read_u32le(offset + 0x18,sf);
/* 0x1c: flags? */
offset = offset + 0x40;
offset += 0x20;
break;
default:
@ -90,7 +103,7 @@ VGMSTREAM* init_vgmstream_xsh_xsd_xss(STREAMFILE* sf) {
char filename[255];
switch (version) {
case 0x009D:
/* stream is a named .xss, with stream_offset/size = 0 (Spider-Man) */
/* stream is a named .xss, with stream_offset/size = 0 */
read_string(filename, name_size, name_offset,sf);
strcat(filename, ".xss");
@ -112,7 +125,8 @@ VGMSTREAM* init_vgmstream_xsh_xsd_xss(STREAMFILE* sf) {
//break;
case 0x0100:
/* bigfile with all streams (Kelly Slater) */
case 0x0101:
/* bigfile with all streams */
snprintf(filename, sizeof(filename), "%s", "STREAMS.XSS");
sf_body = open_streamfile_by_filename(sf,filename);
if (!sf_body) {

View File

@ -169,6 +169,10 @@ static void ini_set_b(const char *inifile, const char *entry, int val) {
if (settings->loop_forever && settings->ignore_loop)
settings->ignore_loop = 0;
/* exact 0 was allowed before (AKA "intro only") but confuses people and may result in unplayable files */
if (settings->loop_count <= 0)
settings->loop_count = 1;
}
static void save_config(In_Module* input_module, winamp_settings_t* settings) {
@ -277,6 +281,10 @@ static int dlg_load_form(HWND hDlg, winamp_settings_t* settings) {
dlg_combo_get(hDlg, IDC_GAIN_TYPE, (int*)&settings->gain_type);
dlg_combo_get(hDlg, IDC_CLIP_TYPE, (int*)&settings->clip_type);
/* exact 0 was allowed before (AKA "intro only") but confuses people and may result in unplayable files */
if (settings->loop_count <= 0)
settings->loop_count = 1;
return err ? 0 : 1;
}