mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-17 19:19:16 +01:00
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:
commit
3cf27332d9
69
.github/workflows/cmake-lx.yml
vendored
69
.github/workflows/cmake-lx.yml
vendored
@ -1,3 +1,5 @@
|
|||||||
|
# github workflow to automate builds
|
||||||
|
|
||||||
name: Linux build
|
name: Linux build
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
@ -18,17 +20,17 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Fetch Git Tags
|
- name: Fetch Git tags
|
||||||
run: |
|
run: |
|
||||||
git fetch --prune --unshallow --tags
|
git fetch --prune --unshallow --tags
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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 libmpg123-dev libvorbis-dev libavformat-dev libavcodec-dev libavutil-dev libswresample-dev
|
||||||
sudo apt-get install -y libao-dev audacious-dev libjansson-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
|
# 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
|
# We'll use this as our working directory for all subsequent commands
|
||||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||||
@ -48,34 +50,35 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
run: cmake --build . --config $BUILD_TYPE
|
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
|
# not useful since sharing artifacts between Linux distros ain't fun
|
||||||
if: github.event_name != 'pull_request'
|
#- name: Upload CLI tools artifact
|
||||||
working-directory: ${{runner.workspace}}/build
|
# uses: actions/upload-artifact@v2
|
||||||
shell: bash
|
# with:
|
||||||
env:
|
# path: |
|
||||||
AWS_DEFAULT_REGION: us-west-1
|
# ${{runner.workspace}}/build/cli/vgmstream-cli
|
||||||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
# ${{runner.workspace}}/build/cli/vgmstream123
|
||||||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
# name: vgmstream-cli
|
||||||
run: |
|
|
||||||
cd cli
|
#- name: Upload Audacious plugin artifact
|
||||||
tar cvfz vgmstream-cli.tar.gz vgmstream_cli vgmstream123
|
# uses: actions/upload-artifact@v2
|
||||||
cd ../audacious
|
# with:
|
||||||
tar cvfz vgmstream-audacious.tar.gz vgmstream.so
|
# path: ${{runner.workspace}}/build/audacious/vgmstream.so
|
||||||
cd ..
|
# name: vgmstream-audacious
|
||||||
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
|
#- 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
|
||||||
|
2
.github/workflows/vs-win.yml
vendored
2
.github/workflows/vs-win.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
# This is a basic workflow to help you get started with Actions
|
# github workflow to automate builds
|
||||||
|
|
||||||
name: Windows build
|
name: Windows build
|
||||||
|
|
||||||
|
@ -40,6 +40,10 @@ void input_vgmstream::load_settings() {
|
|||||||
override_title = cfg_OverrideTitle;
|
override_title = cfg_OverrideTitle;
|
||||||
//exts_unknown_on = cfg_ExtsUnknownOn;
|
//exts_unknown_on = cfg_ExtsUnknownOn;
|
||||||
//exts_common_on = cfg_ExtsCommonOn;
|
//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) {
|
void input_vgmstream::g_load_cfg(int *accept_unknown, int *accept_common) {
|
||||||
//todo improve
|
//todo improve
|
||||||
|
@ -200,7 +200,7 @@ $cliPdbFiles = @(
|
|||||||
|
|
||||||
function Package
|
function Package
|
||||||
{
|
{
|
||||||
if(!(Test-Path "Release/test.exe")) { Build }
|
Build
|
||||||
|
|
||||||
if(!(Test-Path "Release/test.exe")) {
|
if(!(Test-Path "Release/test.exe")) {
|
||||||
Write-Error "Unable to find binaries, check for compilation errors"
|
Write-Error "Unable to find binaries, check for compilation errors"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "../coding/coding.h"
|
#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* init_vgmstream_xsh_xsd_xss(STREAMFILE* sf) {
|
||||||
VGMSTREAM* vgmstream = NULL;
|
VGMSTREAM* vgmstream = NULL;
|
||||||
STREAMFILE* sf_body = 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;
|
if (target_subsong < 0 || target_subsong > total_subsongs || total_subsongs < 1) goto fail;
|
||||||
|
|
||||||
switch(version) {
|
switch(version) {
|
||||||
case 0x009D:
|
case 0x009D: /* Spider-Man 2002 (Xbox) */
|
||||||
offset = 0x0c + (target_subsong-1) * 0x60;
|
offset = 0x0c + (target_subsong-1) * 0x60;
|
||||||
|
|
||||||
name_offset = offset + 0x00;
|
name_offset = offset + 0x00;
|
||||||
name_size = 0x20;
|
name_size = 0x20;
|
||||||
stream_type = read_u32le(offset + 0x20,sf);
|
offset += 0x20;
|
||||||
stream_offset = read_u32le(offset + 0x24,sf);
|
|
||||||
stream_size = read_u32le(offset + 0x28,sf);
|
stream_type = read_u32le(offset + 0x00,sf);
|
||||||
flags = read_u32le(offset + 0x34,sf);
|
stream_offset = read_u32le(offset + 0x04,sf);
|
||||||
/* 0x38: flags? */
|
stream_size = read_u32le(offset + 0x08,sf);
|
||||||
|
flags = read_u32le(offset + 0x14,sf);
|
||||||
|
/* 0x18: flags? */
|
||||||
num_samples = 0;
|
num_samples = 0;
|
||||||
|
|
||||||
offset = offset + 0x3c;
|
offset += 0x1c;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0100:
|
case 0x0100: /* Kelly Slater's Pro Surfer (Xbox) */
|
||||||
offset = 0x0c + (target_subsong-1) * 0x64;
|
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;
|
stream_type = read_u32le(offset + 0x00,sf);
|
||||||
name_size = 0x20;
|
stream_offset = read_u32le(offset + 0x04,sf);
|
||||||
stream_type = read_u32le(offset + 0x20,sf);
|
stream_size = read_u32le(offset + 0x08,sf);
|
||||||
stream_offset = read_u32le(offset + 0x24,sf);
|
flags = read_u32le(offset + 0x14,sf);
|
||||||
stream_size = read_u32le(offset + 0x28,sf);
|
num_samples = read_u32le(offset + 0x18,sf);
|
||||||
flags = read_u32le(offset + 0x34,sf);
|
/* 0x1c: flags? */
|
||||||
num_samples = read_u32le(offset + 0x38,sf);
|
|
||||||
/* 0x3c: flags? */
|
|
||||||
|
|
||||||
offset = offset + 0x40;
|
offset += 0x20;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -90,7 +103,7 @@ VGMSTREAM* init_vgmstream_xsh_xsd_xss(STREAMFILE* sf) {
|
|||||||
char filename[255];
|
char filename[255];
|
||||||
switch (version) {
|
switch (version) {
|
||||||
case 0x009D:
|
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);
|
read_string(filename, name_size, name_offset,sf);
|
||||||
strcat(filename, ".xss");
|
strcat(filename, ".xss");
|
||||||
|
|
||||||
@ -112,7 +125,8 @@ VGMSTREAM* init_vgmstream_xsh_xsd_xss(STREAMFILE* sf) {
|
|||||||
//break;
|
//break;
|
||||||
|
|
||||||
case 0x0100:
|
case 0x0100:
|
||||||
/* bigfile with all streams (Kelly Slater) */
|
case 0x0101:
|
||||||
|
/* bigfile with all streams */
|
||||||
snprintf(filename, sizeof(filename), "%s", "STREAMS.XSS");
|
snprintf(filename, sizeof(filename), "%s", "STREAMS.XSS");
|
||||||
sf_body = open_streamfile_by_filename(sf,filename);
|
sf_body = open_streamfile_by_filename(sf,filename);
|
||||||
if (!sf_body) {
|
if (!sf_body) {
|
||||||
|
@ -169,6 +169,10 @@ static void ini_set_b(const char *inifile, const char *entry, int val) {
|
|||||||
|
|
||||||
if (settings->loop_forever && settings->ignore_loop)
|
if (settings->loop_forever && settings->ignore_loop)
|
||||||
settings->ignore_loop = 0;
|
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) {
|
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_GAIN_TYPE, (int*)&settings->gain_type);
|
||||||
dlg_combo_get(hDlg, IDC_CLIP_TYPE, (int*)&settings->clip_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;
|
return err ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user