Commit 1d77a57750 for freeswitch.com
commit 1d77a57750b303b81ad5520c3e34dbd3b4620bfb
Author: Andrey Volk <andywolk@gmail.com>
Date: Sun Aug 2 20:33:59 2026 +0300
[SpanDSP] Update to v3.1.1 and fix build on Windows. (#3090)
diff --git a/Freeswitch.2017.sln b/Freeswitch.2017.sln
index 5a8a5ba12c..3d67ec12c2 100644
--- a/Freeswitch.2017.sln
+++ b/Freeswitch.2017.sln
@@ -444,6 +444,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_opus", "src\mod\codecs\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_t43_gray_code_tables", "libs\win32\spandsp\make_t43_gray_code_tables.2017.vcxproj", "{EDDB8AB9-C53E-44C0-A620-0E86C2CBD5D5}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_godard_descriptor", "libs\win32\spandsp\make_modem_godard_descriptor.2017.vcxproj", "{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winFailToBan", "src\mod\languages\mod_managed\managed\examples\winFailToBan\winFailToBan.csproj", "{5BA0D5BD-330D-4EE2-B959-CAFEA04E50E0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_rtc", "src\mod\endpoints\mod_rtc\mod_rtc.2017.vcxproj", "{3884ADD2-91D0-4CD6-86D3-D5FB2D4AAB9E}"
@@ -2322,6 +2324,18 @@ Global
{589A07E7-5DE5-49FD-A62C-27795B806AFB}.Release|Win32.Build.0 = Release|Win32
{589A07E7-5DE5-49FD-A62C-27795B806AFB}.Release|x64.ActiveCfg = Release|x64
{589A07E7-5DE5-49FD-A62C-27795B806AFB}.Release|x64.Build.0 = Release|x64
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.All|Win32.ActiveCfg = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.All|Win32.Build.0 = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.All|x64.ActiveCfg = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.All|x64.Build.0 = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Debug|Win32.ActiveCfg = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Debug|Win32.Build.0 = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Debug|x64.ActiveCfg = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Debug|x64.Build.0 = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Release|Win32.ActiveCfg = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Release|Win32.Build.0 = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Release|x64.ActiveCfg = All|Win32
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Release|x64.Build.0 = All|Win32
{3745B86B-6BE8-3E67-FCB9-BE62A6131D67}.All|Win32.ActiveCfg = Debug|Win32
{3745B86B-6BE8-3E67-FCB9-BE62A6131D67}.All|Win32.Build.0 = Debug|Win32
{3745B86B-6BE8-3E67-FCB9-BE62A6131D67}.All|x64.ActiveCfg = Debug|x64
@@ -2515,6 +2529,7 @@ Global
{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{7AEE504B-23B6-4B05-829E-7CD34855F146} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{87933C2D-0159-46F7-B326-E1B6E982C21E} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{CB4E68A1-8D19-4B5E-87B9-97A895E1BA17} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{411F6D43-9F09-47D0-8B04-E1EB6B67C5BF} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
diff --git a/configure.ac b/configure.ac
index f1ef880d53..271193619e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -705,9 +705,9 @@ PKG_CHECK_MODULES([MARIADB], [libmariadb >= 3.0.9],[
])
])
-PKG_CHECK_MODULES([SPANDSP], [spandsp >= 3.0],[
+PKG_CHECK_MODULES([SPANDSP], [spandsp >= 3.1.1],[
AM_CONDITIONAL([HAVE_SPANDSP],[true])],[
- AC_MSG_ERROR([no usable spandsp; please install spandsp3 devel package or equivalent])
+ AC_MSG_ERROR([no usable spandsp; please install spandsp4 devel package or equivalent])
])
PKG_CHECK_MODULES([SOFIA_SIP], [sofia-sip-ua >= 1.13.17],[
diff --git a/debian/bootstrap.sh b/debian/bootstrap.sh
index b4f6eb3a57..b6d4c5fcba 100755
--- a/debian/bootstrap.sh
+++ b/debian/bootstrap.sh
@@ -319,7 +319,7 @@ Build-Depends:
# used by many modules
libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev,
bison, zlib1g-dev, libsofia-sip-ua-dev (>= 1.13.17),
- libspandsp3-dev,
+ libspandsp4-dev,
# used to format the private freeswitch apt-repo key properly
gnupg,
# module build-depends
diff --git a/freeswitch.spec b/freeswitch.spec
index a5dab64927..f9a92e0eb7 100755
--- a/freeswitch.spec
+++ b/freeswitch.spec
@@ -132,7 +132,7 @@ BuildRequires: gcc-c++
BuildRequires: libtool >= 1.5.17
BuildRequires: openssl-devel >= 1.0.1e
BuildRequires: sofia-sip-devel >= 1.13.17
-BuildRequires: spandsp3-devel >= 3.0
+BuildRequires: spandsp4-devel >= 3.1.1
BuildRequires: pcre2-devel
BuildRequires: speex-devel
BuildRequires: sqlite-devel >= 3.6.20
diff --git a/libs/win32/spandsp/libspandsp.2017.vcxproj b/libs/win32/spandsp/libspandsp.2017.vcxproj
index 6a3d8012d0..b97c7fa2a8 100644
--- a/libs/win32/spandsp/libspandsp.2017.vcxproj
+++ b/libs/win32/spandsp/libspandsp.2017.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -188,6 +188,7 @@
<ClCompile Include="$(BaseDir)libs\spandsp\src\g711.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\g722.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\g726.c" />
+ <ClCompile Include="$(BaseDir)libs\spandsp\src\godard.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\gsm0610_decode.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\gsm0610_encode.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\gsm0610_long_term.c" />
@@ -254,11 +255,16 @@
<ClCompile Include="$(BaseDir)libs\spandsp\src\v42.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\v42bis.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\v8.c" />
+ <ClCompile Include="$(BaseDir)libs\spandsp\src\v80.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\vector_float.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\vector_int.c" />
<ClCompile Include="$(BaseDir)libs\spandsp\src\msvc\gettimeofday.c" />
+ <ClCompile Include="$(BaseDir)libs\spandsp\src\sprt.c" />
+ <ClCompile Include="$(BaseDir)libs\spandsp\src\v150_1.c" />
+ <ClCompile Include="$(BaseDir)libs\spandsp\src\v150_1_sse.c" />
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\v150_1_local.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\ademco_contactid.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\adsi.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\alloc.h" />
@@ -290,6 +296,7 @@
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\g711.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\g722.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\g726.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\godard.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\gsm0610.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\hdlc.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\ima_adpcm.h" />
@@ -309,6 +316,8 @@
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\schedule.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\sig_tone.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\silence_gen.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\sprt.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\stdbool.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\super_tone_rx.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\super_tone_tx.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\swept_tone.h" />
@@ -335,6 +344,9 @@
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\timing.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\tone_detect.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\tone_generate.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\unaligned.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v150_1.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v150_1_sse.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v17rx.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v17tx.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v18.h" />
@@ -346,6 +358,7 @@
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v42.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v42bis.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v8.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\v80.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\vector_float.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\vector_int.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\version.h" />
@@ -383,6 +396,7 @@
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\schedule.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\sig_tone.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\silence_gen.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\sprt.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\super_tone_rx.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\super_tone_tx.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\swept_tone.h" />
@@ -405,6 +419,8 @@
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\timezone.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\tone_detect.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\tone_generate.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v150_1.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v150_1_sse.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v17rx.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v17tx.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v18.h" />
@@ -416,6 +432,7 @@
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v42.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v42bis.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v8.h" />
+ <ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\private\v80.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp\expose.h" />
<ClInclude Include="$(BaseDir)libs\spandsp\src\spandsp.h" />
<CustomBuild Include="$(BaseDir)libs\spandsp\src\msvc\spandsp.h">
@@ -460,6 +477,9 @@
<Project>{329a6fa0-0fcc-4435-a950-e670aefa9838}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
+ <ProjectReference Include="make_modem_godard_descriptor.2017.vcxproj">
+ <Project>{c8ea4ad3-3edd-4dd1-9d63-4be22585aa14}</Project>
+ </ProjectReference>
<ProjectReference Include="make_t43_gray_code_tables.2017.vcxproj">
<Project>{eddb8ab9-c53e-44c0-a620-0e86c2cbd5d5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/libs/win32/spandsp/make_modem_godard_descriptor.2017.vcxproj b/libs/win32/spandsp/make_modem_godard_descriptor.2017.vcxproj
new file mode 100644
index 0000000000..738362297e
--- /dev/null
+++ b/libs/win32/spandsp/make_modem_godard_descriptor.2017.vcxproj
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="All|Win32">
+ <Configuration>All</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>make_modem_godard_descriptor</ProjectName>
+ <RootNamespace>make_modem_godard_descriptor</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(SolutionDir)\w32\tiff.props" />
+ <Import Project="$(SolutionDir)\w32\spandsp.props" />
+ </ImportGroup>
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='All|Win32'">$(PlatformName)\make_modem_godard_descriptor\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='All|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='All|Win32'">
+ <BuildLog>
+ <Path>$(IntDir)BuildLog $(ProjectName).htm</Path>
+ </BuildLog>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>"$(TargetPath)" 1800.0 2400.0 0.99 1000.0 100.0 15 1 >"..\..\spandsp\src\v17_v32bis_rx_godard.h"
+"$(TargetPath)" 1700.0 2400.0 0.99 1000.0 30.0 5 1 >"..\..\spandsp\src\v29rx_godard.h"
+</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\spandsp\src\filter_tools.c" />
+ <ClCompile Include="..\..\spandsp\src\make_modem_godard_descriptor.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\spandsp\src\filter_tools.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/w32/download_spandsp.props b/w32/download_spandsp.props
index f02c66a9bd..bdda02da70 100644
--- a/w32/download_spandsp.props
+++ b/w32/download_spandsp.props
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
+ <Import Project="spandsp-version.props" Condition=" '$(SpandspVersionImported)' == '' "/>
<Import Project="downloadpackage.task" Condition=" '$(downloadpackagetask_Imported)' == '' " />
</ImportGroup>
<PropertyGroup>
<downloadSpandspPropsImported>true</downloadSpandspPropsImported>
+ <!-- GitHub strips a leading "v" from the tag when naming the archive's root folder. -->
+ <SpandspArchiveFolderVersion>$(SpandspVersion.TrimStart('v'))</SpandspArchiveFolderVersion>
</PropertyGroup>
<!--
@@ -29,12 +32,12 @@
<Target Name="SpandspDownloadTarget" BeforeTargets="CustomBuild;PreBuildEvent;" DependsOnTargets="7za">
<DownloadPackageTask
- package="https://github.com/freeswitch/spandsp/archive/0d2e6ac65e0e8f53d652665a743015a88bf048d4.zip"
+ package="https://github.com/freeswitch/spandsp/archive/$(SpandspVersion).zip"
expectfileordirectory="$(BaseDir)libs\spandsp\configure.ac"
outputfolder=""
outputfilename="spandsp-$(SpandspVersion).zip"
extractto="$(BaseDir)libs\"
- moveafter="spandsp-$(SpandspVersion)|spandsp"
+ moveafter="spandsp-$(SpandspArchiveFolderVersion)|spandsp"
/>
</Target>
diff --git a/w32/spandsp-version.props b/w32/spandsp-version.props
index 214805b0bf..6e1c9add1d 100644
--- a/w32/spandsp-version.props
+++ b/w32/spandsp-version.props
@@ -4,7 +4,7 @@
<Import Project="basedir.props" Condition=" '$(BaseDirImported)' == ''"/>
</ImportGroup>
<PropertyGroup Label="UserMacros">
- <SpandspVersion>0d2e6ac65e0e8f53d652665a743015a88bf048d4</SpandspVersion>
+ <SpandspVersion>v3.1.1</SpandspVersion>
</PropertyGroup>
<PropertyGroup>
<SpandspVersionImported>true</SpandspVersionImported>