diff --git a/.github/workflows/vs-win.yml b/.github/workflows/vs-win.yml index 72d7ca18..fac26780 100644 --- a/.github/workflows/vs-win.yml +++ b/.github/workflows/vs-win.yml @@ -38,11 +38,11 @@ jobs: run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 PackageArtifacts # upload to "actions" tab artifacts (can only make a single .zip from a dir's files) - - name: Upload foobar2000 component 32-bit artifact + - name: Upload foobar2000 component artifact uses: actions/upload-artifact@v3 with: name: foo_input_vgmstream.fb2k-component - path: ${{github.workspace}}\bin\artifacts\foobar2000-x32 + path: ${{github.workspace}}\bin\artifacts\foobar2000 - name: Upload CLI tools 32-bit artifact uses: actions/upload-artifact@v3 @@ -56,17 +56,11 @@ jobs: name: vgmstream-win64 path: ${{github.workspace}}\bin\artifacts\cli-x64 - - name: debug symbols artifact + - name: debug symbols artifact (all) uses: actions/upload-artifact@v3 with: - name: debug-symbols-pdb-32 - path: ${{github.workspace}}\bin\artifacts\pdb-x32 - - - name: debug symbols artifact - uses: actions/upload-artifact@v3 - with: - name: debug-symbols-pdb-64 - path: ${{github.workspace}}\bin\artifacts\pdb-x64 + name: debug-symbols-pdb + path: ${{github.workspace}}\bin\artifacts\pdb # uploads current assets to vgmstream-releases (token only works on merges) - name: Upload artifacts to vgmstream-releases diff --git a/fb2k/foo_input_vgmstream.vcxproj b/fb2k/foo_input_vgmstream.vcxproj index b66c8624..80274a24 100644 --- a/fb2k/foo_input_vgmstream.vcxproj +++ b/fb2k/foo_input_vgmstream.vcxproj @@ -50,12 +50,18 @@ + + + + /d2notypeopt %(AdditionalOptions) + stdcpp17 + + $(VFooAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;$(VFooPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDebugDLL - /d2notypeopt %(AdditionalOptions) $(VFooAdditionalDependencies32);%(AdditionalDependencies) @@ -68,7 +74,6 @@ $(VFooAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;$(VFooPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDebugDLL - /d2notypeopt %(AdditionalOptions) $(VFooAdditionalDependencies64);%(AdditionalDependencies) @@ -81,7 +86,6 @@ $(VFooAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;$(VFooPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDLL - /d2notypeopt %(AdditionalOptions) $(VFooAdditionalDependencies32);%(AdditionalDependencies) @@ -97,7 +101,6 @@ $(VFooAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;$(VFooPreprocessorDefinitions);%(PreprocessorDefinitions) MultiThreadedDLL - /d2notypeopt %(AdditionalOptions) $(VFooAdditionalDependencies64);%(AdditionalDependencies) diff --git a/fb2k/foo_vgmstream.cpp b/fb2k/foo_vgmstream.cpp index 3e523298..421ae85c 100644 --- a/fb2k/foo_vgmstream.cpp +++ b/fb2k/foo_vgmstream.cpp @@ -98,6 +98,9 @@ void input_vgmstream::open(service_ptr_t p_filehint, const char * p_path, if ( p_filehint.is_empty() ) input_open_file_helper( p_filehint, filename, p_reason, p_abort ); stats = p_filehint->get_stats( p_abort ); + + uint32_t flags = stats2_legacy; //foobar2000_io.stats2_xxx, not sure about the implications + stats2 = p_filehint->get_stats2_(flags, p_abort); // ??? } switch(p_reason) { @@ -248,6 +251,10 @@ t_filestats input_vgmstream::get_file_stats(abort_callback & p_abort) { return stats; } +t_filestats2 input_vgmstream::get_stats2(uint32_t f, abort_callback & p_abort) { + return stats2; +} + // called right before actually playing (decoding) a song/subsong void input_vgmstream::decode_initialize(t_uint32 p_subsong, unsigned p_flags, abort_callback & p_abort) { diff --git a/fb2k/foo_vgmstream.h b/fb2k/foo_vgmstream.h index bb7f20ca..e3f0ef30 100644 --- a/fb2k/foo_vgmstream.h +++ b/fb2k/foo_vgmstream.h @@ -19,6 +19,7 @@ class input_vgmstream : public input_stubs { t_uint32 get_subsong(unsigned p_index); void get_info(t_uint32 p_subsong, file_info & p_info, abort_callback & p_abort); t_filestats get_file_stats(abort_callback & p_abort); + t_filestats2 get_stats2(uint32_t f, abort_callback & p_abort); void decode_initialize(t_uint32 p_subsong, unsigned p_flags, abort_callback & p_abort); bool decode_run(audio_chunk & p_chunk, abort_callback & p_abort); @@ -44,6 +45,7 @@ class input_vgmstream : public input_stubs { //service_ptr_t m_file; pfc::string8 filename; t_filestats stats; + t_filestats2 stats2; /* state */ VGMSTREAM* vgmstream; diff --git a/msvc-build.ps1 b/msvc-build.ps1 index 0fe155fd..c2459dfa 100644 --- a/msvc-build.ps1 +++ b/msvc-build.ps1 @@ -90,7 +90,7 @@ function Init #Download "https://www.foobar2000.org/files/SDK-2018-01-11.zip" "$dependencies\foobar.zip" # foobar: sdk static mirror - Download "https://github.com/vgmstream/vgmstream-deps/raw/master/foobar2000/SDK-2022-01-04.zip" "$dependencies\foobar.zip" + Download "https://github.com/vgmstream/vgmstream-deps/raw/master/foobar2000/SDK-2023-01-18.zip" "$dependencies\foobar.zip" Unzip "$dependencies\foobar.zip" "$dependencies\foobar" # foobar: aac (not used ATM) @@ -142,11 +142,14 @@ function CallMsbuild # main build (pass config separate and not as a single string) if (!$log) { if ($platform) { - throw "has platform" & $msbuild $solution $config $platform $toolset $sdk $target /m } else { & $msbuild $solution $config /p:Platform=Win32 $toolset $sdk $target /m + if ($LASTEXITCODE -ne 0) { + throw "MSBuild failed" + } + & $msbuild $solution $config /p:Platform=x64 $toolset $sdk $target /m } } @@ -156,12 +159,15 @@ function CallMsbuild } else { & $msbuild $solution $config /p:Platform=Win32 $toolset $sdk $target /m > "msvc-build.log" + if ($LASTEXITCODE -ne 0) { + throw "MSBuild failed" + } & $msbuild $solution $config /p:Platform=x64 $toolset $sdk $target /m > "msvc-build.log" } } if ($LASTEXITCODE -ne 0) { - throw "MSBuild failed with error code $LASTEXITCODE" + throw "MSBuild failed" } } @@ -217,10 +223,12 @@ $fb2kFiles32 = @( ) $fb2kFiles64 = @( - "ext_libs/dll-x64/*.dll", - "x64/$configuration/foo_input_vgmstream.dll", - "README.md" - "doc/USAGE.md" + "ext_libs/dll-x64/*.dll" + "x64/$configuration/foo_input_vgmstream.dll" +) + +$fb2kFiles_remove = @( + "bin/foobar2000/jansson.dll" ) $cliPdbFiles32 = @( @@ -255,16 +263,16 @@ function MakePackage Compress-Archive $cliFiles32 bin/vgmstream-win.zip -Force Compress-Archive $cliFiles64 bin/vgmstream-win64.zip -Force - Compress-Archive $cliPdbFiles32 bin/vgmstream-win.pdb.zip -Force - Compress-Archive $cliPdbFiles64 bin/vgmstream-win64.pdb.zip -Force - Compress-Archive $fb2kFiles32 bin/foo_input_vgmstream.zip -Force + # foobar 32 and 64-bit components go to the same file, in an extra "x64" subdir for the later + mkdir -Force bin/foobar2000 + mkdir -Force bin/foobar2000/x64 + Copy-Item $fb2kFiles32 bin/foobar2000/ -Recurse -Force + Copy-Item $fb2kFiles64 bin/foobar2000/x64/ -Recurse -Force + Remove-Item $fb2kFiles_remove -ErrorAction Ignore + Compress-Archive -Path bin/foobar2000/* bin/foo_input_vgmstream.zip -Force Move-Item bin/foo_input_vgmstream.zip bin/foo_input_vgmstream.fb2k-component -Force - #Compress-Archive $fb2kFiles64 bin/foo_input_vgmstream64.zip -Force - #Move-Item $configuration/foo_input_vgmstream64.zip bin/foo_input_vgmstream64.fb2k-component -Force - - Compress-Archive $fb2kPdbFiles32 bin/foo_input_vgmstream.pdb.zip -Force - #Compress-Archive $fb2kPdbFiles64 bin/foo_input_vgmstream64.pdb.zip -Force + Remove-Item -Path bin/foobar2000 -Recurse -ErrorAction Ignore } @@ -275,19 +283,20 @@ function MakePackageArtifacts mkdir -Force bin/artifacts/cli-x32 mkdir -Force bin/artifacts/cli-x64 - mkdir -Force bin/artifacts/foobar2000-x32 - #mkdir -Force bin/artifacts/foobar2000-x64 - mkdir -Force bin/artifacts/pdb-x32 - mkdir -Force bin/artifacts/pdb-x64 + mkdir -Force bin/artifacts/foobar2000 + mkdir -Force bin/artifacts/foobar2000/x64 + mkdir -Force bin/artifacts/pdb/x32 + mkdir -Force bin/artifacts/pdb/x64 Copy-Item $cliFiles32 bin/artifacts/cli-x32/ -Recurse -Force Copy-Item $cliFiles64 bin/artifacts/cli-x64/ -Recurse -Force - Copy-Item $fb2kFiles32 bin/artifacts/foobar2000-x32/ -Recurse -Force - #Copy-Item $fb2kFiles64 bin/artifacts/foobar2000-x64/ -Recurse -Force - Copy-Item $cliPdbFiles32 bin/artifacts/pdb-x32/ -Recurse -Force - Copy-Item $fb2kPdbFiles32 bin/artifacts/pdb-x32/ -Recurse -Force - Copy-Item $cliPdbFiles64 bin/artifacts/pdb-x64/ -Recurse -Force - #Copy-Item $fb2kPdbFiles64 bin/artifacts/pdb-x64/ -Recurse -Force + Copy-Item $fb2kFiles32 bin/artifacts/foobar2000/ -Recurse -Force + Copy-Item $fb2kFiles64 bin/artifacts/foobar2000/x64/ -Recurse -Force + Remove-Item $fb2kFiles_remove -ErrorAction Ignore + Copy-Item $cliPdbFiles32 bin/artifacts/pdb/x32/ -Recurse -Force + Copy-Item $fb2kPdbFiles32 bin/artifacts/pdb/x32/ -Recurse -Force + Copy-Item $cliPdbFiles64 bin/artifacts/pdb/x64/ -Recurse -Force + Copy-Item $fb2kPdbFiles64 bin/artifacts/pdb/x64/ -Recurse -Force } diff --git a/vgmstream_full.sln b/vgmstream_full.sln index 40a0c2f9..b545939f 100644 --- a/vgmstream_full.sln +++ b/vgmstream_full.sln @@ -76,44 +76,44 @@ Global {42D86561-8CE4-40F5-86CE-58C986B77502}.Release|x64.ActiveCfg = Release|Win32 {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|Win32.ActiveCfg = Debug|Win32 {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|Win32.Build.0 = Debug|Win32 -# {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|x64.ActiveCfg = Debug|x64 -# {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|x64.Build.0 = Debug|x64 + {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|x64.ActiveCfg = Debug|x64 + {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|x64.Build.0 = Debug|x64 {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|Win32.ActiveCfg = Release|Win32 {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|Win32.Build.0 = Release|Win32 -# {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|x64.ActiveCfg = Release|x64 -# {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|x64.Build.0 = Release|x64 + {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|x64.ActiveCfg = Release|x64 + {F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|x64.Build.0 = Release|x64 {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.ActiveCfg = Debug|Win32 {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.Build.0 = Debug|Win32 -# {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.ActiveCfg = Debug|x64 -# {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.Build.0 = Debug|x64 + {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.ActiveCfg = Debug|x64 + {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.Build.0 = Debug|x64 {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.ActiveCfg = Release|Win32 {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.Build.0 = Release|Win32 -# {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.ActiveCfg = Release|x64 -# {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.Build.0 = Release|x64 + {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.ActiveCfg = Release|x64 + {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.Build.0 = Release|x64 {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.ActiveCfg = Debug|Win32 {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.Build.0 = Debug|Win32 -# {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.ActiveCfg = Debug|x64 -# {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.Build.0 = Debug|x64 + {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.ActiveCfg = Debug|x64 + {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.Build.0 = Debug|x64 {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.ActiveCfg = Release|Win32 {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.Build.0 = Release|Win32 -# {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.ActiveCfg = Release|x64 -# {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.Build.0 = Release|x64 + {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.ActiveCfg = Release|x64 + {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.Build.0 = Release|x64 {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.ActiveCfg = Debug|Win32 {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.Build.0 = Debug|Win32 -# {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.ActiveCfg = Debug|x64 -# {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.Build.0 = Debug|x64 + {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.ActiveCfg = Debug|x64 + {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.Build.0 = Debug|x64 {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.ActiveCfg = Release|Win32 {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.Build.0 = Release|Win32 -# {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.ActiveCfg = Release|x64 -# {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.Build.0 = Release|x64 + {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.ActiveCfg = Release|x64 + {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.Build.0 = Release|x64 {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.ActiveCfg = Debug|Win32 {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.Build.0 = Debug|Win32 -# {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.ActiveCfg = Release FB2K|x64 -# {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.Build.0 = Release FB2K|x64 + {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.ActiveCfg = Release FB2K|x64 + {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.Build.0 = Release FB2K|x64 {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.ActiveCfg = Release|Win32 {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.Build.0 = Release|Win32 -# {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.ActiveCfg = Release|x64 -# {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.Build.0 = Release|x64 + {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.ActiveCfg = Release|x64 + {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.Build.0 = Release|x64 {49AF76F7-CBA0-4486-9DDF-51F30DF45F33}.Debug|Win32.ActiveCfg = Debug|Win32 {49AF76F7-CBA0-4486-9DDF-51F30DF45F33}.Debug|Win32.Build.0 = Debug|Win32 {49AF76F7-CBA0-4486-9DDF-51F30DF45F33}.Debug|x64.ActiveCfg = Debug|Win32 @@ -123,12 +123,12 @@ Global {49AF76F7-CBA0-4486-9DDF-51F30DF45F33}.Release|x64.ActiveCfg = Release|Win32 {7729EB82-4069-4414-964B-AD399091A03F}.Debug|Win32.ActiveCfg = Debug|Win32 {7729EB82-4069-4414-964B-AD399091A03F}.Debug|Win32.Build.0 = Debug|Win32 -# {7729EB82-4069-4414-964B-AD399091A03F}.Debug|x64.ActiveCfg = Debug|x64 -# {7729EB82-4069-4414-964B-AD399091A03F}.Debug|x64.Build.0 = Debug|x64 + {7729EB82-4069-4414-964B-AD399091A03F}.Debug|x64.ActiveCfg = Debug|x64 + {7729EB82-4069-4414-964B-AD399091A03F}.Debug|x64.Build.0 = Debug|x64 {7729EB82-4069-4414-964B-AD399091A03F}.Release|Win32.ActiveCfg = Release|Win32 {7729EB82-4069-4414-964B-AD399091A03F}.Release|Win32.Build.0 = Release|Win32 -# {7729EB82-4069-4414-964B-AD399091A03F}.Release|x64.ActiveCfg = Release|x64 -# {7729EB82-4069-4414-964B-AD399091A03F}.Release|x64.Build.0 = Release|x64 + {7729EB82-4069-4414-964B-AD399091A03F}.Release|x64.ActiveCfg = Release|x64 + {7729EB82-4069-4414-964B-AD399091A03F}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vgmstream_msvc.props b/vgmstream_msvc.props index 3e96c841..6734d642 100644 --- a/vgmstream_msvc.props +++ b/vgmstream_msvc.props @@ -36,7 +36,7 @@ ..;../ext_includes;../ext_includes/ffmpeg;../ext_libs/Getopt;$(VCmnDependenciesDir)/qaac/mp4v2/include;$(VCmnDependenciesDir)/fdk-aac/libSYS/include;$(VCmnDependenciesDir)/fdk-aac/libAACdec/include ..;../ext_includes;../ext_libs/Getopt - ..;$(VCmnDependenciesDir)/wtl/include;$(VCmnDependenciesDir)/foobar + ..;$(VCmnDependenciesDir)/wtl/include;$(VCmnDependenciesDir)/foobar;$(VCmnDependenciesDir)/foobar/foobar2000 .. VGMSTREAM_VERSION_AUTO;VGM_LOG_OUTPUT;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_ATRAC9;VGM_USE_CELT;VGM_USE_SPEEX @@ -48,7 +48,7 @@ ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib $(VCmnAdditionalDependencies32);../ext_libs/jansson.lib - $(VCmnAdditionalDependencies32);$(VCmnDependenciesDir)/foobar/foobar2000/shared/shared.lib + $(VCmnAdditionalDependencies32);$(VCmnDependenciesDir)/foobar/foobar2000/shared/shared-Win32.lib ../ext_libs/dll-x64/libvorbis.lib;../ext_libs/dll-x64/libmpg123-0.lib;../ext_libs/dll-x64/libg719_decode.lib;../ext_libs/dll-x64/avcodec.lib;../ext_libs/dll-x64/avformat.lib;../ext_libs/dll-x64/avutil.lib;../ext_libs/dll-x64/swresample.lib;../ext_libs/dll-x64/libatrac9.lib;../ext_libs/dll-x64/libcelt-0061.lib;../ext_libs/dll-x64/libcelt-0110.lib;../ext_libs/dll-x64/libspeex-1.lib $(VCmnAdditionalDependencies64) $(VCmnAdditionalDependencies64);$(VCmnDependenciesDir)/foobar/foobar2000/shared/shared-x64.lib