diff --git a/Makefile.am b/Makefile.am
index e72424a1ae..d3300e1a12 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,7 +122,7 @@ CORE_CFLAGS += -I$(switch_srcdir)/libs/spandsp/src -I$(switch_srcdir)/libs/tiff-
APR_LIBS = $(AM_LIBAPU_LIBS) $(AM_LIBAPR_LIBS)
CORE_LIBS = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la
-CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la
+CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la libs/speex/libspeex/libspeex.la
if ENABLE_SRTP
CORE_CFLAGS += -DENABLE_SRTP
@@ -283,6 +283,7 @@ libfreeswitch_la_SOURCES = \
src/switch_limit.c \
src/g711.c \
src/switch_pcm.c \
+ src/switch_speex.c \
src/switch_profile.c \
src/switch_json.c \
src/switch_curl.c \
diff --git a/build/modules.conf.in b/build/modules.conf.in
index 9b38e070ed..512775b1ae 100644
--- a/build/modules.conf.in
+++ b/build/modules.conf.in
@@ -72,7 +72,6 @@ codecs/mod_vp8
#codecs/mod_sangoma_codec
#codecs/mod_silk
#codecs/mod_siren
-codecs/mod_speex
#codecs/mod_theora
dialplans/mod_dialplan_asterisk
#dialplans/mod_dialplan_directory
diff --git a/src/fs_encode.c b/src/fs_encode.c
index f48daa4098..d3052a98d6 100644
--- a/src/fs_encode.c
+++ b/src/fs_encode.c
@@ -128,6 +128,7 @@ int main(int argc, char *argv[])
switch_loadable_module_init(SWITCH_FALSE);
switch_loadable_module_load_module("", "CORE_PCM_MODULE", SWITCH_TRUE, &err);
+ switch_loadable_module_load_module("", "CORE_SPEEX_MODULE", SWITCH_TRUE, &err);
for (i = 0; i < extra_modules_count; i++) {
if (switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) extra_modules[i], SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
diff --git a/src/mod/codecs/mod_speex/Makefile b/src/mod/codecs/mod_speex/Makefile
deleted file mode 100644
index b0cbef2909..0000000000
--- a/src/mod/codecs/mod_speex/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-BASE=../../../..
-
-SPEEX_DIR=$(switch_srcdir)/libs/speex
-SPEEX_BUILDDIR=$(switch_builddir)/libs/speex
-SPEEXLA=$(SPEEX_BUILDDIR)/libspeex/libspeex.la
-SPEEXDSPLA=$(SPEEX_BUILDDIR)/libspeex/libspeexdsp.la
-
-LOCAL_CFLAGS=-I$(SPEEX_DIR)/include -I$(SPEEX_BUILDDIR)/include
-LOCAL_LIBADD=$(SPEEXLA) $(SPEEXDSPLA)
-include $(BASE)/build/modmake.rules
-
-$(SPEEXLA): $(SPEEX_DIR) $(SPEEX_DIR)/.update
- cd $(SPEEX_BUILDDIR)/libspeex && $(MAKE)
- $(TOUCH_TARGET)
-
-$(SPEEXDSPLA): $(SPEEX_DIR) $(SPEEX_DIR)/.update
- cd $(SPEEX_BUILDDIR)/libspeex && $(MAKE)
- $(TOUCH_TARGET)
-
diff --git a/src/mod/codecs/mod_speex/conf/autoload_configs/speex.conf.xml b/src/mod/codecs/mod_speex/conf/autoload_configs/speex.conf.xml
deleted file mode 100644
index 220229037a..0000000000
--- a/src/mod/codecs/mod_speex/conf/autoload_configs/speex.conf.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/mod/codecs/mod_speex/mod_speex.2008.vcproj b/src/mod/codecs/mod_speex/mod_speex.2008.vcproj
deleted file mode 100644
index 3078bf9e60..0000000000
--- a/src/mod/codecs/mod_speex/mod_speex.2008.vcproj
+++ /dev/null
@@ -1,291 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/mod/codecs/mod_speex/mod_speex.2010.vcxproj b/src/mod/codecs/mod_speex/mod_speex.2010.vcxproj
deleted file mode 100644
index 0d472039a4..0000000000
--- a/src/mod/codecs/mod_speex/mod_speex.2010.vcxproj
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- mod_speex
- {5580D60E-0F77-4716-9CD4-B8E5986FA375}
- mod_speex
- Win32Proj
-
-
-
- DynamicLibrary
- MultiByte
-
-
- DynamicLibrary
- MultiByte
-
-
- DynamicLibrary
- MultiByte
-
-
- DynamicLibrary
- MultiByte
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>10.0.30319.1
-
-
-
- %(RootDir)%(Directory)..\..\..\..\libs\speex\include;%(RootDir)%(Directory)..\..\..\..\libs\speex\include\speex;%(AdditionalIncludeDirectories)
-
-
-
-
- $(ProjectDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);%(AdditionalLibraryDirectories)
- false
-
-
-
-
-
-
- X64
-
-
- %(RootDir)%(Directory)..\..\..\..\libs\speex\include;%(RootDir)%(Directory)..\..\..\..\libs\speex\include\speex;%(AdditionalIncludeDirectories)
-
-
-
-
- $(ProjectDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);%(AdditionalLibraryDirectories)
- false
-
-
- MachineX64
-
-
-
-
- %(RootDir)%(Directory)..\..\..\..\libs\speex\include;%(RootDir)%(Directory)..\..\..\..\libs\speex\include\speex;%(AdditionalIncludeDirectories)
-
-
-
-
- $(ProjectDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);%(AdditionalLibraryDirectories)
- false
-
-
-
-
-
-
- X64
-
-
- %(RootDir)%(Directory)..\..\..\..\libs\speex\include;%(RootDir)%(Directory)..\..\..\..\libs\speex\include\speex;%(AdditionalIncludeDirectories)
-
-
-
-
- $(ProjectDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);%(AdditionalLibraryDirectories)
- false
-
-
- MachineX64
-
-
-
-
-
-
-
- {03207781-0d1c-4db3-a71d-45c608f28dbd}
- false
-
-
- {e972c52f-9e85-4d65-b19c-031e511e9db4}
-
-
- {202d7a4e-760d-4d0e-afa1-d7459ced30ff}
- false
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/mod/codecs/mod_speex/mod_speex.2012.vcxproj b/src/mod/codecs/mod_speex/mod_speex.2012.vcxproj
deleted file mode 100644
index df1a294846..0000000000
--- a/src/mod/codecs/mod_speex/mod_speex.2012.vcxproj
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- mod_speex
- {5580D60E-0F77-4716-9CD4-B8E5986FA375}
- mod_speex
- Win32Proj
-
-
-
- DynamicLibrary
- MultiByte
- v110
-
-
- DynamicLibrary
- MultiByte
- v110
-
-
- DynamicLibrary
- MultiByte
- v110
-
-
- DynamicLibrary
- MultiByte
- v110
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>10.0.30319.1
-
-
-
- %(RootDir)%(Directory)..\..\..\..\libs\speex\include;%(RootDir)%(Directory)..\..\..\..\libs\speex\include\speex;%(AdditionalIncludeDirectories)
-
-
-
-
- $(ProjectDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);%(AdditionalLibraryDirectories)
- false
-
-
-
-
-
-
- X64
-
-
- %(RootDir)%(Directory)..\..\..\..\libs\speex\include;%(RootDir)%(Directory)..\..\..\..\libs\speex\include\speex;%(AdditionalIncludeDirectories)
-
-
-
-
- $(ProjectDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);%(AdditionalLibraryDirectories)
- false
-
-
- MachineX64
-
-
-
-
- %(RootDir)%(Directory)..\..\..\..\libs\speex\include;%(RootDir)%(Directory)..\..\..\..\libs\speex\include\speex;%(AdditionalIncludeDirectories)
-
-
-
-
- $(ProjectDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);%(AdditionalLibraryDirectories)
- false
-
-
-
-
-
-
- X64
-
-
- %(RootDir)%(Directory)..\..\..\..\libs\speex\include;%(RootDir)%(Directory)..\..\..\..\libs\speex\include\speex;%(AdditionalIncludeDirectories)
-
-
-
-
- $(ProjectDir)..\..\..\..\libs\speex-1.1.11.1\win32\libspeex\$(OutDir);%(AdditionalLibraryDirectories)
- false
-
-
- MachineX64
-
-
-
-
-
-
-
- {03207781-0d1c-4db3-a71d-45c608f28dbd}
- false
-
-
- {e972c52f-9e85-4d65-b19c-031e511e9db4}
-
-
- {202d7a4e-760d-4d0e-afa1-d7459ced30ff}
- false
-
-
-
-
-
-
diff --git a/src/mod/codecs/mod_speex/mod_speex.vcproj b/src/mod/codecs/mod_speex/mod_speex.vcproj
deleted file mode 100644
index 2b4eed2ac7..0000000000
--- a/src/mod/codecs/mod_speex/mod_speex.vcproj
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c
index e00b444dec..6c360623a3 100644
--- a/src/switch_loadable_module.c
+++ b/src/switch_loadable_module.c
@@ -1801,6 +1801,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_init(switch_bool_t autolo
switch_loadable_module_load_module("", "CORE_SOFTTIMER_MODULE", SWITCH_FALSE, &err);
switch_loadable_module_load_module("", "CORE_PCM_MODULE", SWITCH_FALSE, &err);
+ switch_loadable_module_load_module("", "CORE_SPEEX_MODULE", SWITCH_FALSE, &err);
if ((xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
diff --git a/src/mod/codecs/mod_speex/mod_speex.c b/src/switch_speex.c
similarity index 99%
rename from src/mod/codecs/mod_speex/mod_speex.c
rename to src/switch_speex.c
index f33fd2bee9..6bd23f3b2a 100644
--- a/src/mod/codecs/mod_speex/mod_speex.c
+++ b/src/switch_speex.c
@@ -27,7 +27,7 @@
* Christopher M. Rienzo
*
*
- * mod_speex.c -- Speex Codec Module
+ * core_speex.c -- Speex Codec Module
*
*/
@@ -35,8 +35,8 @@
#include
#include
-SWITCH_MODULE_LOAD_FUNCTION(mod_speex_load);
-SWITCH_MODULE_DEFINITION(mod_speex, mod_speex_load, NULL, NULL);
+SWITCH_MODULE_LOAD_FUNCTION(core_speex_load);
+SWITCH_MODULE_DEFINITION(CORE_SPEEX_MODULE, core_speex_load, NULL, NULL);
/* nobody has more setting than speex so we will let them set the standard */
/*! \brief Various codec settings (currently only relevant to speex) */
@@ -584,7 +584,7 @@ static void load_configuration()
}
}
-SWITCH_MODULE_LOAD_FUNCTION(mod_speex_load)
+SWITCH_MODULE_LOAD_FUNCTION(core_speex_load)
{
switch_codec_interface_t *codec_interface;
int mpf = 20000, spf = 160, bpf = 320, rate = 8000, counta, countb;