ref: 693831acc09faf4930dc72bbe021d20fc9969c1d
parent: 3b74bed1e335c5d0f634a6c5b80092ee0eaeaad2
author: idigdoug <idigdoug>
date: Mon Dec 14 02:27:19 EST 2009
The MSVC build of LibSndFile isn't officially supported or tested, so I'm a bit nervous about statically linking the MSVC build of LibSndFile into SoX. Static linking is probably more convenient and efficient, but if there is a problem with the way I'm building LibSndFile, the user wouldn't be able to do anything to fix it. It seems to be a lot safer to have SoX load LibSndFile as a DLL.
--- a/msvc9/LibSndFile.vcproj
+++ b/msvc9/LibSndFile.vcproj
@@ -20,7 +20,7 @@
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(ProjectName)"
- ConfigurationType="4"
+ ConfigurationType="2"
CharacterSet="0"
>
<Tool
@@ -67,12 +67,20 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLibrarianTool"
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)$(ConfigurationName)\$(ProjectName)-1.dll"
+ ModuleDefinitionFile="..\..\libsndfile\src\libsndfile-1.def"
+ GenerateDebugInformation="true"
+ SetChecksum="true"
+ ImportLibrary="$(OutDir)$(TargetName).lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
+ Name="VCManifestTool"
+ />
+ <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -82,6 +90,9 @@
Name="VCFxCopTool"
/>
<Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
@@ -89,7 +100,7 @@
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(ProjectName)"
- ConfigurationType="4"
+ ConfigurationType="2"
CharacterSet="0"
WholeProgramOptimization="1"
>
@@ -136,12 +147,22 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLibrarianTool"
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)$(ConfigurationName)\$(ProjectName)-1.dll"
+ ModuleDefinitionFile="..\..\libsndfile\src\libsndfile-1.def"
+ GenerateDebugInformation="true"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ SetChecksum="true"
+ ImportLibrary="$(OutDir)$(TargetName).lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
+ Name="VCManifestTool"
+ />
+ <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -149,6 +170,9 @@
/>
<Tool
Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
--- a/msvc9/LibSoX.vcproj
+++ b/msvc9/LibSoX.vcproj
@@ -580,14 +580,6 @@
>
</File>
<File
- RelativePath="..\src\skeleff.c"
- >
- </File>
- <File
- RelativePath="..\src\skelform.c"
- >
- </File>
- <File
RelativePath="..\src\smp.c"
>
</File>
@@ -1111,6 +1103,46 @@
</File>
<File
RelativePath="..\src\pulseaudio.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\src\skeleff.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\src\skelform.c"
>
<FileConfiguration
Name="Debug|Win32"
--- a/msvc9/Sox/soxconfig.h
+++ b/msvc9/Sox/soxconfig.h
@@ -70,6 +70,7 @@
#define HAVE_SFC_SET_SCALE_FLOAT_INT_READ 1
#define HAVE_SFC_SET_SCALE_INT_FLOAT_WRITE 1
#define STATIC_SNDFILE 1
+#define DL_SNDFILE 1
#define HAVE_WAVEAUDIO 1
#define STATIC_WAVEAUDIO 1