mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 15:00:11 +01:00
commit
3a63f64fa7
73
.github/workflows/vs-win.yml
vendored
73
.github/workflows/vs-win.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: git fetch --prune --unshallow --tags
|
run: git fetch --prune --unshallow --tags
|
||||||
|
|
||||||
- name: Initialize Build Environment
|
- name: Initialize build environment
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Init
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Init
|
||||||
|
|
||||||
@ -33,77 +33,35 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Build
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Build
|
||||||
|
|
||||||
- name: Prepare Files For Packaging
|
- name: Prepare files for packaging
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 PackageTmp
|
||||||
$fb2kFiles = @(
|
|
||||||
"ext_libs/*.dll",
|
|
||||||
"ext_libs/libspeex/*.dll",
|
|
||||||
"Release/foo_input_vgmstream.dll",
|
|
||||||
"README.md"
|
|
||||||
)
|
|
||||||
|
|
||||||
$cliFiles = @(
|
- name: Upload foobar2000 component artifact
|
||||||
"ext_libs/*.dll",
|
|
||||||
"ext_libs/libspeex/*.dll",
|
|
||||||
"Release/in_vgmstream.dll",
|
|
||||||
"Release/test.exe",
|
|
||||||
"Release/xmp-vgmstream.dll",
|
|
||||||
"COPYING",
|
|
||||||
"README.md"
|
|
||||||
)
|
|
||||||
|
|
||||||
$fb2kPdbFiles = @(
|
|
||||||
"Release/foo_input_vgmstream.pdb"
|
|
||||||
)
|
|
||||||
|
|
||||||
$cliPdbFiles = @(
|
|
||||||
"Release/in_vgmstream.pdb",
|
|
||||||
"Release/test.pdb",
|
|
||||||
"Release/xmp-vgmstream.pdb"
|
|
||||||
)
|
|
||||||
|
|
||||||
Compress-Archive $cliFiles Release/vgmstream-win.zip -Force
|
|
||||||
Compress-Archive $fb2kFiles Release/foo_input_vgmstream.zip -Force
|
|
||||||
Move-Item Release/foo_input_vgmstream.zip Release/foo_input_vgmstream.fb2k-component -Force
|
|
||||||
Compress-Archive $cliPdbFiles Release/test.pdb.zip -Force
|
|
||||||
Compress-Archive $fb2kPdbFiles Release/foo_input_vgmstream.pdb.zip -Force
|
|
||||||
|
|
||||||
mkdir tmp/cli
|
|
||||||
mkdir tmp/fb2k
|
|
||||||
mkdir tmp/cli-p
|
|
||||||
mkdir tmp/fb2k-p
|
|
||||||
|
|
||||||
Copy-Item $cliFiles tmp/cli/ -Recurse -Force
|
|
||||||
Copy-Item $fb2kFiles tmp/fb2k/ -Recurse -Force
|
|
||||||
Copy-Item $cliPdbFiles tmp/cli-p/ -Recurse -Force
|
|
||||||
Copy-Item $fb2kPdbFiles tmp/fb2k-p/ -Recurse -Force
|
|
||||||
|
|
||||||
- name: Upload foobar2000 Component Artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: foo_input_vgmstream.fb2k-component
|
name: foo_input_vgmstream.fb2k-component
|
||||||
path: ${{github.workspace}}\tmp\fb2k
|
path: ${{github.workspace}}\tmp\fb2k
|
||||||
|
|
||||||
- name: Upload CLI Tools Artifact
|
- name: Upload CLI tools artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: test
|
name: vgmstream-win
|
||||||
path: ${{github.workspace}}\tmp\cli
|
path: ${{github.workspace}}\tmp\cli
|
||||||
|
|
||||||
- name: Upload foobar2000 Component Debug Symbols Artifact
|
- name: Upload foobar2000 component debug symbols artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: foo_input_vgmstream.pdb
|
name: foo_input_vgmstream.pdb
|
||||||
path: ${{github.workspace}}\tmp\fb2k-p
|
path: ${{github.workspace}}\tmp\fb2k-p
|
||||||
|
|
||||||
- name: Upload CLI Tools Debug Symbols Artifact
|
- name: Upload CLI tools debug symbols artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: test.pdb
|
name: vgmstream-win.pdb
|
||||||
path: ${{github.workspace}}\tmp\cli-p
|
path: ${{github.workspace}}\tmp\cli-p
|
||||||
|
|
||||||
- name: Upload Artifacts to S3
|
- name: Upload artifacts to S3
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
working-directory: ${{github.workspace}}
|
working-directory: ${{github.workspace}}
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@ -112,18 +70,17 @@ jobs:
|
|||||||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||||
run: |
|
run: |
|
||||||
aws s3 cp Release\vgmstream-win.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
aws s3 cp bin\vgmstream-win.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
||||||
aws s3 cp Release\foo_input_vgmstream.fb2k-component s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
aws s3 cp bin\foo_input_vgmstream.fb2k-component s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
||||||
aws s3 cp Release\test.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
aws s3 cp bin\vgmstream-win.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
||||||
aws s3 cp Release\foo_input_vgmstream.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
aws s3 cp bin\foo_input_vgmstream.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
||||||
echo ${{github.sha}} | tee latest_id
|
echo ${{github.sha}} | tee latest_id
|
||||||
git describe --always | tee latest_ver
|
git describe --always | tee latest_ver
|
||||||
aws s3 cp latest_id s3://vgmstream-builds/ --acl public-read
|
aws s3 cp latest_id s3://vgmstream-builds/ --acl public-read
|
||||||
aws s3 cp latest_ver s3://vgmstream-builds/ --acl public-read
|
aws s3 cp latest_ver s3://vgmstream-builds/ --acl public-read
|
||||||
|
|
||||||
- name: Web Request Action
|
- name: Web request action
|
||||||
uses: Satak/webrequest-action@v1.2.3
|
uses: Satak/webrequest-action@v1.2.3
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
with:
|
with:
|
||||||
url: https://vgmstream-builds.losno.co/callFupa?secret=${{ secrets.FUPA_UPDATER_SECRET }}
|
url: https://vgmstream-builds.losno.co/callFupa?secret=${{ secrets.FUPA_UPDATER_SECRET }}
|
||||||
|
|
||||||
|
9
.gitignore
vendored
9
.gitignore
vendored
@ -45,10 +45,17 @@ Release
|
|||||||
/xmplay/*.dll
|
/xmplay/*.dll
|
||||||
/dependencies
|
/dependencies
|
||||||
/version_auto.h
|
/version_auto.h
|
||||||
/msvc-build.config.ps1
|
|
||||||
|
|
||||||
|
/msvc-build.config.ps1
|
||||||
|
/msvc-build.log
|
||||||
|
# for test batchs, note that already tracked files are never ignored
|
||||||
|
/msvc-build-*.bat
|
||||||
|
|
||||||
|
/bin/**/*
|
||||||
|
/tmp/**/*
|
||||||
/**/vgmstream-win.zip
|
/**/vgmstream-win.zip
|
||||||
/**/foo_input_vgmstream.fb2k-component
|
/**/foo_input_vgmstream.fb2k-component
|
||||||
|
|
||||||
|
# cmake stuff
|
||||||
/build
|
/build
|
||||||
/cmake-build*
|
/cmake-build*
|
13
Directory.Build.props
Normal file
13
Directory.Build.props
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- MSBuild config: autoimported by MSBuild +15 (VS +2017) only, so it's probably better to use for small tweaks only -->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Label="PropertySheets" />
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup />
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<DisableSpecificWarnings>4018;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
</Project>
|
2
Makefile
2
Makefile
@ -129,7 +129,7 @@ ifeq ($(TARGET_OS),Windows_NT)
|
|||||||
|
|
||||||
VGM_FFMPEG = 1
|
VGM_FFMPEG = 1
|
||||||
ifneq ($(VGM_FFMPEG),0)
|
ifneq ($(VGM_FFMPEG),0)
|
||||||
LIBS_CFLAGS += -DVGM_USE_FFMPEG
|
LIBS_CFLAGS += -DVGM_USE_FFMPEG -I../ext_includes/ffmpeg
|
||||||
LIBS_LDFLAGS += -lavcodec -lavformat -lavutil -lswresample
|
LIBS_LDFLAGS += -lavcodec -lavformat -lavutil -lswresample
|
||||||
LIBS_TARGET_EXT_LIBS += libavcodec.a libavformat.a libavutil.a libswresample.a
|
LIBS_TARGET_EXT_LIBS += libavcodec.a libavformat.a libavutil.a libswresample.a
|
||||||
endif
|
endif
|
||||||
|
@ -2,12 +2,11 @@
|
|||||||
# CLI tools
|
# CLI tools
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
### main defs
|
|
||||||
|
|
||||||
LIBAO_IPATH = ../../libao/include
|
LIBAO_IPATH = ../../libao/include
|
||||||
LIBAO_LPATH = ../../libao/bin
|
LIBAO_LPATH = ../../libao/bin
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
### main defs
|
||||||
|
|
||||||
CFLAGS += $(DEF_CFLAGS) -DVAR_ARRAYS $(EXTRA_CFLAGS)
|
CFLAGS += $(DEF_CFLAGS) -DVAR_ARRAYS $(EXTRA_CFLAGS)
|
||||||
LDFLAGS += -L../src -lvgmstream -lm $(EXTRA_LDFLAGS)
|
LDFLAGS += -L../src -lvgmstream -lm $(EXTRA_LDFLAGS)
|
||||||
@ -18,7 +17,7 @@ ifeq ($(TARGET_OS),Windows_NT)
|
|||||||
OUTPUT_123 = vgmstream123.exe
|
OUTPUT_123 = vgmstream123.exe
|
||||||
|
|
||||||
# -DUSE_ALLOCA
|
# -DUSE_ALLOCA
|
||||||
CFLAGS += -DWIN32 -I../ext_includes -I../ext_libs/Getopt -I../ext_includes/ffmpeg
|
CFLAGS += -DWIN32 -I../ext_includes -I../ext_libs/Getopt
|
||||||
LDFLAGS += -L../ext_libs
|
LDFLAGS += -L../ext_libs
|
||||||
|
|
||||||
LIBAO_INC = -I$(LIBAO_IPATH)
|
LIBAO_INC = -I$(LIBAO_IPATH)
|
||||||
@ -27,7 +26,7 @@ else
|
|||||||
OUTPUT_CLI = vgmstream-cli
|
OUTPUT_CLI = vgmstream-cli
|
||||||
OUTPUT_123 = vgmstream123
|
OUTPUT_123 = vgmstream123
|
||||||
|
|
||||||
#todo move clhca/etc and remove
|
#todo move to subfolders and remove
|
||||||
CFLAGS += -I../ext_includes
|
CFLAGS += -I../ext_includes
|
||||||
|
|
||||||
LIBAO_LIB = -lao
|
LIBAO_LIB = -lao
|
||||||
|
@ -71,8 +71,8 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..;../ext_libs/Getopt;../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;../ext_includes;../ext_libs/Getopt;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;HAVE_JSON;_DEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;HAVE_JSON;_DEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
@ -96,8 +96,8 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>..;../ext_libs/Getopt;../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;../ext_includes;../ext_libs/Getopt;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;HAVE_JSON;NDEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;HAVE_JSON;NDEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
|
@ -199,9 +199,9 @@ Requires MSVC (foobar/SDK only links to MSVC C++ DLLs). To build in Visual Studi
|
|||||||
|
|
||||||
foobar has multiple dependencies. Build script downloads them automatically, but here they are:
|
foobar has multiple dependencies. Build script downloads them automatically, but here they are:
|
||||||
- foobar2000 SDK (2018), in *(vgmstream)/dependencies/foobar/*: http://www.foobar2000.org/SDK
|
- foobar2000 SDK (2018), in *(vgmstream)/dependencies/foobar/*: http://www.foobar2000.org/SDK
|
||||||
- (optional) FDK-AAC, in *(vgmstream)/dependencies/fdk-aac/*: https://github.com/kode54/fdk-aac
|
|
||||||
- (optional) QAAC, in *(vgmstream)/dependencies/qaac/*: https://github.com/kode54/qaac
|
|
||||||
- WTL (if needed), in *(vgmstream)/dependencies/WTL/*: http://wtl.sourceforge.net/
|
- WTL (if needed), in *(vgmstream)/dependencies/WTL/*: http://wtl.sourceforge.net/
|
||||||
|
- (optional/disabled) FDK-AAC, in *(vgmstream)/dependencies/fdk-aac/*: https://github.com/kode54/fdk-aac
|
||||||
|
- (optional/disabled) QAAC, in *(vgmstream)/dependencies/qaac/*: https://github.com/kode54/qaac
|
||||||
- may need to install ATL and MFC libraries if not included by default (can be added from the Visual Studio installer)
|
- may need to install ATL and MFC libraries if not included by default (can be added from the Visual Studio installer)
|
||||||
|
|
||||||
The following project modifications are required:
|
The following project modifications are required:
|
||||||
@ -209,7 +209,7 @@ The following project modifications are required:
|
|||||||
|
|
||||||
FDK-AAC/QAAC can be enabled adding *VGM_USE_MP4V2* and *VGM_USE_FDKAAC* in the compiler/linker options and the project dependencies, otherwise FFmpeg is used instead to support .mp4. FDK-AAC Support is limited so FFmpeg is recommended.
|
FDK-AAC/QAAC can be enabled adding *VGM_USE_MP4V2* and *VGM_USE_FDKAAC* in the compiler/linker options and the project dependencies, otherwise FFmpeg is used instead to support .mp4. FDK-AAC Support is limited so FFmpeg is recommended.
|
||||||
|
|
||||||
In theory any foobar SDK should work, but there may be issues when using versions past `2018-02-05`. Mirror in case official site is down: https://github.com/vgmstream/vgmstream-deps/raw/master/foobar2000/SDK-2018-02-05.zip
|
In theory any foobar SDK should work, but there may be issues when using versions past *2018-02-05*. For those you need to change *RuntimeLibrary* from *MultiThreadedDebug* and *MultiThreaded* to *MultiThreadedDebugDLL* and *MultiThreadedDLL* (to match newer SDK settings). Mirror in case official site is down: https://github.com/vgmstream/vgmstream-deps/raw/master/foobar2000/SDK-2018-02-05.zip
|
||||||
|
|
||||||
You can also manually use the command line to compile with MSBuild, if you don't want to touch the `.vcxproj` files, register VS after trial, get PowerShell dependencies for the build script, or only have VC++/MSBuild tools.
|
You can also manually use the command line to compile with MSBuild, if you don't want to touch the `.vcxproj` files, register VS after trial, get PowerShell dependencies for the build script, or only have VC++/MSBuild tools.
|
||||||
|
|
||||||
|
@ -70,8 +70,8 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..;../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/WTL/Include;$(DependenciesDir)/foobar/foobar2000/SDK;$(DependenciesDir)/foobar/foobar2000/shared;$(DependenciesDir)/foobar/foobar2000;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;$(DependenciesDir)/WTL/Include;$(DependenciesDir)/foobar/foobar2000/SDK;$(DependenciesDir)/foobar/foobar2000/shared;$(DependenciesDir)/foobar/foobar2000;$(DependenciesDir)/qaac/mp4v2/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
@ -96,8 +96,8 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>..;../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/WTL/Include;$(DependenciesDir)/foobar/foobar2000/SDK;$(DependenciesDir)/foobar/foobar2000/shared;$(DependenciesDir)/foobar/foobar2000;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(DependenciesDir)/WTL/Include;$(DependenciesDir)/foobar/foobar2000/SDK;$(DependenciesDir)/foobar/foobar2000/shared;$(DependenciesDir)/foobar/foobar2000;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
Param(
|
Param(
|
||||||
[Parameter(Position=0, mandatory=$true)]
|
[Parameter(Position=0, mandatory=$true)]
|
||||||
[ValidateSet("Init", "Build", "Rebuild", "Clean")]
|
[ValidateSet("Init", "Build", "Rebuild", "Clean", "Package", "PackageTmp")]
|
||||||
[string]$Task
|
[string]$Task
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -19,6 +19,8 @@ if (!$toolset) { $toolset = "" }
|
|||||||
if (!$sdk) { $sdk = "" }
|
if (!$sdk) { $sdk = "" }
|
||||||
# - platforms: "" (default), "Win32"
|
# - platforms: "" (default), "Win32"
|
||||||
if (!$platform) { $platform = "" }
|
if (!$platform) { $platform = "" }
|
||||||
|
# print compilation log
|
||||||
|
#$log = 1
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
$solution = "vgmstream_full.sln"
|
$solution = "vgmstream_full.sln"
|
||||||
@ -126,7 +128,12 @@ function CallMsbuild
|
|||||||
}
|
}
|
||||||
|
|
||||||
# main build (pass config separate and not as a single string)
|
# main build (pass config separate and not as a single string)
|
||||||
& $msbuild $solution $config $platform $toolset $sdk $target /m
|
if (!$log) {
|
||||||
|
& $msbuild $solution $config $platform $toolset $sdk $target /m
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
& $msbuild $solution $config $platform $toolset $sdk $target /m > "msvc-build.log"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Build
|
function Build
|
||||||
@ -138,6 +145,7 @@ function Rebuild
|
|||||||
{
|
{
|
||||||
CallMsbuild "Rebuild"
|
CallMsbuild "Rebuild"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Clean
|
function Clean
|
||||||
{
|
{
|
||||||
CallMsbuild "Clean"
|
CallMsbuild "Clean"
|
||||||
@ -159,12 +167,81 @@ function Clean
|
|||||||
Remove-Item -Path "xmplay/Release" -Recurse -ErrorAction Ignore
|
Remove-Item -Path "xmplay/Release" -Recurse -ErrorAction Ignore
|
||||||
Remove-Item -Path "Debug" -Recurse -ErrorAction Ignore
|
Remove-Item -Path "Debug" -Recurse -ErrorAction Ignore
|
||||||
Remove-Item -Path "Release" -Recurse -ErrorAction Ignore
|
Remove-Item -Path "Release" -Recurse -ErrorAction Ignore
|
||||||
|
Remove-Item -Path "bin" -Recurse -ErrorAction Ignore
|
||||||
|
Remove-Item -Path "tmp" -Recurse -ErrorAction Ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$fb2kFiles = @(
|
||||||
|
"ext_libs/*.dll",
|
||||||
|
"ext_libs/libspeex/*.dll",
|
||||||
|
"Release/foo_input_vgmstream.dll",
|
||||||
|
"README.md"
|
||||||
|
)
|
||||||
|
|
||||||
|
$cliFiles = @(
|
||||||
|
"ext_libs/*.dll",
|
||||||
|
"ext_libs/libspeex/*.dll",
|
||||||
|
"Release/in_vgmstream.dll",
|
||||||
|
"Release/test.exe",
|
||||||
|
"Release/xmp-vgmstream.dll",
|
||||||
|
"COPYING",
|
||||||
|
"README.md"
|
||||||
|
)
|
||||||
|
|
||||||
|
$fb2kPdbFiles = @(
|
||||||
|
"Release/foo_input_vgmstream.pdb"
|
||||||
|
)
|
||||||
|
|
||||||
|
$cliPdbFiles = @(
|
||||||
|
"Release/in_vgmstream.pdb",
|
||||||
|
"Release/test.pdb",
|
||||||
|
"Release/xmp-vgmstream.pdb"
|
||||||
|
)
|
||||||
|
|
||||||
|
function Package
|
||||||
|
{
|
||||||
|
if(!(Test-Path "Release/test.exe")) { Build }
|
||||||
|
|
||||||
|
if(!(Test-Path "Release/test.exe")) {
|
||||||
|
Write-Error "Unable to find binaries, check for compilation errors"
|
||||||
|
}
|
||||||
|
|
||||||
|
Compress-Archive $cliFiles Release/vgmstream-win.zip -Force
|
||||||
|
Compress-Archive $fb2kFiles Release/foo_input_vgmstream.zip -Force
|
||||||
|
Compress-Archive $cliPdbFiles Release/vgmstream-win.pdb.zip -Force
|
||||||
|
Compress-Archive $fb2kPdbFiles Release/foo_input_vgmstream.pdb.zip -Force
|
||||||
|
|
||||||
|
md -Force bin
|
||||||
|
Move-Item Release/vgmstream-win.zip bin/vgmstream-win.zip -Force
|
||||||
|
Move-Item Release/foo_input_vgmstream.zip bin/foo_input_vgmstream.fb2k-component -Force
|
||||||
|
Move-Item Release/vgmstream-win.pdb.zip bin/vgmstream-win.pdb.zip -Force
|
||||||
|
Move-Item Release/foo_input_vgmstream.pdb.zip bin/foo_input_vgmstream.pdb.zip -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# for github actions/artifact uploads, that use a dir with files
|
||||||
|
function PackageTmp
|
||||||
|
{
|
||||||
|
Package
|
||||||
|
|
||||||
|
md -Force tmp/cli
|
||||||
|
md -Force tmp/fb2k
|
||||||
|
md -Force tmp/cli-p
|
||||||
|
md -Force tmp/fb2k-p
|
||||||
|
|
||||||
|
Copy-Item $cliFiles tmp/cli/ -Recurse -Force
|
||||||
|
Copy-Item $fb2kFiles tmp/fb2k/ -Recurse -Force
|
||||||
|
Copy-Item $cliPdbFiles tmp/cli-p/ -Recurse -Force
|
||||||
|
Copy-Item $fb2kPdbFiles tmp/fb2k-p/ -Recurse -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
switch ($Task)
|
switch ($Task)
|
||||||
{
|
{
|
||||||
"Init" { Init }
|
"Init" { Init }
|
||||||
"Build" { Build }
|
"Build" { Build }
|
||||||
"Rebuild" { Rebuild }
|
"Rebuild" { Rebuild }
|
||||||
"Clean" { Clean }
|
"Clean" { Clean }
|
||||||
|
"Package" { Package }
|
||||||
|
"PackageTmp" { PackageTmp }
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,7 @@ file(GLOB LAYOUT_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/layout/*.c")
|
|||||||
file(GLOB META_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/meta/*.h")
|
file(GLOB META_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/meta/*.h")
|
||||||
file(GLOB META_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/meta/*.c")
|
file(GLOB META_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/meta/*.c")
|
||||||
set(EXT_HEADERS
|
set(EXT_HEADERS
|
||||||
${VGM_SOURCE_DIR}/ext_includes/clHCA.h
|
|
||||||
${VGM_SOURCE_DIR}/ext_includes/pstdint.h)
|
${VGM_SOURCE_DIR}/ext_includes/pstdint.h)
|
||||||
set(EXT_SOURCES
|
|
||||||
${VGM_SOURCE_DIR}/ext_libs/clHCA.c)
|
|
||||||
file(GLOB MAIN_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
file(GLOB MAIN_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||||
file(GLOB MAIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
|
file(GLOB MAIN_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
|
||||||
|
|
||||||
@ -23,7 +20,6 @@ source_group("Header Files\\ext" FILES ${EXT_HEADERS})
|
|||||||
source_group("Source Files\\coding" FILES ${CODING_SOURCES})
|
source_group("Source Files\\coding" FILES ${CODING_SOURCES})
|
||||||
source_group("Source Files\\layout" FILES ${LAYOUT_SOURCES})
|
source_group("Source Files\\layout" FILES ${LAYOUT_SOURCES})
|
||||||
source_group("Source Files\\meta" FILES ${META_SOURCES})
|
source_group("Source Files\\meta" FILES ${META_SOURCES})
|
||||||
source_group("Source Files\\ext" FILES ${EXT_SOURCES})
|
|
||||||
|
|
||||||
add_library(libvgmstream STATIC
|
add_library(libvgmstream STATIC
|
||||||
${CODING_HEADERS}
|
${CODING_HEADERS}
|
||||||
@ -33,7 +29,6 @@ add_library(libvgmstream STATIC
|
|||||||
${META_HEADERS}
|
${META_HEADERS}
|
||||||
${META_SOURCES}
|
${META_SOURCES}
|
||||||
${EXT_HEADERS}
|
${EXT_HEADERS}
|
||||||
${EXT_SOURCES}
|
|
||||||
${MAIN_HEADERS}
|
${MAIN_HEADERS}
|
||||||
${MAIN_SOURCES})
|
${MAIN_SOURCES})
|
||||||
|
|
||||||
|
@ -10,10 +10,8 @@ SUBDIRS = coding layout meta
|
|||||||
# sources/headers are updated automatically by ./bootstrap script (not all headers are needed though)
|
# sources/headers are updated automatically by ./bootstrap script (not all headers are needed though)
|
||||||
libvgmstream_la_LDFLAGS = coding/libcoding.la layout/liblayout.la meta/libmeta.la
|
libvgmstream_la_LDFLAGS = coding/libcoding.la layout/liblayout.la meta/libmeta.la
|
||||||
libvgmstream_la_SOURCES = (auto-updated)
|
libvgmstream_la_SOURCES = (auto-updated)
|
||||||
libvgmstream_la_SOURCES += ../ext_libs/clHCA.c
|
|
||||||
libvgmstream_la_LIBADD = -lm
|
libvgmstream_la_LIBADD = -lm
|
||||||
EXTRA_DIST = (auto-updated)
|
EXTRA_DIST = (auto-updated)
|
||||||
EXTRA_DIST += ../ext_includes/clHCA.h
|
|
||||||
|
|
||||||
AM_CFLAGS += -DVGM_USE_G7221
|
AM_CFLAGS += -DVGM_USE_G7221
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ static void transform(int32_t* invbuf, int32_t* tmpbuf) {
|
|||||||
for (lpc1 = 0; lpc1 < 12 - 2; lpc1++) {
|
for (lpc1 = 0; lpc1 < 12 - 2; lpc1++) {
|
||||||
int sub1, sub2;
|
int sub1, sub2;
|
||||||
int i1, i2, i3, i4;
|
int i1, i2, i3, i4;
|
||||||
int64_t cos1, sin1, cos2, sin2; /* needs i64 to force 64b ops (avoid overflows) */
|
int64_t cos1, sin1, cos2, sin2; /* needs i64 to force 64b ops (avoid overflows) then converted to i32 */
|
||||||
|
|
||||||
cos1 = (int64_t)sincos_table[sc1 + 1024];
|
cos1 = (int64_t)sincos_table[sc1 + 1024];
|
||||||
sin1 = (int64_t)sincos_table[sc1 + 0];
|
sin1 = (int64_t)sincos_table[sc1 + 0];
|
||||||
@ -153,8 +153,8 @@ static void transform(int32_t* invbuf, int32_t* tmpbuf) {
|
|||||||
sub2 = tmpbuf[i1 + 1] - tmpbuf[i2 + 1];
|
sub2 = tmpbuf[i1 + 1] - tmpbuf[i2 + 1];
|
||||||
invbuf[i1 + 1] += invbuf[i2 + 1];
|
invbuf[i1 + 1] += invbuf[i2 + 1];
|
||||||
tmpbuf[i1 + 1] += tmpbuf[i2 + 1];
|
tmpbuf[i1 + 1] += tmpbuf[i2 + 1];
|
||||||
invbuf[i2 + 1] = ((sub1 * cos1) >> 12) + ((sub2 * sin1) >> 12);
|
invbuf[i2 + 1] = (int32_t)( ((sub1 * cos1) >> 12) + ((sub2 * sin1) >> 12) );
|
||||||
tmpbuf[i2 + 1] = ((sub2 * cos1) >> 12) - ((sub1 * sin1) >> 12);
|
tmpbuf[i2 + 1] = (int32_t)( ((sub2 * cos1) >> 12) - ((sub1 * sin1) >> 12) );
|
||||||
|
|
||||||
sub1 = invbuf[i3 + 0] - invbuf[i4 + 0];
|
sub1 = invbuf[i3 + 0] - invbuf[i4 + 0];
|
||||||
sub2 = tmpbuf[i3 + 0] - tmpbuf[i4 + 0];
|
sub2 = tmpbuf[i3 + 0] - tmpbuf[i4 + 0];
|
||||||
@ -167,8 +167,8 @@ static void transform(int32_t* invbuf, int32_t* tmpbuf) {
|
|||||||
sub2 = tmpbuf[i3 + 1] - tmpbuf[i4 + 1];
|
sub2 = tmpbuf[i3 + 1] - tmpbuf[i4 + 1];
|
||||||
invbuf[i3 + 1] += invbuf[i4 + 1];
|
invbuf[i3 + 1] += invbuf[i4 + 1];
|
||||||
tmpbuf[i3 + 1] += tmpbuf[i4 + 1];
|
tmpbuf[i3 + 1] += tmpbuf[i4 + 1];
|
||||||
invbuf[i4 + 1] = ((sub2 * cos1) >> 12) - ((sub1 * sin1) >> 12);
|
invbuf[i4 + 1] = (int32_t)( ((sub2 * cos1) >> 12) - ((sub1 * sin1) >> 12) );
|
||||||
tmpbuf[i4 + 1] = -(((sub1 * cos1) >> 12) + ((sub2 * sin1) >> 12));
|
tmpbuf[i4 + 1] = (int32_t)( -(((sub1 * cos1) >> 12) + ((sub2 * sin1) >> 12)) );
|
||||||
|
|
||||||
i1 += step1;
|
i1 += step1;
|
||||||
i2 += step1;
|
i2 += step1;
|
||||||
@ -194,15 +194,15 @@ static void transform(int32_t* invbuf, int32_t* tmpbuf) {
|
|||||||
sub2 = tmpbuf[i1] - tmpbuf[i2];
|
sub2 = tmpbuf[i1] - tmpbuf[i2];
|
||||||
invbuf[i1] += invbuf[i2];
|
invbuf[i1] += invbuf[i2];
|
||||||
tmpbuf[i1] += tmpbuf[i2];
|
tmpbuf[i1] += tmpbuf[i2];
|
||||||
invbuf[i2] = ((sub1 * cos2) >> 12) + ((sub2 * sin2) >> 12);
|
invbuf[i2] = (int32_t)( ((sub1 * cos2) >> 12) + ((sub2 * sin2) >> 12) );
|
||||||
tmpbuf[i2] = ((sub2 * cos2) >> 12) - ((sub1 * sin2) >> 12);
|
tmpbuf[i2] = (int32_t)( ((sub2 * cos2) >> 12) - ((sub1 * sin2) >> 12) );
|
||||||
|
|
||||||
sub1 = invbuf[i3] - invbuf[i4];
|
sub1 = invbuf[i3] - invbuf[i4];
|
||||||
sub2 = tmpbuf[i3] - tmpbuf[i4];
|
sub2 = tmpbuf[i3] - tmpbuf[i4];
|
||||||
invbuf[i3] += invbuf[i4];
|
invbuf[i3] += invbuf[i4];
|
||||||
tmpbuf[i3] += tmpbuf[i4];
|
tmpbuf[i3] += tmpbuf[i4];
|
||||||
invbuf[i4] = ((sub2 * cos2) >> 12) - ((sub1 * sin2) >> 12);
|
invbuf[i4] = (int32_t)( ((sub2 * cos2) >> 12) - ((sub1 * sin2) >> 12) );
|
||||||
tmpbuf[i4] = -(((sub1 * cos2) >> 12) + ((sub2 * sin2) >> 12));
|
tmpbuf[i4] = (int32_t)( -(((sub1 * cos2) >> 12) + ((sub2 * sin2) >> 12)) );
|
||||||
|
|
||||||
i1 += step1;
|
i1 += step1;
|
||||||
i2 += step1;
|
i2 += step1;
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
#define _CODING_H
|
#define _CODING_H
|
||||||
|
|
||||||
#include "../vgmstream.h"
|
#include "../vgmstream.h"
|
||||||
|
//todo remove
|
||||||
|
#include "hca_decoder_clhca.h"
|
||||||
|
|
||||||
/* adx_decoder */
|
/* adx_decoder */
|
||||||
void decode_adx(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int32_t frame_bytes, coding_t coding_type);
|
void decode_adx(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int32_t frame_bytes, coding_t coding_type);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "coding.h"
|
#include "coding.h"
|
||||||
#include <clHCA.h>
|
#include "hca_decoder_clhca.h"
|
||||||
|
|
||||||
|
|
||||||
struct hca_codec_data {
|
struct hca_codec_data {
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// Includes
|
// Includes
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
#include "clHCA.h"
|
#include "hca_decoder_clhca.h"
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
@ -100,7 +100,7 @@ fail:
|
|||||||
|
|
||||||
/* for simple style speex (seen in EA-Speex and libspeex's sampledec.c) */
|
/* for simple style speex (seen in EA-Speex and libspeex's sampledec.c) */
|
||||||
static int read_frame(speex_codec_data* data, VGMSTREAMCHANNEL* stream) {
|
static int read_frame(speex_codec_data* data, VGMSTREAMCHANNEL* stream) {
|
||||||
uint8_t bytes;
|
size_t bytes;
|
||||||
|
|
||||||
data->frame_size = read_u8(stream->offset, stream->streamfile);
|
data->frame_size = read_u8(stream->offset, stream->streamfile);
|
||||||
stream->offset += 0x01;
|
stream->offset += 0x01;
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\ext_includes\clHCA.h" />
|
<ClInclude Include="coding\hca_decoder_clhca.h" />
|
||||||
<ClInclude Include="coding\mpeg_bitreader.h" />
|
<ClInclude Include="coding\mpeg_bitreader.h" />
|
||||||
<ClInclude Include="coding\mpeg_decoder.h" />
|
<ClInclude Include="coding\mpeg_decoder.h" />
|
||||||
<ClInclude Include="coding\vorbis_bitreader.h" />
|
<ClInclude Include="coding\vorbis_bitreader.h" />
|
||||||
@ -622,6 +622,7 @@
|
|||||||
<ClCompile Include="coding\g7221_decoder_aes.c" />
|
<ClCompile Include="coding\g7221_decoder_aes.c" />
|
||||||
<ClCompile Include="coding\g7221_decoder_lib.c" />
|
<ClCompile Include="coding\g7221_decoder_lib.c" />
|
||||||
<ClCompile Include="coding\hca_decoder.c" />
|
<ClCompile Include="coding\hca_decoder.c" />
|
||||||
|
<ClCompile Include="coding\hca_decoder_clhca.c" />
|
||||||
<ClCompile Include="coding\ima_decoder.c" />
|
<ClCompile Include="coding\ima_decoder.c" />
|
||||||
<ClCompile Include="coding\imuse_decoder.c" />
|
<ClCompile Include="coding\imuse_decoder.c" />
|
||||||
<ClCompile Include="coding\l5_555_decoder.c" />
|
<ClCompile Include="coding\l5_555_decoder.c" />
|
||||||
@ -706,7 +707,6 @@
|
|||||||
<ClCompile Include="layout\blocked_xa.c" />
|
<ClCompile Include="layout\blocked_xa.c" />
|
||||||
<ClCompile Include="layout\blocked_xa_aiff.c" />
|
<ClCompile Include="layout\blocked_xa_aiff.c" />
|
||||||
<ClCompile Include="layout\blocked_xvas.c" />
|
<ClCompile Include="layout\blocked_xvas.c" />
|
||||||
<ClCompile Include="..\ext_libs\clHCA.c" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
@ -263,8 +263,8 @@
|
|||||||
<ClInclude Include="layout\layout.h">
|
<ClInclude Include="layout\layout.h">
|
||||||
<Filter>layout\Header Files</Filter>
|
<Filter>layout\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\ext_includes\clHCA.h">
|
<ClInclude Include="coding\hca_decoder_clhca.h">
|
||||||
<Filter>ext_libs\Header Files</Filter>
|
<Filter>coding\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="coding\mpeg_bitreader.h">
|
<ClInclude Include="coding\mpeg_bitreader.h">
|
||||||
<Filter>coding\Header Files</Filter>
|
<Filter>coding\Header Files</Filter>
|
||||||
@ -1333,6 +1333,9 @@
|
|||||||
<ClCompile Include="coding\hca_decoder.c">
|
<ClCompile Include="coding\hca_decoder.c">
|
||||||
<Filter>coding\Source Files</Filter>
|
<Filter>coding\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="coding\hca_decoder_clhca.c">
|
||||||
|
<Filter>coding\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="coding\ima_decoder.c">
|
<ClCompile Include="coding\ima_decoder.c">
|
||||||
<Filter>coding\Source Files</Filter>
|
<Filter>coding\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -1789,9 +1792,6 @@
|
|||||||
<ClCompile Include="coding\g719_decoder.c">
|
<ClCompile Include="coding\g719_decoder.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\ext_libs\clHCA.c">
|
|
||||||
<Filter>ext_libs\Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="meta\ffmpeg.c">
|
<ClCompile Include="meta\ffmpeg.c">
|
||||||
<Filter>meta\Source Files</Filter>
|
<Filter>meta\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "meta.h"
|
#include "meta.h"
|
||||||
#include "hca_keys.h"
|
#include "hca_keys.h"
|
||||||
#include "../coding/coding.h"
|
#include "../coding/coding.h"
|
||||||
#include <clHCA.h>
|
#include "../coding/hca_decoder_clhca.h"
|
||||||
|
|
||||||
//#define HCA_BRUTEFORCE
|
//#define HCA_BRUTEFORCE
|
||||||
#ifdef HCA_BRUTEFORCE
|
#ifdef HCA_BRUTEFORCE
|
||||||
|
@ -42,8 +42,6 @@ enum {
|
|||||||
#include <aacdecoder_lib.h>
|
#include <aacdecoder_lib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <clHCA.h>
|
|
||||||
|
|
||||||
#include "coding/g72x_state.h"
|
#include "coding/g72x_state.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,16 +14,18 @@ endif
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
### main defs
|
### main defs
|
||||||
|
|
||||||
|
CFLAGS += $(DEF_CFLAGS) $(EXTRA_CFLAGS)
|
||||||
|
LDFLAGS += -L../src -lvgmstream -lm $(EXTRA_LDFLAGS)
|
||||||
|
TARGET_EXT_LIBS =
|
||||||
|
|
||||||
OUTPUT_WINAMP = in_vgmstream.dll
|
OUTPUT_WINAMP = in_vgmstream.dll
|
||||||
|
|
||||||
ifeq ($(TARGET_OS),Windows_NT)
|
ifeq ($(TARGET_OS),Windows_NT)
|
||||||
CFLAGS += -m32 -DUSE_ALLOCA -DWIN32 -I../ext_includes/ffmpeg
|
CFLAGS += -DWIN32 -m32 -DUSE_ALLOCA -I../ext_includes
|
||||||
|
LDFLAGS += -L../ext_libs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += $(DEF_CFLAGS) -I../ext_includes $(EXTRA_CFLAGS)
|
|
||||||
LDFLAGS += -L../src -L../ext_libs -lvgmstream -lm $(EXTRA_LDFLAGS)
|
|
||||||
TARGET_EXT_LIBS =
|
|
||||||
|
|
||||||
CFLAGS += $(LIBS_CFLAGS)
|
CFLAGS += $(LIBS_CFLAGS)
|
||||||
LDFLAGS += $(LIBS_LDFLAGS)
|
LDFLAGS += $(LIBS_LDFLAGS)
|
||||||
TARGET_EXT_LIBS += $(LIBS_TARGET_EXT_LIBS)
|
TARGET_EXT_LIBS += $(LIBS_TARGET_EXT_LIBS)
|
||||||
|
@ -60,7 +60,6 @@ static void wasf_get_name(WINAMP_STREAMFILE* sf, char* buffer, size_t length) {
|
|||||||
|
|
||||||
static STREAMFILE *wasf_open(WINAMP_STREAMFILE* sf, const char* const filename, size_t buffersize) {
|
static STREAMFILE *wasf_open(WINAMP_STREAMFILE* sf, const char* const filename, size_t buffersize) {
|
||||||
in_char wpath[PATH_LIMIT];
|
in_char wpath[PATH_LIMIT];
|
||||||
char name[PATH_LIMIT];
|
|
||||||
|
|
||||||
if (!filename)
|
if (!filename)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -69,23 +68,25 @@ static STREAMFILE *wasf_open(WINAMP_STREAMFILE* sf, const char* const filename,
|
|||||||
/* When enabling this for MSVC it'll seemingly work, but there are issues possibly related to underlying
|
/* When enabling this for MSVC it'll seemingly work, but there are issues possibly related to underlying
|
||||||
* IO buffers when using dup(), noticeable by re-opening the same streamfile with small buffer sizes
|
* IO buffers when using dup(), noticeable by re-opening the same streamfile with small buffer sizes
|
||||||
* (reads garbage). This reportedly causes issues in Android too */
|
* (reads garbage). This reportedly causes issues in Android too */
|
||||||
|
{
|
||||||
|
char name[PATH_LIMIT];
|
||||||
|
sf->stdiosf->get_name(sf->stdiosf, name, PATH_LIMIT);
|
||||||
|
/* if same name, duplicate the file descriptor we already have open */ //unsure if all this is needed
|
||||||
|
if (sf->infile_ref && !strcmp(name,filename)) {
|
||||||
|
int new_fd;
|
||||||
|
FILE *new_file;
|
||||||
|
|
||||||
sf->stdiosf->get_name(sf->stdiosf, name, PATH_LIMIT);
|
if (((new_fd = dup(fileno(sf->infile_ref))) >= 0) && (new_file = wa_fdopen(new_fd))) {
|
||||||
/* if same name, duplicate the file descriptor we already have open */ //unsure if all this is needed
|
STREAMFILE *new_sf = open_winamp_streamfile_by_file(new_file, filename);
|
||||||
if (sf->infile_ref && !strcmp(name,filename)) {
|
if (new_sf)
|
||||||
int new_fd;
|
return new_sf;
|
||||||
FILE *new_file;
|
fclose(new_file);
|
||||||
|
}
|
||||||
|
if (new_fd >= 0 && !new_file)
|
||||||
|
close(new_fd); /* fdopen may fail when opening too many files */
|
||||||
|
|
||||||
if (((new_fd = dup(fileno(sf->infile_ref))) >= 0) && (new_file = wa_fdopen(new_fd))) {
|
/* on failure just close and try the default path (which will probably fail a second time) */
|
||||||
STREAMFILE *new_sf = open_winamp_streamfile_by_file(new_file, filename);
|
|
||||||
if (new_sf)
|
|
||||||
return new_sf;
|
|
||||||
fclose(new_file);
|
|
||||||
}
|
}
|
||||||
if (new_fd >= 0 && !new_file)
|
|
||||||
close(new_fd); /* fdopen may fail when opening too many files */
|
|
||||||
|
|
||||||
/* on failure just close and try the default path (which will probably fail a second time) */
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -70,8 +70,8 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..;../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
@ -97,8 +97,8 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>..;../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
|
@ -17,7 +17,7 @@ endif
|
|||||||
OUTPUT_XMPLAY = xmp-vgmstream.dll
|
OUTPUT_XMPLAY = xmp-vgmstream.dll
|
||||||
|
|
||||||
ifeq ($(TARGET_OS),Windows_NT)
|
ifeq ($(TARGET_OS),Windows_NT)
|
||||||
CFLAGS += -m32 -DUSE_ALLOCA -DWIN32 -I../ext_includes/ffmpeg
|
CFLAGS += -m32 -DUSE_ALLOCA -DWIN32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += $(DEF_CFLAGS) -I../ext_includes $(EXTRA_CFLAGS)
|
CFLAGS += $(DEF_CFLAGS) -I../ext_includes $(EXTRA_CFLAGS)
|
||||||
|
@ -61,8 +61,8 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..;../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGMSTREAM_VERSION_AUTO;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
@ -85,8 +85,8 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>..;../ext_includes;../ext_includes/ffmpeg;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;VGMSTREAM_VERSION_AUTO;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;VGMSTREAM_VERSION_AUTO;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
@ -629,7 +629,7 @@ double WINAPI xmplay_GetGranularity() {
|
|||||||
/* seek to a position (in granularity units), return new position or -1 = failed */
|
/* seek to a position (in granularity units), return new position or -1 = failed */
|
||||||
double WINAPI xmplay_SetPosition(DWORD pos) {
|
double WINAPI xmplay_SetPosition(DWORD pos) {
|
||||||
double cpos;
|
double cpos;
|
||||||
int seek_sample = pos * xmplay_GetGranularity() * vgmstream->sample_rate;
|
int32_t seek_sample = (int32_t)(pos * xmplay_GetGranularity() * vgmstream->sample_rate);
|
||||||
|
|
||||||
if (pos == XMPIN_POS_AUTOLOOP || pos == XMPIN_POS_LOOP)
|
if (pos == XMPIN_POS_AUTOLOOP || pos == XMPIN_POS_LOOP)
|
||||||
xmplay_doneloop = 1;
|
xmplay_doneloop = 1;
|
||||||
@ -714,10 +714,9 @@ static DWORD WINAPI xmplay_GetSubSongs(float *length) {
|
|||||||
/* get times for all subsongs */
|
/* get times for all subsongs */
|
||||||
//todo request updating playlist update every subsong change instead?
|
//todo request updating playlist update every subsong change instead?
|
||||||
{
|
{
|
||||||
int stream_length_samples;
|
|
||||||
|
|
||||||
/* not good for vgmstream as would mean re-parsing many times */
|
/* not good for vgmstream as would mean re-parsing many times */
|
||||||
//int i;
|
//int i;
|
||||||
|
//*length = 0;
|
||||||
//for (i = 0; i < subsong_count; i++) {
|
//for (i = 0; i < subsong_count; i++) {
|
||||||
// float subsong_length = ...
|
// float subsong_length = ...
|
||||||
// *length += subsong_length;
|
// *length += subsong_length;
|
||||||
|
Loading…
Reference in New Issue
Block a user