From 200b98c651493c4cb20533d1e5438980ac454cb6 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 10 Oct 2023 20:21:50 +0300
Subject: [PATCH] updated MSVC project file for new sources and added
libwavpack dlls
---
Android.mk | 9 +
VisualC-WinRT/SDL_mixer-UWP.vcxproj | 12 +-
VisualC-WinRT/SDL_mixer-UWP.vcxproj.filters | 42 +-
VisualC/SDL_mixer.vcxproj | 51 ++-
VisualC/SDL_mixer.vcxproj.filters | 34 +-
VisualC/external/include/wavpack/wavpack.h | 433 ++++++++++++++++++
.../external/optional/x64/LICENSE.wavpack.txt | 25 +
.../external/optional/x64/libwavpack-1.dll | Bin 0 -> 174592 bytes
.../external/optional/x86/LICENSE.wavpack.txt | 25 +
.../external/optional/x86/libwavpack-1.dll | Bin 0 -> 167424 bytes
VisualC/native_midi/native_midi.vcxproj | 5 +
VisualC/playmus/playmus.vcxproj | 5 +
VisualC/playwave/playwave.vcxproj | 5 +
VisualC/timidity/timidity.vcxproj | 5 +
14 files changed, 617 insertions(+), 34 deletions(-)
create mode 100644 VisualC/external/include/wavpack/wavpack.h
create mode 100644 VisualC/external/optional/x64/LICENSE.wavpack.txt
create mode 100644 VisualC/external/optional/x64/libwavpack-1.dll
create mode 100644 VisualC/external/optional/x86/LICENSE.wavpack.txt
create mode 100644 VisualC/external/optional/x86/libwavpack-1.dll
diff --git a/Android.mk b/Android.mk
index dada259a..99ac74d9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -26,6 +26,10 @@ SUPPORT_MP3_DRMP3 ?= true
SUPPORT_MP3_MPG123 ?= false
MPG123_LIBRARY_PATH := external/mpg123
+# Enable this if you want to support loading WavPack music via libwavpack
+SUPPORT_WAVPACK ?= true
+WAVPACK_LIBRARY_PATH := external/wavpack
+
# Enable this if you want to support loading MOD music via XMP-lite
SUPPORT_MOD_XMP ?= false
XMP_LIBRARY_PATH := external/libxmp
@@ -51,6 +55,11 @@ ifeq ($(SUPPORT_MP3_MPG123),true)
include $(SDL_MIXER_LOCAL_PATH)/$(MPG123_LIBRARY_PATH)/Android.mk
endif
+# Build the library
+ifeq ($(SUPPORT_WAVPACK),true)
+ include $(SDL_MIXER_LOCAL_PATH)/$(WAVPACK_LIBRARY_PATH)/Android.mk
+endif
+
# Build the library
ifeq ($(SUPPORT_MOD_XMP),true)
include $(SDL_MIXER_LOCAL_PATH)/$(XMP_LIBRARY_PATH)/Android.mk
diff --git a/VisualC-WinRT/SDL_mixer-UWP.vcxproj b/VisualC-WinRT/SDL_mixer-UWP.vcxproj
index dd9db236..32665096 100644
--- a/VisualC-WinRT/SDL_mixer-UWP.vcxproj
+++ b/VisualC-WinRT/SDL_mixer-UWP.vcxproj
@@ -27,10 +27,6 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\src\codecs\music_drflac.c" />
- <ClCompile Include="..\src\codecs\music_drmp3.c" />
- <ClCompile Include="..\src\codecs\music_ogg_stb.c" />
- <ClCompile Include="..\src\codecs\music_xmp.c" />
<ClCompile Include="..\src\utils.c" />
<ClCompile Include="..\src\effects_internal.c" />
<ClCompile Include="..\src\effect_position.c" />
@@ -41,15 +37,21 @@
<ClCompile Include="..\src\codecs\load_voc.c" />
<ClCompile Include="..\src\codecs\mp3utils.c" />
<ClCompile Include="..\src\codecs\music_cmd.c" />
+ <ClCompile Include="..\src\codecs\music_drflac.c" />
+ <ClCompile Include="..\src\codecs\music_drmp3.c" />
<ClCompile Include="..\src\codecs\music_flac.c" />
<ClCompile Include="..\src\codecs\music_fluidsynth.c" />
+ <ClCompile Include="..\src\codecs\music_gme.c" />
<ClCompile Include="..\src\codecs\music_modplug.c" />
<ClCompile Include="..\src\codecs\music_mpg123.c" />
<ClCompile Include="..\src\codecs\music_nativemidi.c" />
<ClCompile Include="..\src\codecs\music_ogg.c" />
+ <ClCompile Include="..\src\codecs\music_ogg_stb.c" />
<ClCompile Include="..\src\codecs\music_opus.c" />
<ClCompile Include="..\src\codecs\music_timidity.c" />
<ClCompile Include="..\src\codecs\music_wav.c" />
+ <ClCompile Include="..\src\codecs\music_wavpack.c" />
+ <ClCompile Include="..\src\codecs\music_xmp.c" />
<ClCompile Include="..\src\codecs\timidity\common.c" />
<ClCompile Include="..\src\codecs\timidity\instrum.c" />
<ClCompile Include="..\src\codecs\timidity\mix.c" />
@@ -70,6 +72,7 @@
<ClInclude Include="..\src\codecs\music_drmp3.h" />
<ClInclude Include="..\src\codecs\music_flac.h" />
<ClInclude Include="..\src\codecs\music_fluidsynth.h" />
+ <ClInclude Include="..\src\codecs\music_gme.h" />
<ClInclude Include="..\src\codecs\music_modplug.h" />
<ClInclude Include="..\src\codecs\music_mpg123.h" />
<ClInclude Include="..\src\codecs\music_nativemidi.h" />
@@ -77,6 +80,7 @@
<ClInclude Include="..\src\codecs\music_opus.h" />
<ClInclude Include="..\src\codecs\music_timidity.h" />
<ClInclude Include="..\src\codecs\music_wav.h" />
+ <ClInclude Include="..\src\codecs\music_wavpack.h" />
<ClInclude Include="..\src\codecs\music_xmp.h" />
<ClInclude Include="..\src\utils.h" />
<ClInclude Include="..\src\codecs\timidity\common.h" />
diff --git a/VisualC-WinRT/SDL_mixer-UWP.vcxproj.filters b/VisualC-WinRT/SDL_mixer-UWP.vcxproj.filters
index f8c1806b..66fbd13a 100644
--- a/VisualC-WinRT/SDL_mixer-UWP.vcxproj.filters
+++ b/VisualC-WinRT/SDL_mixer-UWP.vcxproj.filters
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\src\codecs\timidity\common.c">
@@ -37,22 +37,31 @@
<ClCompile Include="..\src\effects_internal.c">
<Filter>Sources</Filter>
</ClCompile>
+ <ClCompile Include="..\src\mixer.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\music.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\utils.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
<ClCompile Include="..\src\codecs\load_aiff.c">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\codecs\load_voc.c">
<Filter>Sources</Filter>
</ClCompile>
- <ClCompile Include="..\src\mixer.c">
+ <ClCompile Include="..\src\codecs\mp3utils.c">
<Filter>Sources</Filter>
</ClCompile>
- <ClCompile Include="..\src\codecs\mp3utils.c">
+ <ClCompile Include="..\src\codecs\music_cmd.c">
<Filter>Sources</Filter>
</ClCompile>
- <ClCompile Include="..\src\music.c">
+ <ClCompile Include="..\src\codecs\music_drflac.c">
<Filter>Sources</Filter>
</ClCompile>
- <ClCompile Include="..\src\codecs\music_cmd.c">
+ <ClCompile Include="..\src\codecs\music_drmp3.c">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\codecs\music_flac.c">
@@ -61,6 +70,9 @@
<ClCompile Include="..\src\codecs\music_fluidsynth.c">
<Filter>Sources</Filter>
</ClCompile>
+ <ClCompile Include="..\src\codecs\music_gme.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
<ClCompile Include="..\src\codecs\music_modplug.c">
<Filter>Sources</Filter>
</ClCompile>
@@ -73,6 +85,9 @@
<ClCompile Include="..\src\codecs\music_ogg.c">
<Filter>Sources</Filter>
</ClCompile>
+ <ClCompile Include="..\src\codecs\music_ogg_stb.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
<ClCompile Include="..\src\codecs\music_opus.c">
<Filter>Sources</Filter>
</ClCompile>
@@ -82,16 +97,7 @@
<ClCompile Include="..\src\codecs\music_wav.c">
<Filter>Sources</Filter>
</ClCompile>
- <ClCompile Include="..\src\utils.c">
- <Filter>Sources</Filter>
- </ClCompile>
- <ClCompile Include="..\src\codecs\music_drflac.c">
- <Filter>Sources</Filter>
- </ClCompile>
- <ClCompile Include="..\src\codecs\music_drmp3.c">
- <Filter>Sources</Filter>
- </ClCompile>
- <ClCompile Include="..\src\codecs\music_ogg_stb.c">
+ <ClCompile Include="..\src\codecs\music_wavpack.c">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\codecs\music_xmp.c">
@@ -159,6 +165,9 @@
<ClInclude Include="..\src\codecs\music_fluidsynth.h">
<Filter>Sources</Filter>
</ClInclude>
+ <ClInclude Include="..\src\codecs\music_gme.h">
+ <Filter>Sources</Filter>
+ </ClInclude>
<ClInclude Include="..\src\codecs\music_modplug.h">
<Filter>Sources</Filter>
</ClInclude>
@@ -180,6 +189,9 @@
<ClInclude Include="..\src\codecs\music_wav.h">
<Filter>Sources</Filter>
</ClInclude>
+ <ClInclude Include="..\src\codecs\music_wavpack.h">
+ <Filter>Sources</Filter>
+ </ClInclude>
<ClInclude Include="..\src\codecs\music_xmp.h">
<Filter>Sources</Filter>
</ClInclude>
diff --git a/VisualC/SDL_mixer.vcxproj b/VisualC/SDL_mixer.vcxproj
index 7b2e6e98..c3adae43 100644
--- a/VisualC/SDL_mixer.vcxproj
+++ b/VisualC/SDL_mixer.vcxproj
@@ -22,19 +22,24 @@
<ProjectName>SDL2_mixer</ProjectName>
<ProjectGuid>{F7E944B3-0815-40CD-B3E4-90B2A15B0E33}</ProjectGuid>
<RootNamespace>SDL_mixer</RootNamespace>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -109,7 +114,7 @@
<AdditionalOptions>/D OGG_DYNAMIC=\"libvorbisfile-3.dll\" %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\src\codecs\native_midi;external\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>DLL_EXPORT;_DEBUG;WIN32;_WINDOWS;MUSIC_WAV;MUSIC_FLAC_DRFLAC;MUSIC_MOD_XMP;XMP_DYNAMIC="libxmp.dll";MUSIC_MP3_DRMP3;MUSIC_OGG;OGG_USE_STB;MUSIC_OPUS;OPUS_DYNAMIC="libopusfile-0.dll";MUSIC_MID_TIMIDITY;MUSIC_MID_NATIVE</PreprocessorDefinitions>
+ <PreprocessorDefinitions>DLL_EXPORT;_DEBUG;WIN32;_WINDOWS;MUSIC_WAV;MUSIC_WAVPACK;MUSIC_FLAC_DRFLAC;MUSIC_MOD_XMP;XMP_DYNAMIC="libxmp.dll";MUSIC_MP3_DRMP3;MUSIC_OGG;OGG_USE_STB;MUSIC_OPUS;OPUS_DYNAMIC="libopusfile-0.dll";WAVPACK_DYNAMIC="libwavpack-1.dll";MUSIC_MID_TIMIDITY;MUSIC_MID_NATIVE</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
@@ -139,7 +144,7 @@
<AdditionalOptions>/D OGG_DYNAMIC=\"libvorbisfile-3.dll\" %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\src\codecs\native_midi;external\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>DLL_EXPORT;_DEBUG;WIN32;_WINDOWS;MUSIC_WAV;MUSIC_FLAC_DRFLAC;MUSIC_MOD_XMP;XMP_DYNAMIC="libxmp.dll";MUSIC_MP3_DRMP3;MUSIC_OGG;OGG_USE_STB;MUSIC_OPUS;OPUS_DYNAMIC="libopusfile-0.dll";MUSIC_MID_TIMIDITY;MUSIC_MID_NATIVE</PreprocessorDefinitions>
+ <PreprocessorDefinitions>DLL_EXPORT;_DEBUG;WIN32;_WINDOWS;MUSIC_WAV;MUSIC_WAVPACK;MUSIC_FLAC_DRFLAC;MUSIC_MOD_XMP;XMP_DYNAMIC="libxmp.dll";MUSIC_MP3_DRMP3;MUSIC_OGG;OGG_USE_STB;MUSIC_OPUS;OPUS_DYNAMIC="libopusfile-0.dll";WAVPACK_DYNAMIC="libwavpack-1.dll";MUSIC_MID_TIMIDITY;MUSIC_MID_NATIVE</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
@@ -168,7 +173,7 @@
<ClCompile>
<AdditionalOptions>/D OGG_DYNAMIC=\"libvorbisfile-3.dll\" %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\src\codecs\native_midi;external\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>DLL_EXPORT;NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;MUSIC_WAV;MUSIC_FLAC_DRFLAC;MUSIC_MOD_XMP;XMP_DYNAMIC="libxmp.dll";MUSIC_MP3_DRMP3;MUSIC_OGG;OGG_USE_STB;MUSIC_OPUS;OPUS_DYNAMIC="libopusfile-0.dll";MUSIC_MID_TIMIDITY;MUSIC_MID_NATIVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>DLL_EXPORT;NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;MUSIC_WAVPACK;MUSIC_WAV;MUSIC_FLAC_DRFLAC;MUSIC_MOD_XMP;XMP_DYNAMIC="libxmp.dll";MUSIC_MP3_DRMP3;MUSIC_OGG;OGG_USE_STB;MUSIC_OPUS;OPUS_DYNAMIC="libopusfile-0.dll";WAVPACK_DYNAMIC="libwavpack-1.dll";MUSIC_MID_TIMIDITY;MUSIC_MID_NATIVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
@@ -195,7 +200,7 @@
<ClCompile>
<AdditionalOptions>/D OGG_DYNAMIC=\"libvorbisfile-3.dll\" %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\src\codecs\native_midi;external\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>DLL_EXPORT;NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;MUSIC_WAV;MUSIC_FLAC_DRFLAC;MUSIC_MOD_XMP;XMP_DYNAMIC="libxmp.dll";MUSIC_MP3_DRMP3;MUSIC_OGG;OGG_USE_STB;MUSIC_OPUS;OPUS_DYNAMIC="libopusfile-0.dll";MUSIC_MID_TIMIDITY;MUSIC_MID_NATIVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>DLL_EXPORT;NDEBUG;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;MUSIC_WAVPACK;MUSIC_WAV;MUSIC_FLAC_DRFLAC;MUSIC_MOD_XMP;XMP_DYNAMIC="libxmp.dll";MUSIC_MP3_DRMP3;MUSIC_OGG;OGG_USE_STB;MUSIC_OPUS;OPUS_DYNAMIC="libopusfile-0.dll";WAVPACK_DYNAMIC="libwavpack-1.dll";MUSIC_MID_TIMIDITY;MUSIC_MID_NATIVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
@@ -223,6 +228,7 @@
<ClInclude Include="..\src\codecs\music_drmp3.h" />
<ClInclude Include="..\src\codecs\music_flac.h" />
<ClInclude Include="..\src\codecs\music_fluidsynth.h" />
+ <ClInclude Include="..\src\codecs\music_gme.h" />
<ClInclude Include="..\src\codecs\music_modplug.h" />
<ClInclude Include="..\src\codecs\music_mpg123.h" />
<ClInclude Include="..\src\codecs\music_nativemidi.h" />
@@ -230,6 +236,7 @@
<ClInclude Include="..\src\codecs\music_opus.h" />
<ClInclude Include="..\src\codecs\music_timidity.h" />
<ClInclude Include="..\src\codecs\music_wav.h" />
+ <ClInclude Include="..\src\codecs\music_wavpack.h" />
<ClInclude Include="..\src\codecs\music_xmp.h" />
</ItemGroup>
<ItemGroup>
@@ -295,6 +302,15 @@
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
</CustomBuild>
+ <CustomBuild Include="external\optional\x64\libwavpack-1.dll">
+ <FileType>Document</FileType>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename)%(Extension)</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
+ </CustomBuild>
<CustomBuild Include="external\optional\x64\LICENSE.xmp.txt">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename)%(Extension)</Message>
@@ -327,6 +343,14 @@
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
</CustomBuild>
+ <CustomBuild Include="external\optional\x64\LICENSE.wavpack.txt">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename)%(Extension)</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
+ </CustomBuild>
<CustomBuild Include="external\optional\x86\libxmp.dll">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
@@ -363,6 +387,15 @@
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying %(Filename)%(Extension)</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
</CustomBuild>
+ <CustomBuild Include="external\optional\x86\libwavpack-1.dll">
+ <FileType>Document</FileType>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying %(Filename)%(Extension)</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying %(Filename)%(Extension)</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
+ </CustomBuild>
<CustomBuild Include="external\optional\x86\LICENSE.xmp.txt">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying %(Filename)%(Extension)</Message>
@@ -395,6 +428,14 @@
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying %(Filename)%(Extension)</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
</CustomBuild>
+ <CustomBuild Include="external\optional\x86\LICENSE.wavpack.txt">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying %(Filename)%(Extension)</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying %(Filename)%(Extension)</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
+ </CustomBuild>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\effect_position.c" />
@@ -411,6 +452,7 @@
<ClCompile Include="..\src\codecs\music_drmp3.c" />
<ClCompile Include="..\src\codecs\music_flac.c" />
<ClCompile Include="..\src\codecs\music_fluidsynth.c" />
+ <ClCompile Include="..\src\codecs\music_gme.c" />
<ClCompile Include="..\src\codecs\music_modplug.c" />
<ClCompile Include="..\src\codecs\music_mpg123.c" />
<ClCompile Include="..\src\codecs\music_nativemidi.c" />
@@ -419,6 +461,7 @@
<ClCompile Include="..\src\codecs\music_opus.c" />
<ClCompile Include="..\src\codecs\music_timidity.c" />
<ClCompile Include="..\src\codecs\music_wav.c" />
+ <ClCompile Include="..\src\codecs\music_wavpack.c" />
<ClCompile Include="..\src\codecs\music_xmp.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/VisualC/SDL_mixer.vcxproj.filters b/VisualC/SDL_mixer.vcxproj.filters
index b78b0fb8..c0c5a528 100644
--- a/VisualC/SDL_mixer.vcxproj.filters
+++ b/VisualC/SDL_mixer.vcxproj.filters
@@ -28,12 +28,21 @@
<ClInclude Include="..\src\codecs\music_cmd.h">
<Filter>Sources</Filter>
</ClInclude>
+ <ClInclude Include="..\src\codecs\music_drflac.h">
+ <Filter>Sources</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\codecs\music_drmp3.h">
+ <Filter>Sources</Filter>
+ </ClInclude>
<ClInclude Include="..\src\codecs\music_flac.h">
<Filter>Sources</Filter>
</ClInclude>
<ClInclude Include="..\src\codecs\music_fluidsynth.h">
<Filter>Sources</Filter>
</ClInclude>
+ <ClInclude Include="..\src\codecs\music_gme.h">
+ <Filter>Sources</Filter>
+ </ClInclude>
<ClInclude Include="..\src\codecs\music_modplug.h">
<Filter>Sources</Filter>
</ClInclude>
@@ -55,10 +64,7 @@
<ClInclude Include="..\src\codecs\music_wav.h">
<Filter>Sources</Filter>
</ClInclude>
- <ClInclude Include="..\src\codecs\music_drflac.h">
- <Filter>Sources</Filter>
- </ClInclude>
- <ClInclude Include="..\src\codecs\music_drmp3.h">
+ <ClInclude Include="..\src\codecs\music_wavpack.h">
<Filter>Sources</Filter>
</ClInclude>
<ClInclude Include="..\src\codecs\music_xmp.h">
@@ -167,12 +173,21 @@
<ClCompile Include="..\src\codecs\music_cmd.c">
<Filter>Sources</Filter>
</ClCompile>
+ <ClCompile Include="..\src\codecs\music_drflac.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\codecs\music_drmp3.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
<ClCompile Include="..\src\codecs\music_flac.c">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\codecs\music_fluidsynth.c">
<Filter>Sources</Filter>
</ClCompile>
+ <ClCompile Include="..\src\codecs\music_gme.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
<ClCompile Include="..\src\codecs\music_modplug.c">
<Filter>Sources</Filter>
</ClCompile>
@@ -185,6 +200,9 @@
<ClCompile Include="..\src\codecs\music_ogg.c">
<Filter>Sources</Filter>
</ClCompile>
+ <ClCompile Include="..\src\codecs\music_ogg_stb.c">
+ <Filter>Sources</Filter>
+ </ClCompile>
<ClCompile Include="..\src\codecs\music_opus.c">
<Filter>Sources</Filter>
</ClCompile>
@@ -194,13 +212,7 @@
<ClCompile Include="..\src\codecs\music_wav.c">
<Filter>Sources</Filter>
</ClCompile>
- <ClCompile Include="..\src\codecs\music_drflac.c">
- <Filter>Sources</Filter>
- </ClCompile>
- <ClCompile Include="..\src\codecs\music_drmp3.c">
- <Filter>Sources</Filter>
- </ClCompile>
- <ClCompile Include="..\src\codecs\music_ogg_stb.c">
+ <ClCompile Include="..\src\codecs\music_wavpack.c">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\codecs\music_xmp.c">
diff --git a/VisualC/external/include/wavpack/wavpack.h b/VisualC/external/include/wavpack/wavpack.h
new file mode 100644
index 00000000..7cef985c
--- /dev/null
+++ b/VisualC/external/include/wavpack/wavpack.h
@@ -0,0 +1,433 @@
+////////////////////////////////////////////////////////////////////////////
+// **** WAVPACK **** //
+// Hybrid Lossless Wavefile Compressor //
+// Copyright (c) 1998 - 2022 David Bryant. //
+// All Rights Reserved. //
+// Distributed under the BSD Software License (see license.txt) //
+////////////////////////////////////////////////////////////////////////////
+
+// wavpack.h
+
+#ifndef WAVPACK_H
+#define WAVPACK_H
+
+// This header file contains all the definitions required to use the
+// functions in "wputils.c" to read and write WavPack files and streams.
+
+#include <sys/types.h>
+
+#if defined(_MSC_VER) && _MSC_VER < 1600
+typedef unsigned __int64 uint64_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int8 uint8_t;
+typedef __int64 int64_t;
+typedef __int32 int32_t;
+typedef __int16 int16_t;
+typedef __int8 int8_t;
+#else
+#include <stdint.h>
+#endif
+
+// RIFF / wav header formats (these occur at the beginning of both wav files
+// and pre-4.0 WavPack files that are not in the "raw" mode). Generally, an
+// application using the library to read or write WavPack files will not be
+// concerned with any of these.
+
+typedef struct {
+ char ckID [4];
+ uint32_t ckSize;
+ char formType [4];
+} RiffChunkHeader;
+
+typedef struct {
+ char ckID [4];
+ uint32_t ckSize;
+} ChunkHeader;
+
+#define ChunkHeaderFormat "4L"
+
+typedef struct {
+ uint16_t FormatTag, NumChannels;
+ uint32_t SampleRate, BytesPerSecond;
+ uint16_t BlockAlign, BitsPerSample;
+ uint16_t cbSize, ValidBitsPerSample;
+ int32_t ChannelMask;
+ uint16_t SubFormat;
+ char GUID [14];
+} WaveHeader;
+
+#define WaveHeaderFormat "SSLLSSSSLS"
+
+// This is the ONLY structure that occurs in WavPack files (as of version
+// 4.0), and is the preamble to every block in both the .wv and .wvc
+// files (in little-endian format). Normally, this structure has no use
+// to an application using the library to read or write WavPack files,
+// but if an application needs to manually parse WavPack files then this
+// would be used (with appropriate endian correction).
+
+typedef struct {
+ char ckID [4];
+ uint32_t ckSize;
+ int16_t version;
+ unsigned char block_index_u8;
+ unsigned char total_samples_u8;
+ uint32_t total_samples, block_index, block_samples, flags, crc;
+} WavpackHeader;
+
+#define WavpackHeaderFormat "4LS2LLLLL"
+
+// Macros to access the 40-bit block_index field
+
+#define GET_BLOCK_INDEX(hdr) ( (int64_t) (hdr).block_index + ((int64_t) (hdr).block_index_u8 << 32) )
+
+#define SET_BLOCK_INDEX(hdr,value) do { \
+ int64_t tmp = (value); \
+ (hdr).block_index = (uint32_t) tmp; \
+ (hdr).block_index_u8 = \
+ (unsigned char) (tmp >> 32); \
+} while (0)
+
+// Macros to access the 40-bit total_samples field, which is complicated by the fact that
+// all 1's in the lower 32 bits indicates "unknown" (regardless of upper 8 bits)
+
+#define GET_TOTAL_SAMPLES(hdr) ( ((hdr).total_samples == (uint32_t) -1) ? -1 : \
+ (int64_t) (hdr).total_samples + ((int64_t) (hdr).total_samples_u8 << 32) - (hdr).total_samples_u8 )
+
+#define SET_TOTAL_SAMPLES(hdr,value) do { \
+ int64_t tmp = (value); \
+ if (tmp < 0) \
+ (hdr).total_samples = (uint32_t) -1; \
+ else { \
+ tmp += (tmp / 0xffffffffLL); \
+ (hdr).total_samples = (uint32_t) tmp; \
+ (hdr).total_samples_u8 = \
+ (unsigned char) (tmp >> 32); \
+ } \
+} while (0)
+
+// or-values for WavpackHeader.flags
+#define BYTES_STORED 3 // 1-4 bytes/sample
+#define MONO_FLAG 4 // not stereo
+#define HYBRID_FLAG 8 // hybrid mode
+#define JOINT_STEREO 0x10 // joint stereo
+#define CROSS_DECORR 0x20 // no-delay cross decorrelation
+#define HYBRID_SHAPE 0x40 // noise shape (hybrid mode only)
+#define FLOAT_DATA 0x80 // ieee 32-bit floating point data
+
+#define INT32_DATA 0x100 // special extended int handling
+#define HYBRID_BITRATE 0x200 // bitrate noise (hybrid mode only)
+#define HYBRID_BALANCE 0x400 // balance noise (hybrid stereo mode only)
+
+#define INITIAL_BLOCK 0x800 // initial block of multichannel segment
+#define FINAL_BLOCK 0x1000 // final block of multichannel segment
+
+#define SHIFT_LSB 13
+#define SHIFT_MASK (0x1fL << SHIFT_LSB)
+
+#define MAG_LSB 18
+#define MAG_MASK (0x1fL << MAG_LSB)
+
+#define SRATE_LSB 23
+#define SRATE_MASK (0xfL << SRATE_LSB)
+
+#define FALSE_STEREO 0x40000000 // block is stereo, but data is mono
+#define NEW_SHAPING 0x20000000 // use IIR filter for negative shaping
+
+#define MONO_DATA (MONO_FLAG | FALSE_STEREO)
+
+// Introduced in WavPack 5.0:
+#define HAS_CHECKSUM 0x10000000 // block contains a trailing chec
(Patch may be truncated, please check the link at the top of this post.)