Freeswitch-trunk
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
April 2009
- 19 participants
- 350 discussions
29 Apr '09
Author: anthm
Date: Tue Apr 28 20:00:47 2009
New Revision: 13183
Log:
doh
Modified:
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Tue Apr 28 20:00:47 2009
@@ -40,6 +40,8 @@
SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt)
{
switch_caller_extension_t *extension = NULL;
+ char *argv[128] = { 0 };
+ int argc;
switch_channel_t *channel = switch_core_session_get_channel(session);
int x = 0;
char *lbuf;
1
0
[commit] r13182 - in freeswitch/trunk: build conf/autoload_configs src src/mod/applications/mod_dptools src/mod/formats/mod_file_string
by FreeSWITCH SVN 28 Apr '09
by FreeSWITCH SVN 28 Apr '09
28 Apr '09
Author: anthm
Date: Tue Apr 28 18:46:18 2009
New Revision: 13182
Log:
Stings of files
method 1 high level (core most funcs that use switch_ivr_playback)
Delimiter is set by a var which also enables the parser
<action application="set" data="playback_delimiter=!"/>
<action application="set" data="playback_sleep_val=500"/>
<action application="playback" data="/ram/sr8k.wav!/ram/swimp.wav"/>
method 2 low level (mod_file_string lower level code that uses direct file handles)
Delimiter is always !
<action application="playback" data="file_string:///ram/sr8k.wav!/ram/swimp.wav"/>
Added:
freeswitch/trunk/src/mod/formats/mod_file_string/
freeswitch/trunk/src/mod/formats/mod_file_string/Makefile
freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.2008.vcproj
freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.c
freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.vcproj
Modified:
freeswitch/trunk/build/modules.conf.in
freeswitch/trunk/conf/autoload_configs/modules.conf.xml
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
freeswitch/trunk/src/switch_ivr_play_say.c
Modified: freeswitch/trunk/build/modules.conf.in
==============================================================================
--- freeswitch/trunk/build/modules.conf.in (original)
+++ freeswitch/trunk/build/modules.conf.in Tue Apr 28 18:46:18 2009
@@ -59,6 +59,7 @@
#formats/mod_shout
formats/mod_local_stream
formats/mod_tone_stream
+formats/mod_file_string
#languages/mod_python
languages/mod_spidermonkey
languages/mod_spidermonkey_teletone
Modified: freeswitch/trunk/conf/autoload_configs/modules.conf.xml
==============================================================================
--- freeswitch/trunk/conf/autoload_configs/modules.conf.xml (original)
+++ freeswitch/trunk/conf/autoload_configs/modules.conf.xml Tue Apr 28 18:46:18 2009
@@ -79,6 +79,7 @@
<!--For local streams (play all the files in a directory)-->
<load module="mod_local_stream"/>
<load module="mod_tone_stream"/>
+ <load module="mod_file_string"/>
<!-- Timers -->
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Tue Apr 28 18:46:18 2009
@@ -40,8 +40,6 @@
SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt)
{
switch_caller_extension_t *extension = NULL;
- char *argv[128] = { 0 };
- int argc;
switch_channel_t *channel = switch_core_session_get_channel(session);
int x = 0;
char *lbuf;
@@ -1834,7 +1832,7 @@
{
switch_input_args_t args = { 0 };
switch_channel_t *channel = switch_core_session_get_channel(session);
- switch_status_t status;
+ switch_status_t status = SWITCH_STATUS_SUCCESS;
args.input_callback = on_dtmf;
Added: freeswitch/trunk/src/mod/formats/mod_file_string/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/formats/mod_file_string/Makefile Tue Apr 28 18:46:18 2009
@@ -0,0 +1,2 @@
+BASE=../../../..
+include $(BASE)/build/modmake.rules
Added: freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.2008.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.2008.vcproj Tue Apr 28 18:46:18 2009
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="mod_file_string"
+ ProjectGUID="{2CA40887-1622-46A1-A7F9-17FD7E7E545B}"
+ RootNamespace="mod_file_string"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\mod_file_string.c"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.c Tue Apr 28 18:46:18 2009
@@ -0,0 +1,188 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005-2009, Anthony Minessale II <anthm(a)freeswitch.org>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II <anthm(a)freeswitch.org>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Anthony Minessale II <anthm(a)freeswitch.org>
+ * Cesar Cepeda <cesar(a)auronix.com>
+ *
+ *
+ * mod_file_string.c -- Local Streaming Audio
+ *
+ */
+#include <switch.h>
+/* for apr_pstrcat */
+#define DEFAULT_PREBUFFER_SIZE 1024 * 64
+
+SWITCH_MODULE_LOAD_FUNCTION(mod_file_string_load);
+
+SWITCH_MODULE_DEFINITION(mod_file_string, mod_file_string_load, NULL, NULL);
+
+
+struct file_string_source;
+
+static struct {
+ switch_mutex_t *mutex;
+ switch_hash_t *source_hash;
+} globals;
+
+struct file_string_context {
+ char *argv[128];
+ int argc;
+ int index;
+ int samples;
+ switch_file_handle_t fh;
+};
+
+typedef struct file_string_context file_string_context_t;
+
+
+static int next_file(switch_file_handle_t *handle)
+{
+ file_string_context_t *context = handle->private_info;
+
+ context->index++;
+
+ if (switch_test_flag((&context->fh), SWITCH_FILE_OPEN)) {
+ switch_core_file_close(&context->fh);
+ }
+
+ if (context->index == context->argc) {
+ return 0;
+ }
+
+ if (switch_core_file_open(&context->fh,
+ context->argv[context->index],
+ handle->channels,
+ handle->samplerate,
+ SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
+ return 0;
+ }
+
+ handle->samples = context->fh.samples;
+ handle->samplerate = context->fh.samplerate;
+ handle->channels = context->fh.channels;
+ handle->format = context->fh.format;
+ handle->sections = context->fh.sections;
+ handle->seekable = context->fh.seekable;
+ handle->speed = context->fh.speed;
+ handle->interval = context->fh.interval;
+
+ if (context->index == 0) {
+ context->samples = (handle->samplerate / 1000) * 250;
+ }
+
+ return 1;
+}
+
+static switch_status_t file_string_file_open(switch_file_handle_t *handle, const char *path)
+{
+ file_string_context_t *context;
+ char *file_dup;
+
+ if (switch_test_flag(handle, SWITCH_FILE_FLAG_WRITE)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This format does not support writing!\n");
+ return SWITCH_STATUS_FALSE;
+ }
+
+ context = switch_core_alloc(handle->memory_pool, sizeof(*context));
+
+ file_dup = switch_core_strdup(handle->memory_pool, path);
+ context->argc = switch_separate_string(file_dup, '!', context->argv, (sizeof(context->argv) / sizeof(context->argv[0])));
+ context->index = -1;
+
+ handle->private_info = context;
+
+ return next_file(handle) ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
+}
+
+static switch_status_t file_string_file_close(switch_file_handle_t *handle)
+{
+ file_string_context_t *context = handle->private_info;
+
+ switch_core_file_close(&context->fh);
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static switch_status_t file_string_file_read(switch_file_handle_t *handle, void *data, size_t *len)
+{
+ file_string_context_t *context = handle->private_info;
+ switch_status_t status;
+ size_t llen = *len;
+
+ if (context->samples > 0) {
+ if (*len > (size_t)context->samples) {
+ *len = context->samples;
+ }
+
+ context->samples -= *len;
+ switch_generate_sln_silence((int16_t *) data, *len, 400);
+ status = SWITCH_STATUS_SUCCESS;
+ } else {
+ status = switch_core_file_read(&context->fh, data, len);
+ }
+
+ if (status != SWITCH_STATUS_SUCCESS) {
+ if (!next_file(handle)) {
+ return SWITCH_STATUS_FALSE;
+ }
+ *len = llen;
+ status = switch_core_file_read(&context->fh, data, len);
+ }
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+/* Registration */
+
+static char *supported_formats[SWITCH_MAX_CODECS] = { 0 };
+
+SWITCH_MODULE_LOAD_FUNCTION(mod_file_string_load)
+{
+ switch_file_interface_t *file_interface;
+ supported_formats[0] = "file_string";
+
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
+ file_interface->interface_name = modname;
+ file_interface->extens = supported_formats;
+ file_interface->file_open = file_string_file_open;
+ file_interface->file_close = file_string_file_close;
+ file_interface->file_read = file_string_file_read;
+
+ memset(&globals, 0, sizeof(globals));
+ /* indicate that the module should continue to be loaded */
+ return SWITCH_STATUS_SUCCESS;
+}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:t
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4:
+ */
Added: freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/formats/mod_file_string/mod_file_string.vcproj Tue Apr 28 18:46:18 2009
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="mod_file_string"
+ ProjectGUID="{2CA40887-1622-46A1-A7F9-17FD7E7E545B}"
+ RootNamespace="mod_file_string"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\mod_file_string.c"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c (original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c Tue Apr 28 18:46:18 2009
@@ -354,7 +354,7 @@
input = input->next;
}
- done:
+ done:
if (hint_data) {
switch_event_destroy(&hint_data);
@@ -588,9 +588,9 @@
if (args && (args->input_callback || args->buf || args->buflen)) {
/*
- dtmf handler function you can hook up to be executed when a digit is dialed during playback
- if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
- */
+ dtmf handler function you can hook up to be executed when a digit is dialed during playback
+ if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
+ */
if (switch_channel_has_dtmf(channel)) {
if (!args->input_callback && !args->buf) {
status = SWITCH_STATUS_BREAK;
@@ -769,9 +769,9 @@
if (args && (args->input_callback || args->buf || args->buflen)) {
/*
- dtmf handler function you can hook up to be executed when a digit is dialed during gentones
- if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
- */
+ dtmf handler function you can hook up to be executed when a digit is dialed during gentones
+ if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
+ */
if (switch_channel_has_dtmf(channel)) {
if (!args->input_callback && !args->buf) {
status = SWITCH_STATUS_BREAK;
@@ -848,12 +848,34 @@
const char *timer_name;
const char *prebuf;
const char *alt = NULL;
+ const char *sleep_val;
+ const char *play_delimiter_val;
+ char play_delimiter = 0;
+ int sleep_val_i = 250;
int eof = 0;
switch_size_t bread = 0;
int l16 = 0;
switch_codec_implementation_t read_impl = {0};
+ char *file_dup;
+ char *argv[128] = { 0 };
+ int argc;
+ int cur;
+ switch_status_t rst;
+
+
switch_core_session_get_read_impl(session, &read_impl);
+ if ((play_delimiter_val = switch_channel_get_variable(channel, "playback_delimiter"))) {
+ play_delimiter = *play_delimiter_val;
+
+ if ((sleep_val = switch_channel_get_variable(channel, "playback_sleep_val"))) {
+ int tmp = atoi(sleep_val);
+ if (tmp >= 0) {
+ sleep_val_i = tmp;
+ }
+ }
+ }
+
if (switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
}
@@ -862,489 +884,528 @@
timer_name = switch_channel_get_variable(channel, "timer_name");
if (switch_strlen_zero(file) || !switch_channel_media_ready(channel)) {
- status = SWITCH_STATUS_FALSE;
- goto end;
+ return SWITCH_STATUS_FALSE;
}
if (!strcasecmp(read_impl.iananame, "l16")) {
l16++;
}
- if ((alt = strchr(file, ':'))) {
- char *dup;
+
+ if (play_delimiter) {
+ file_dup = switch_core_session_strdup(session, file);
+ argc = switch_separate_string(file_dup, play_delimiter, argv, (sizeof(argv) / sizeof(argv[0])));
+ } else {
+ argc = 1;
+ argv[0] = (char *)file;
+ }
- if (!strncasecmp(file, "phrase:", 7)) {
- char *arg = NULL;
- const char *lang = switch_channel_get_variable(channel, "language");
- alt = file + 7;
- dup = switch_core_session_strdup(session, alt);
-
- if (dup) {
- if ((arg = strchr(dup, ':'))) {
- *arg++ = '\0';
- }
- return switch_ivr_phrase_macro(session, dup, arg, lang, args);
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
- return SWITCH_STATUS_FALSE;
+ for(cur = 0; switch_channel_ready(channel) && cur < argc; cur++) {
+ file = argv[cur];
+ asis = 0;
+ eof = 0;
+
+ if (cur) {
+ fh->samples = sample_start = 0;
+ if (sleep_val_i) {
+ switch_ivr_sleep(session, sleep_val_i, SWITCH_FALSE, args);
}
- } else if (!strncasecmp(file, "say:", 4)) {
- char *engine = NULL, *voice = NULL, *text = NULL;
- alt = file + 4;
- dup = switch_core_session_strdup(session, alt);
- engine = dup;
-
- if (!switch_strlen_zero(engine)) {
- if ((voice = strchr(engine, ':'))) {
- *voice++ = '\0';
- if (!switch_strlen_zero(voice) && (text = strchr(voice, ':'))) {
- *text++ = '\0';
+ }
+
+ status = SWITCH_STATUS_SUCCESS;
+
+ if ((alt = strchr(file, ':'))) {
+ char *dup;
+
+ if (!strncasecmp(file, "phrase:", 7)) {
+ char *arg = NULL;
+ const char *lang = switch_channel_get_variable(channel, "language");
+ alt = file + 7;
+ dup = switch_core_session_strdup(session, alt);
+
+ if (dup) {
+ if ((arg = strchr(dup, ':'))) {
+ *arg++ = '\0';
+ }
+ if ((rst = switch_ivr_phrase_macro(session, dup, arg, lang, args) != SWITCH_STATUS_SUCCESS)) {
+ return rst;
+ }
+ continue;
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
+ continue;
+ }
+ } else if (!strncasecmp(file, "say:", 4)) {
+ char *engine = NULL, *voice = NULL, *text = NULL;
+ alt = file + 4;
+ dup = switch_core_session_strdup(session, alt);
+ engine = dup;
+
+ if (!switch_strlen_zero(engine)) {
+ if ((voice = strchr(engine, ':'))) {
+ *voice++ = '\0';
+ if (!switch_strlen_zero(voice) && (text = strchr(voice, ':'))) {
+ *text++ = '\0';
+ }
}
}
- }
- if (!switch_strlen_zero(engine) && !switch_strlen_zero(voice) && !switch_strlen_zero(text)) {
- return switch_ivr_speak_text(session, engine, voice, text, args);
- } else if (!switch_strlen_zero(engine) && !(voice && text)) {
- text = engine;
- engine = (char *) switch_channel_get_variable(channel, "tts_engine");
- voice = (char *) switch_channel_get_variable(channel, "tts_voice");
- if (engine && text) {
- return switch_ivr_speak_text(session, engine, voice, text, args);
+ if (!switch_strlen_zero(engine) && !switch_strlen_zero(voice) && !switch_strlen_zero(text)) {
+ if ((rst = switch_ivr_speak_text(session, engine, voice, text, args)) != SWITCH_STATUS_SUCCESS) {
+ return rst;
+ }
+ continue;
+ } else if (!switch_strlen_zero(engine) && !(voice && text)) {
+ text = engine;
+ engine = (char *) switch_channel_get_variable(channel, "tts_engine");
+ voice = (char *) switch_channel_get_variable(channel, "tts_voice");
+ if (engine && text) {
+ if ((rst = switch_ivr_speak_text(session, engine, voice, text, args)) != SWITCH_STATUS_SUCCESS) {
+ return rst;
+ }
+ continue;
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
+ continue;
}
+ }
+
+ }
+
+ if (!prefix) {
+ prefix = SWITCH_GLOBAL_dirs.base_dir;
+ }
+
+ if (!strstr(file, SWITCH_URL_SEPARATOR)) {
+ if (!switch_is_file_path(file)) {
+ file = switch_core_session_sprintf(session, "%s%s%s", prefix, SWITCH_PATH_SEPARATOR, file);
+ }
+ if ((ext = strrchr(file, '.'))) {
+ ext++;
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Args\n");
- return SWITCH_STATUS_FALSE;
+ ext = read_impl.iananame;
+ file = switch_core_session_sprintf(session, "%s.%s", file, ext);
+ asis = 1;
}
}
- }
+
+ if (!fh) {
+ fh = &lfh;
+ memset(fh, 0, sizeof(lfh));
+ }
- if (!prefix) {
- prefix = SWITCH_GLOBAL_dirs.base_dir;
- }
+ if (fh->samples > 0) {
+ sample_start = fh->samples;
+ fh->samples = 0;
+ }
- if (!strstr(file, SWITCH_URL_SEPARATOR)) {
- if (!switch_is_file_path(file)) {
- file = switch_core_session_sprintf(session, "%s%s%s", prefix, SWITCH_PATH_SEPARATOR, file);
+ if ((prebuf = switch_channel_get_variable(channel, "stream_prebuffer"))) {
+ int maybe = atoi(prebuf);
+ if (maybe > 0) {
+ fh->prebuf = maybe;
+ }
}
- if ((ext = strrchr(file, '.'))) {
- ext++;
- } else {
- ext = read_impl.iananame;
- file = switch_core_session_sprintf(session, "%s.%s", file, ext);
+
+ if (switch_core_file_open(fh,
+ file,
+ read_impl.number_of_channels,
+ read_impl.actual_samples_per_second,
+ SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
+ status = SWITCH_STATUS_NOTFOUND;
+ continue;
+ }
+ if (switch_test_flag(fh, SWITCH_FILE_NATIVE)) {
asis = 1;
}
- }
-
- if (!fh) {
- fh = &lfh;
- memset(fh, 0, sizeof(lfh));
- }
- if (fh->samples > 0) {
- sample_start = fh->samples;
- fh->samples = 0;
- }
+ if (!abuf) {
+ switch_zmalloc(abuf, FILE_STARTSAMPLES * sizeof(*abuf));
+ write_frame.data = abuf;
+ write_frame.buflen = FILE_STARTSAMPLES;
+ }
- if ((prebuf = switch_channel_get_variable(channel, "stream_prebuffer"))) {
- int maybe = atoi(prebuf);
- if (maybe > 0) {
- fh->prebuf = maybe;
+ if (sample_start > 0) {
+ uint32_t pos = 0;
+ switch_core_file_seek(fh, &pos, 0, SEEK_SET);
+ switch_core_file_seek(fh, &pos, sample_start, SEEK_CUR);
}
- }
- if (switch_core_file_open(fh,
- file,
- read_impl.number_of_channels,
- read_impl.actual_samples_per_second,
- SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
- switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
- status = SWITCH_STATUS_NOTFOUND;
- goto end;
- }
- if (switch_test_flag(fh, SWITCH_FILE_NATIVE)) {
- asis = 1;
- }
+ if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_TITLE, &p) == SWITCH_STATUS_SUCCESS) {
+ title = switch_core_session_strdup(session, p);
+ switch_channel_set_variable(channel, "RECORD_TITLE", p);
+ }
- switch_zmalloc(abuf, FILE_STARTSAMPLES * sizeof(*abuf));
- write_frame.data = abuf;
- write_frame.buflen = FILE_STARTSAMPLES;
+ if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_COPYRIGHT, &p) == SWITCH_STATUS_SUCCESS) {
+ copyright = switch_core_session_strdup(session, p);
+ switch_channel_set_variable(channel, "RECORD_COPYRIGHT", p);
+ }
- if (sample_start > 0) {
- uint32_t pos = 0;
- switch_core_file_seek(fh, &pos, 0, SEEK_SET);
- switch_core_file_seek(fh, &pos, sample_start, SEEK_CUR);
- }
+ if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_SOFTWARE, &p) == SWITCH_STATUS_SUCCESS) {
+ software = switch_core_session_strdup(session, p);
+ switch_channel_set_variable(channel, "RECORD_SOFTWARE", p);
+ }
- if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_TITLE, &p) == SWITCH_STATUS_SUCCESS) {
- title = switch_core_session_strdup(session, p);
- switch_channel_set_variable(channel, "RECORD_TITLE", p);
- }
+ if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_ARTIST, &p) == SWITCH_STATUS_SUCCESS) {
+ artist = switch_core_session_strdup(session, p);
+ switch_channel_set_variable(channel, "RECORD_ARTIST", p);
+ }
- if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_COPYRIGHT, &p) == SWITCH_STATUS_SUCCESS) {
- copyright = switch_core_session_strdup(session, p);
- switch_channel_set_variable(channel, "RECORD_COPYRIGHT", p);
- }
+ if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_COMMENT, &p) == SWITCH_STATUS_SUCCESS) {
+ comment = switch_core_session_strdup(session, p);
+ switch_channel_set_variable(channel, "RECORD_COMMENT", p);
+ }
- if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_SOFTWARE, &p) == SWITCH_STATUS_SUCCESS) {
- software = switch_core_session_strdup(session, p);
- switch_channel_set_variable(channel, "RECORD_SOFTWARE", p);
- }
+ if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_DATE, &p) == SWITCH_STATUS_SUCCESS) {
+ date = switch_core_session_strdup(session, p);
+ switch_channel_set_variable(channel, "RECORD_DATE", p);
+ }
- if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_ARTIST, &p) == SWITCH_STATUS_SUCCESS) {
- artist = switch_core_session_strdup(session, p);
- switch_channel_set_variable(channel, "RECORD_ARTIST", p);
- }
+ interval = read_impl.microseconds_per_packet / 1000;
- if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_COMMENT, &p) == SWITCH_STATUS_SUCCESS) {
- comment = switch_core_session_strdup(session, p);
- switch_channel_set_variable(channel, "RECORD_COMMENT", p);
- }
+ if (!fh->audio_buffer) {
+ switch_buffer_create_dynamic(&fh->audio_buffer, FILE_BLOCKSIZE, FILE_BUFSIZE, 0);
+ switch_assert(fh->audio_buffer);
+ }
- if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_DATE, &p) == SWITCH_STATUS_SUCCESS) {
- date = switch_core_session_strdup(session, p);
- switch_channel_set_variable(channel, "RECORD_DATE", p);
- }
+ if (asis) {
+ write_frame.codec = switch_core_session_get_read_codec(session);
+ samples = read_impl.samples_per_packet;
+ framelen = read_impl.encoded_bytes_per_packet;
+ } else {
+ codec_name = "L16";
- interval = read_impl.microseconds_per_packet / 1000;
+ if (!switch_core_codec_ready((&codec))) {
+ if (switch_core_codec_init(&codec,
+ codec_name,
+ NULL,
+ fh->samplerate,
+ interval, fh->channels, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, pool) == SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG,
+ SWITCH_LOG_DEBUG, "Codec Activated %s@%uhz %u channels %dms\n", codec_name, fh->samplerate, fh->channels, interval);
+
- if (!fh->audio_buffer) {
- switch_buffer_create_dynamic(&fh->audio_buffer, FILE_BLOCKSIZE, FILE_BUFSIZE, 0);
- if (!fh->audio_buffer) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Setup buffer failed\n");
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "Raw Codec Activation Failed %s@%uhz %u channels %dms\n", codec_name, fh->samplerate, fh->channels, interval);
+ switch_core_file_close(fh);
+ switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
+ status = SWITCH_STATUS_GENERR;
+ continue;
+ }
+ }
- switch_core_file_close(fh);
- switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
+ write_frame.codec = &codec;
- status = SWITCH_STATUS_GENERR;
- goto end;
+ samples = codec.implementation->samples_per_packet;
+ framelen = codec.implementation->decoded_bytes_per_packet;
}
- }
- if (asis) {
- write_frame.codec = switch_core_session_get_read_codec(session);
- samples = read_impl.samples_per_packet;
- framelen = read_impl.encoded_bytes_per_packet;
- } else {
- codec_name = "L16";
+ if (timer_name && !timer.samplecount) {
+ uint32_t len;
- if (switch_core_codec_init(&codec,
- codec_name,
- NULL,
- fh->samplerate,
- interval, fh->channels, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, pool) == SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG,
- SWITCH_LOG_DEBUG, "Codec Activated %s@%uhz %u channels %dms\n", codec_name, fh->samplerate, fh->channels, interval);
+ len = samples * 2;
+ if (switch_core_timer_init(&timer, timer_name, interval, samples, pool) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Setup timer failed!\n");
+ switch_core_codec_destroy(&codec);
+ switch_core_file_close(fh);
+ switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
+ status = SWITCH_STATUS_GENERR;
+ continue;
+ }
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setup timer success %u bytes per %d ms!\n", len, interval);
+ }
+ write_frame.rate = fh->samplerate;
- write_frame.codec = &codec;
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
- "Raw Codec Activation Failed %s@%uhz %u channels %dms\n", codec_name, fh->samplerate, fh->channels, interval);
- switch_core_file_close(fh);
- switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
- status = SWITCH_STATUS_GENERR;
- goto end;
+ if (timer_name) {
+ /* start a thread to absorb incoming audio */
+ switch_core_service_session(session);
}
- samples = codec.implementation->samples_per_packet;
- framelen = codec.implementation->decoded_bytes_per_packet;
- }
- if (timer_name) {
- uint32_t len;
+ ilen = samples;
- len = samples * 2;
- if (switch_core_timer_init(&timer, timer_name, interval, samples, pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Setup timer failed!\n");
- switch_core_codec_destroy(&codec);
- switch_core_file_close(fh);
- switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
- status = SWITCH_STATUS_GENERR;
- goto end;
- }
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setup timer success %u bytes per %d ms!\n", len, interval);
- }
- write_frame.rate = fh->samplerate;
+ for (;;) {
+ int done = 0;
+ int do_speed = 1;
+ int last_speed = -1;
- if (timer_name) {
- /* start a thread to absorb incoming audio */
- switch_core_service_session(session);
- }
+ if (!switch_channel_ready(channel)) {
+ status = SWITCH_STATUS_FALSE;
+ break;
+ }
- ilen = samples;
+ if (switch_channel_test_flag(channel, CF_BREAK)) {
+ switch_channel_clear_flag(channel, CF_BREAK);
+ status = SWITCH_STATUS_BREAK;
+ break;
+ }
- for (;;) {
- int done = 0;
- int do_speed = 1;
- int last_speed = -1;
+ if (switch_core_session_private_event_count(session)) {
+ switch_ivr_parse_all_events(session);
+ }
- if (!switch_channel_ready(channel)) {
- status = SWITCH_STATUS_FALSE;
- break;
- }
+ if (args && (args->input_callback || args->buf || args->buflen)) {
+ /*
+ dtmf handler function you can hook up to be executed when a digit is dialed during playback
+ if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
+ */
+ if (switch_channel_has_dtmf(channel)) {
+ if (!args->input_callback && !args->buf) {
+ status = SWITCH_STATUS_BREAK;
+ done = 1;
+ break;
+ }
+ switch_channel_dequeue_dtmf(channel, &dtmf);
+ if (args->input_callback) {
+ status = args->input_callback(session, (void *) &dtmf, SWITCH_INPUT_TYPE_DTMF, args->buf, args->buflen);
+ } else {
+ *((char *) args->buf) = dtmf.digit;
+ status = SWITCH_STATUS_BREAK;
+ }
+ }
- if (switch_channel_test_flag(channel, CF_BREAK)) {
- switch_channel_clear_flag(channel, CF_BREAK);
- status = SWITCH_STATUS_BREAK;
- break;
- }
+ if (args->input_callback) {
+ switch_event_t *event;
- if (switch_core_session_private_event_count(session)) {
- switch_ivr_parse_all_events(session);
- }
+ if (switch_core_session_dequeue_event(session, &event, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
+ status = args->input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, args->buf, args->buflen);
+ switch_event_destroy(&event);
+ }
+ }
- if (args && (args->input_callback || args->buf || args->buflen)) {
- /*
- dtmf handler function you can hook up to be executed when a digit is dialed during playback
- if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
- */
- if (switch_channel_has_dtmf(channel)) {
- if (!args->input_callback && !args->buf) {
- status = SWITCH_STATUS_BREAK;
+ if (status != SWITCH_STATUS_SUCCESS) {
done = 1;
break;
}
- switch_channel_dequeue_dtmf(channel, &dtmf);
- if (args->input_callback) {
- status = args->input_callback(session, (void *) &dtmf, SWITCH_INPUT_TYPE_DTMF, args->buf, args->buflen);
- } else {
- *((char *) args->buf) = dtmf.digit;
- status = SWITCH_STATUS_BREAK;
- }
}
- if (args->input_callback) {
- switch_event_t *event;
-
- if (switch_core_session_dequeue_event(session, &event, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
- status = args->input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, args->buf, args->buflen);
- switch_event_destroy(&event);
+ if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
+ if (framelen > FILE_STARTSAMPLES) {
+ framelen = FILE_STARTSAMPLES;
+ }
+ memset(abuf, 0, framelen);
+ olen = ilen;
+ do_speed = 0;
+ } else if (fh->sp_audio_buffer && (eof || (switch_buffer_inuse(fh->sp_audio_buffer) > (switch_size_t) (framelen)))) {
+ if (!(bread = switch_buffer_read(fh->sp_audio_buffer, abuf, framelen))) {
+ if (eof) {
+ continue;
+ } else {
+ break;
+ }
}
- }
- if (status != SWITCH_STATUS_SUCCESS) {
- done = 1;
- break;
- }
- }
+ if (bread < framelen) {
+ memset(abuf + bread, 0, framelen - bread);
+ }
- if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
- if (framelen > FILE_STARTSAMPLES) {
- framelen = FILE_STARTSAMPLES;
- }
- memset(abuf, 0, framelen);
- olen = ilen;
- do_speed = 0;
- } else if (fh->sp_audio_buffer && (eof || (switch_buffer_inuse(fh->sp_audio_buffer) > (switch_size_t) (framelen)))) {
- if (!(bread = switch_buffer_read(fh->sp_audio_buffer, abuf, framelen))) {
- if (eof) {
- continue;
- } else {
- break;
+ olen = asis ? framelen : ilen;
+ do_speed = 0;
+ } else if (fh->audio_buffer && (eof || (switch_buffer_inuse(fh->audio_buffer) > (switch_size_t) (framelen)))) {
+ if (!(bread = switch_buffer_read(fh->audio_buffer, abuf, framelen))) {
+ if (eof) {
+ break;
+ } else {
+ continue;
+ }
}
- }
- if (bread < framelen) {
- memset(abuf + bread, 0, framelen - bread);
- }
+ if (bread < framelen) {
+ memset(abuf + bread, 0, framelen - bread);
+ }
- olen = asis ? framelen : ilen;
- do_speed = 0;
- } else if (fh->audio_buffer && (eof || (switch_buffer_inuse(fh->audio_buffer) > (switch_size_t) (framelen)))) {
- if (!(bread = switch_buffer_read(fh->audio_buffer, abuf, framelen))) {
+ olen = asis ? framelen : ilen;
+ } else {
if (eof) {
- break;
- } else {
+ break;
+ }
+ olen = FILE_STARTSAMPLES;
+ if (!asis) {
+ olen /= 2;
+ }
+ if (switch_core_file_read(fh, abuf, &olen) != SWITCH_STATUS_SUCCESS) {
+ eof++;
continue;
}
+ switch_buffer_write(fh->audio_buffer, abuf, asis ? olen : olen * 2);
+ olen = switch_buffer_read(fh->audio_buffer, abuf, framelen);
+ if (!asis) {
+ olen /= 2;
+ }
}
- if (bread < framelen) {
- memset(abuf + bread, 0, framelen - bread);
+ if (done || olen <= 0) {
+ break;
}
- olen = asis ? framelen : ilen;
- } else {
- if (eof) {
- break;
- }
- olen = FILE_STARTSAMPLES;
- if (!asis) {
- olen /= 2;
- }
- if (switch_core_file_read(fh, abuf, &olen) != SWITCH_STATUS_SUCCESS) {
- eof++;
- continue;
- }
- switch_buffer_write(fh->audio_buffer, abuf, asis ? olen : olen * 2);
- olen = switch_buffer_read(fh->audio_buffer, abuf, framelen);
if (!asis) {
- olen /= 2;
+ if (fh->speed > 2) {
+ fh->speed = 2;
+ } else if (fh->speed < -2) {
+ fh->speed = -2;
+ }
}
- }
- if (done || olen <= 0) {
- break;
- }
-
- if (!asis) {
- if (fh->speed > 2) {
- fh->speed = 2;
- } else if (fh->speed < -2) {
- fh->speed = -2;
+ if (!asis && fh->audio_buffer && last_speed > -1 && last_speed != fh->speed) {
+ switch_buffer_zero(fh->sp_audio_buffer);
}
- }
-
- if (!asis && fh->audio_buffer && last_speed > -1 && last_speed != fh->speed) {
- switch_buffer_zero(fh->sp_audio_buffer);
- }
- if (switch_test_flag(fh, SWITCH_FILE_SEEK)) {
- /* file position has changed flush the buffer */
- switch_buffer_zero(fh->audio_buffer);
- switch_clear_flag(fh, SWITCH_FILE_SEEK);
- }
+ if (switch_test_flag(fh, SWITCH_FILE_SEEK)) {
+ /* file position has changed flush the buffer */
+ switch_buffer_zero(fh->audio_buffer);
+ switch_clear_flag(fh, SWITCH_FILE_SEEK);
+ }
- if (!asis && fh->speed && do_speed) {
- float factor = 0.25f * abs(fh->speed);
- switch_size_t newlen, supplement, step;
- short *bp = write_frame.data;
- switch_size_t wrote = 0;
+ if (!asis && fh->speed && do_speed) {
+ float factor = 0.25f * abs(fh->speed);
+ switch_size_t newlen, supplement, step;
+ short *bp = write_frame.data;
+ switch_size_t wrote = 0;
- supplement = (int) (factor * olen);
- if (!supplement) {
- supplement = 1;
- }
- newlen = (fh->speed > 0) ? olen - supplement : olen + supplement;
+ supplement = (int) (factor * olen);
+ if (!supplement) {
+ supplement = 1;
+ }
+ newlen = (fh->speed > 0) ? olen - supplement : olen + supplement;
- step = (fh->speed > 0) ? (newlen / supplement) : (olen / supplement);
+ step = (fh->speed > 0) ? (newlen / supplement) : (olen / supplement);
- if (!fh->sp_audio_buffer) {
- switch_buffer_create_dynamic(&fh->sp_audio_buffer, 1024, 1024, 0);
- }
+ if (!fh->sp_audio_buffer) {
+ switch_buffer_create_dynamic(&fh->sp_audio_buffer, 1024, 1024, 0);
+ }
- while ((wrote + step) < newlen) {
- switch_buffer_write(fh->sp_audio_buffer, bp, step * 2);
- wrote += step;
- bp += step;
- if (fh->speed > 0) {
- bp++;
- } else {
- float f;
- short s;
- f = (float) (*bp + *(bp + 1) + *(bp - 1));
- f /= 3;
- s = (short) f;
- switch_buffer_write(fh->sp_audio_buffer, &s, 2);
- wrote++;
+ while ((wrote + step) < newlen) {
+ switch_buffer_write(fh->sp_audio_buffer, bp, step * 2);
+ wrote += step;
+ bp += step;
+ if (fh->speed > 0) {
+ bp++;
+ } else {
+ float f;
+ short s;
+ f = (float) (*bp + *(bp + 1) + *(bp - 1));
+ f /= 3;
+ s = (short) f;
+ switch_buffer_write(fh->sp_audio_buffer, &s, 2);
+ wrote++;
+ }
}
+ if (wrote < newlen) {
+ switch_size_t r = newlen - wrote;
+ switch_buffer_write(fh->sp_audio_buffer, bp, r * 2);
+ wrote += r;
+ }
+ last_speed = fh->speed;
+ continue;
}
- if (wrote < newlen) {
- switch_size_t r = newlen - wrote;
- switch_buffer_write(fh->sp_audio_buffer, bp, r * 2);
- wrote += r;
+
+ if (olen < llen) {
+ uint8_t *dp = (uint8_t *) write_frame.data;
+ memset(dp + (int) olen, 0, (int) (llen - olen));
+ olen = llen;
}
- last_speed = fh->speed;
- continue;
- }
- if (olen < llen) {
- uint8_t *dp = (uint8_t *) write_frame.data;
- memset(dp + (int) olen, 0, (int) (llen - olen));
- olen = llen;
- }
- write_frame.samples = (uint32_t) olen;
+ write_frame.samples = (uint32_t) olen;
- if (asis) {
- write_frame.datalen = (uint32_t) olen;
- } else {
- write_frame.datalen = write_frame.samples * 2;
- }
+ if (asis) {
+ write_frame.datalen = (uint32_t) olen;
+ } else {
+ write_frame.datalen = write_frame.samples * 2;
+ }
- llen = olen;
+ llen = olen;
- if (timer_name) {
- write_frame.timestamp = timer.samplecount;
- }
+ if (timer_name) {
+ write_frame.timestamp = timer.samplecount;
+ }
#ifndef WIN32
#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
- if (!asis && l16) {
- switch_swap_linear(write_frame.data, (int) write_frame.datalen / 2);
- }
+ if (!asis && l16) {
+ switch_swap_linear(write_frame.data, (int) write_frame.datalen / 2);
+ }
#endif
#endif
- if (fh->vol) {
- switch_change_sln_volume(write_frame.data, write_frame.datalen / 2, fh->vol);
- }
-
- fh->offset_pos += write_frame.samples / 2;
- status = switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
-
- if (status == SWITCH_STATUS_MORE_DATA) {
- status = SWITCH_STATUS_SUCCESS;
- continue;
- } else if (status != SWITCH_STATUS_SUCCESS) {
- done = 1;
- break;
- }
+ if (fh->vol) {
+ switch_change_sln_volume(write_frame.data, write_frame.datalen / 2, fh->vol);
+ }
- if (done) {
- break;
- }
+ fh->offset_pos += write_frame.samples / 2;
+ status = switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
- if (timer_name) {
- if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) {
+ if (status == SWITCH_STATUS_MORE_DATA) {
+ status = SWITCH_STATUS_SUCCESS;
+ continue;
+ } else if (status != SWITCH_STATUS_SUCCESS) {
+ done = 1;
break;
}
- } else { /* time off the channel (if you must) */
- switch_frame_t *read_frame;
- switch_status_t tstatus;
- while (switch_channel_ready(channel) && switch_channel_test_flag(channel, CF_HOLD)) {
- switch_yield(10000);
- }
- tstatus = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
-
- if (!SWITCH_READ_ACCEPTABLE(tstatus)) {
+ if (done) {
break;
}
- if (args && (args->read_frame_callback)) {
- int ok = 1;
- switch_set_flag(fh, SWITCH_FILE_CALLBACK);
- if (args->read_frame_callback(session, read_frame, args->user_data) != SWITCH_STATUS_SUCCESS) {
- ok = 0;
+ if (timer_name) {
+ if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) {
+ break;
}
- switch_clear_flag(fh, SWITCH_FILE_CALLBACK);
- if (!ok) {
+ } else { /* time off the channel (if you must) */
+ switch_frame_t *read_frame;
+ switch_status_t tstatus;
+ while (switch_channel_ready(channel) && switch_channel_test_flag(channel, CF_HOLD)) {
+ switch_yield(10000);
+ }
+
+ tstatus = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
+
+ if (!SWITCH_READ_ACCEPTABLE(tstatus)) {
break;
}
+
+ if (args && (args->read_frame_callback)) {
+ int ok = 1;
+ switch_set_flag(fh, SWITCH_FILE_CALLBACK);
+ if (args->read_frame_callback(session, read_frame, args->user_data) != SWITCH_STATUS_SUCCESS) {
+ ok = 0;
+ }
+ switch_clear_flag(fh, SWITCH_FILE_CALLBACK);
+ if (!ok) {
+ break;
+ }
+ }
}
}
- }
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "done playing file\n");
- //switch_core_file_seek(fh, &fh->last_pos, 0, SEEK_CUR);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "done playing file\n");
+
+ switch_channel_set_variable_printf(channel, "playback_ms", "%d", fh->samples_out / read_impl.samples_per_second);
+ switch_channel_set_variable_printf(channel, "playback_samples", "%d", fh->samples_out);
+ switch_core_file_close(fh);
- switch_channel_set_variable_printf(channel, "playback_ms", "%d", fh->samples_out / read_impl.samples_per_second);
- switch_channel_set_variable_printf(channel, "playback_samples", "%d", fh->samples_out);
+ if (fh->audio_buffer) {
+ switch_buffer_destroy(&fh->audio_buffer);
+ }
+
+ if (fh->sp_audio_buffer) {
+ switch_buffer_destroy(&fh->sp_audio_buffer);
+ }
+ }
- switch_core_file_close(fh);
- switch_buffer_destroy(&fh->audio_buffer);
- switch_buffer_destroy(&fh->sp_audio_buffer);
- if (!asis) {
+ if (switch_core_codec_ready((&codec))) {
switch_core_codec_destroy(&codec);
}
- if (timer_name) {
+
+ if (timer.samplecount) {
/* End the audio absorbing thread */
switch_core_thread_session_end(session);
switch_core_timer_destroy(&timer);
}
- end:
+
switch_safe_free(abuf);
switch_core_session_reset(session, SWITCH_FALSE, SWITCH_TRUE);
@@ -1600,7 +1661,7 @@
memset(digit_buffer, 0, digit_buffer_length);
switch_channel_flush_dtmf(channel);
status = switch_ivr_read(session, min_digits, max_digits, prompt_audio_file, var_name,
- digit_buffer, digit_buffer_length, timeout, valid_terminators);
+ digit_buffer, digit_buffer_length, timeout, valid_terminators);
if (status == SWITCH_STATUS_TIMEOUT && strlen(digit_buffer) >= min_digits) {
status = SWITCH_STATUS_SUCCESS;
}
1
0
Author: mrene
Date: Tue Apr 28 15:41:44 2009
New Revision: 13181
Log:
switch_core.h doxygen update
Modified:
freeswitch/trunk/src/include/switch_core.h
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Tue Apr 28 15:41:44 2009
@@ -412,6 +412,10 @@
*/
SWITCH_DECLARE(int) switch_core_add_state_handler(_In_ const switch_state_handler_table_t *state_handler);
+/*!
+ \brief Remove a global state handler
+ \param state_handler the state handler to remove
+*/
SWITCH_DECLARE(void) switch_core_remove_state_handler(_In_ const switch_state_handler_table_t *state_handler);
/*!
@@ -642,7 +646,7 @@
#endif
/*!
- \brief Locate a session based on it's uuiid
+ \brief Locate a session based on it's uuid
\param uuid_str the unique id of the session you want to find
\return the session or NULL
\note if the session was located it will have a read lock obtained which will need to be released with switch_core_session_rwunlock()
@@ -653,7 +657,12 @@
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(_In_z_ const char *uuid_str);
#endif
-
+/*!
+ \brief Locate a session based on it's uuid even if the channel is not ready
+ \param uuid_str the unique id of the session you want to find
+ \return the session or NULL
+ \note if the session was located it will have a read lock obtained which will need to be released with switch_core_session_rwunlock()
+*/
#ifdef SWITCH_DEBUG_RWLOCKS
#define switch_core_session_locate(uuid_str) switch_core_session_perform_force_locate(uuid_str, __FILE__, __SWITCH_FUNC__, __LINE__)
#else
@@ -677,14 +686,31 @@
SWITCH_DECLARE(void) switch_core_dump_variables(_In_ switch_stream_handle_t *stream);
/*!
- \brief Hangup All Sessions
+ \brief Hangup all sessions
\param cause the hangup cause to apply to the hungup channels
*/
SWITCH_DECLARE(void) switch_core_session_hupall(_In_ switch_call_cause_t cause);
+/*!
+ \brief Hangup all sessions which match a specific channel variable
+ \param var_name The variable name to look for
+ \param var_val The value to look for
+ \param cause the hangup cause to apply to the hungup channels
+*/
SWITCH_DECLARE(void) switch_core_session_hupall_matching_var(_In_ const char *var_name, _In_ const char *var_val, _In_ switch_call_cause_t cause);
+/*!
+ \brief Hangup all sessions that belong to an endpoint
+ \param endpoint_interface The endpoint interface
+ \param cause the hangup cause to apply to the hungup channels
+*/
SWITCH_DECLARE(void) switch_core_session_hupall_endpoint(const switch_endpoint_interface_t *endpoint_interface, switch_call_cause_t cause);
+/*!
+ \brief Get the session's partner (the session its bridged to)
+ \param session The session we're searching with
+ \param partner [out] The session's partner, or NULL if it wasnt found
+ \return SWITCH_STATUS_SUCCESS or SWITCH_STATUS_FALSE if this session isn't bridged
+*/
SWITCH_DECLARE(switch_status_t) switch_core_session_get_partner(switch_core_session_t *session, switch_core_session_t **partner);
/*!
@@ -725,14 +751,14 @@
\brief DE-Queue an message on a given session
\param session the session to de-queue the message on
\param message the de-queued message
- \return the SWITCH_STATUS_SUCCESS if the message was de-queued
+ \return SWITCH_STATUS_SUCCESS if the message was de-queued
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_message(_In_ switch_core_session_t *session, _Out_ switch_core_session_message_t **message);
/*!
\brief Flush a message queue on a given session
\param session the session to de-queue the message on
- \return the SWITCH_STATUS_SUCCESS if the message was de-queued
+ \return SWITCH_STATUS_SUCCESS if the message was de-queued
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_flush_message(_In_ switch_core_session_t *session);
@@ -746,12 +772,35 @@
SWITCH_DECLARE(switch_app_log_t *) switch_core_session_get_app_log(_In_ switch_core_session_t *session);
+/*!
+ \brief Execute an application on a session
+ \param session the current session
+ \param application_interface the interface of the application to execute
+ \param arg application arguments
+ \warning Has to be called from the session's thread
+ \return the application's return value
+*/
SWITCH_DECLARE(switch_status_t) switch_core_session_exec(_In_ switch_core_session_t *session,
_In_ const switch_application_interface_t *application_interface, _In_opt_z_ const char *arg);
-
+/*!
+ \brief Execute an application on a session
+ \param session the current session
+ \param app the application's name
+ \param arg application arguments
+ \warning Has to be called from the session's thread
+ \return the application's return value
+*/
SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application(_In_ switch_core_session_t *session,
_In_ const char *app, _In_opt_z_ const char *arg);
-
+/*!
+ \brief Run a dialplan and execute an extension
+ \param session the current session
+ \param exten the interface of the application to execute
+ \param arg application arguments
+ \note It does not change the channel back to CS_ROUTING, it manually calls the dialplan and executes the applications
+ \warning Has to be called from the session's thread
+ \return the application's return value
+*/
SWITCH_DECLARE(switch_status_t) switch_core_session_execute_exten(_In_ switch_core_session_t *session,
_In_z_ const char *exten,
_In_opt_z_ const char *dialplan, _In_opt_z_ const char *context);
@@ -980,10 +1029,16 @@
/*!
\brief Send DTMF to a session
\param session session to send DTMF to
- \param dtmf string to send to the session
+ \param dtmf dtmf to send to the session
\return SWITCH_STATUS_SUCCESS if the dtmf was written
*/
SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(_In_ switch_core_session_t *session, const switch_dtmf_t *dtmf);
+/*!
+ \brief Send DTMF to a session
+ \param session session to send DTMF to
+ \param dtmf_string string to send to the session
+ \return SWITCH_STATUS_SUCCESS if the dtmf was written
+*/
SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf_string(switch_core_session_t *session, const char *dtmf_string);
/*!
@@ -1076,8 +1131,28 @@
*/
SWITCH_DECLARE(void *) switch_core_hash_find_locked(_In_ switch_hash_t *hash, _In_z_ const char *key, _In_ switch_mutex_t *mutex);
+/*!
+ \brief Gets the first element of a hashtable
+ \param depricate_me [deprecated] NULL
+ \param hash the hashtable to use
+ \return The element, or NULL if it wasn't found
+*/
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(char *depricate_me, _In_ switch_hash_t *hash);
+
+/*!
+ \brief Gets the next element of a hashtable
+ \param hi The current element
+ \return The next element, or NULL if there are no more
+*/
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(_In_ switch_hash_index_t *hi);
+
+/*!
+ \brief Gets the key and value of the current hash element
+ \param hi The current element
+ \param key [out] the key
+ \param klen [out] the key's size
+ \param val [out] the value
+*/
SWITCH_DECLARE(void) switch_hash_this(_In_ switch_hash_index_t *hi, _Out_opt_ptrdiff_cap_(klen)
const void **key, _Out_opt_ switch_ssize_t *klen, _Out_ void **val);
@@ -1729,12 +1804,18 @@
SWITCH_DECLARE(void) switch_core_set_globals(void);
/*!
- \brief indicate if 2 sessions are the same type
+ \brief Checks if 2 sessions are using the same endpoint module
\param a the first session
\param b the second session
\return TRUE or FALSE
*/
SWITCH_DECLARE(uint8_t) switch_core_session_compare(switch_core_session_t *a, switch_core_session_t *b);
+/*!
+ \brief Checks if a session is using a specific endpoint
+ \param session the session
+ \param endpoint_interface interface of the endpoint to check
+ \return TRUE or FALSE
+*/
SWITCH_DECLARE(uint8_t) switch_core_session_check_interface(switch_core_session_t *session, const switch_endpoint_interface_t *endpoint_interface);
SWITCH_DECLARE(switch_hash_index_t *) switch_core_mime_index(void);
SWITCH_DECLARE(const char *) switch_core_mime_ext2type(const char *ext);
@@ -1742,6 +1823,10 @@
SWITCH_DECLARE(switch_loadable_module_interface_t *) switch_loadable_module_create_module_interface(switch_memory_pool_t *pool, const char *name);
SWITCH_DECLARE(void *) switch_loadable_module_create_interface(switch_loadable_module_interface_t *mod, switch_module_interface_name_t iname);
+/*!
+ \brief Get the current epoch time in microseconds
+ \return the current epoch time in microseconds
+*/
SWITCH_DECLARE(switch_time_t) switch_micro_time_now(void);
SWITCH_DECLARE(void) switch_core_memory_reclaim(void);
SWITCH_DECLARE(void) switch_core_memory_reclaim_events(void);
@@ -1749,6 +1834,11 @@
SWITCH_DECLARE(void) switch_core_memory_reclaim_all(void);
SWITCH_DECLARE(void) switch_core_setrlimits(void);
SWITCH_DECLARE(void) switch_time_sync(void);
+/*!
+ \brief Get the current epoch time
+ \param [out] (optional) The current epoch time
+ \return The current epoch time
+*/
SWITCH_DECLARE(time_t) switch_epoch_time_now(time_t *t);
SWITCH_DECLARE(switch_status_t) switch_strftime_tz(const char *tz, const char *format, char *date, size_t len, switch_time_t thetime);
SWITCH_DECLARE(switch_status_t) switch_time_exp_tz_name(const char *tz, switch_time_exp_t *tm, switch_time_t thetime);
1
0
28 Apr '09
Author: anthm
Date: Tue Apr 28 11:00:16 2009
New Revision: 13180
Log:
fix typo in CALL_INFO/ALERT_INFO
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Tue Apr 28 11:00:16 2009
@@ -2976,7 +2976,7 @@
NUTAG_WITH_THIS(profile->nua),
TAG_IF(ct, SIPTAG_CONTENT_TYPE_STR(ct)),
TAG_IF(alert_info, SIPTAG_ALERT_INFO_STR(alert_info)),
- TAG_IF(call_info, SIPTAG_ALERT_INFO_STR(call_info)),
+ TAG_IF(call_info, SIPTAG_CALL_INFO_STR(call_info)),
TAG_IF(!switch_strlen_zero(body), SIPTAG_PAYLOAD_STR(body)),
TAG_END());
1
0
Author: anthm
Date: Tue Apr 28 10:32:37 2009
New Revision: 13179
Log:
prevent div by zero
Modified:
freeswitch/trunk/src/switch_rtp.c
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Tue Apr 28 10:32:37 2009
@@ -1500,7 +1500,7 @@
}
poll_loop = 1;
- rtp_session->missed_count += (poll_sec * 1000 ) / (rtp_session->ms_per_packet / 1000);
+ rtp_session->missed_count += (poll_sec * 1000 ) / (rtp_session->ms_per_packet ? rtp_session->ms_per_packet : 20 / 1000);
bytes = 0;
}
1
0
Author: anthm
Date: Tue Apr 28 10:11:38 2009
New Revision: 13178
Log:
fix win32 build
Modified:
freeswitch/trunk/src/switch_core_state_machine.c
Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c (original)
+++ freeswitch/trunk/src/switch_core_state_machine.c Tue Apr 28 10:11:38 2009
@@ -573,6 +573,7 @@
int do_extra_handlers = 1;
int silly = 0;
int index = 0;
+ const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
if (switch_channel_test_flag(session->channel, CF_REPORTING)) {
return;
@@ -589,9 +590,6 @@
driver_state_handler = endpoint_interface->state_handler;
switch_assert(driver_state_handler != NULL);
-
- const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
-
if (!switch_strlen_zero(var)) {
if (!strcasecmp(var, "a_only")) {
if (switch_channel_get_originator_caller_profile(session->channel)) {
1
0
[commit] r13177 - in freeswitch/trunk/libs/spandsp: src src/spandsp src/spandsp/private tests tests/msvc
by FreeSWITCH SVN 28 Apr '09
by FreeSWITCH SVN 28 Apr '09
28 Apr '09
Author: mikej
Date: Tue Apr 28 09:42:18 2009
New Revision: 13177
Log:
update to snapshot spandsp-20090427
Added:
freeswitch/trunk/libs/spandsp/tests/msvc/
freeswitch/trunk/libs/spandsp/tests/msvc/adsi_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/complex_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_float_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_int_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_rx_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_tx_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/queue_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/t38_core_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/t38_non_ecm_buffer_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/t38_terminal_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/v22bis_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/v29_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/v80_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/v8_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/vector_float_tests.vcproj
freeswitch/trunk/libs/spandsp/tests/msvc/vector_int_tests.vcproj
Modified:
freeswitch/trunk/libs/spandsp/src/async.c
freeswitch/trunk/libs/spandsp/src/at_interpreter.c
freeswitch/trunk/libs/spandsp/src/fax.c
freeswitch/trunk/libs/spandsp/src/g722.c
freeswitch/trunk/libs/spandsp/src/libspandsp.2008.sln
freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c
freeswitch/trunk/libs/spandsp/src/spandsp/async.h
freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
freeswitch/trunk/libs/spandsp/src/spandsp/private/v22bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/v17rx.c
freeswitch/trunk/libs/spandsp/src/v17tx.c
freeswitch/trunk/libs/spandsp/src/v18.c
freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/src/v29tx.c
freeswitch/trunk/libs/spandsp/tests/Makefile.am
freeswitch/trunk/libs/spandsp/tests/adsi_tests.c
freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c
freeswitch/trunk/libs/spandsp/tests/complex_vector_float_tests.c
freeswitch/trunk/libs/spandsp/tests/complex_vector_int_tests.c
freeswitch/trunk/libs/spandsp/tests/fax_utils.c
freeswitch/trunk/libs/spandsp/tests/g711_tests.c
freeswitch/trunk/libs/spandsp/tests/g722_tests.c
freeswitch/trunk/libs/spandsp/tests/g726_tests.c
freeswitch/trunk/libs/spandsp/tests/gsm0610_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_core_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_gateway_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_gateway_to_terminal_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_non_ecm_buffer_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_terminal_tests.c
freeswitch/trunk/libs/spandsp/tests/t38_terminal_to_gateway_tests.c
freeswitch/trunk/libs/spandsp/tests/v17_tests.c
freeswitch/trunk/libs/spandsp/tests/v22bis_tests.c
freeswitch/trunk/libs/spandsp/tests/v27ter_tests.c
freeswitch/trunk/libs/spandsp/tests/v29_tests.c
freeswitch/trunk/libs/spandsp/tests/v8_tests.c
freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c
freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c
Modified: freeswitch/trunk/libs/spandsp/src/async.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/async.c (original)
+++ freeswitch/trunk/libs/spandsp/src/async.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.c,v 1.18 2009/02/10 13:06:46 steveu Exp $
+ * $Id: async.c,v 1.19 2009/04/23 14:12:34 steveu Exp $
*/
/*! \file */
@@ -67,6 +67,10 @@
return "Shutdown complete";
case SIG_STATUS_OCTET_REPORT:
return "Octet report";
+ case SIG_STATUS_POOR_SIGNAL_QUALITY:
+ return "Poor signal quality";
+ case SIG_STATUS_MODEM_RETRAIN_OCCURRED:
+ return "Modem retrain occurred";
}
return "???";
}
Modified: freeswitch/trunk/libs/spandsp/src/at_interpreter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/at_interpreter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/at_interpreter.c Tue Apr 28 09:42:18 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter.c,v 1.37 2009/03/23 14:17:42 steveu Exp $
+ * $Id: at_interpreter.c,v 1.39 2009/04/24 22:35:25 steveu Exp $
*/
/*! \file */
@@ -519,6 +519,64 @@
}
/*- End of function --------------------------------------------------------*/
+static int parse_n_out(at_state_t *s,
+ const char **t,
+ int *targets[],
+ const int max_values[],
+ int entries,
+ const char *prefix,
+ const char *def)
+{
+ char buf[100];
+ int val;
+ int len;
+ int i;
+
+ switch (*(*t)++)
+ {
+ case '=':
+ switch (**t)
+ {
+ case '?':
+ /* Show possible values */
+ (*t)++;
+ snprintf(buf, sizeof(buf), "%s%s", (prefix) ? prefix : "", def);
+ at_put_response(s, buf);
+ break;
+ default:
+ /* Set value */
+ for (i = 0; i < entries; i++)
+ {
+ if ((val = parse_num(t, max_values[i])) < 0)
+ return FALSE;
+ if (targets[i])
+ *targets[i] = val;
+ if (**t != ',')
+ break;
+ (*t)++;
+ }
+ break;
+ }
+ break;
+ case '?':
+ /* Show current value */
+ len = snprintf(buf, sizeof(buf), "%s", (prefix) ? prefix : "");
+ for (i = 0; i < entries; i++)
+ {
+ if (i > 0)
+ len += snprintf(&buf[len], sizeof(buf) - len, ",");
+ val = (targets[i]) ? *targets[i] : 0;
+ len += snprintf(&buf[len], sizeof(buf) - len, "%d", val);
+ }
+ at_put_response(s, buf);
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+/*- End of function --------------------------------------------------------*/
+
static int parse_hex_out(at_state_t *s, const char **t, int *target, int max_value, const char *prefix, const char *def)
{
char buf[100];
@@ -3191,9 +3249,76 @@
static const char *at_cmd_plus_ES(at_state_t *s, const char *t)
{
+ static const int maxes[3] =
+ {
+ 7, 4, 9
+ };
+ int *locations[3];
+
/* V.250 6.5.1 - Error control selection */
+
+ /* orig_rqst
+ 0: Direct mode
+ 1: Initiate call with Buffered mode only
+ 2: Initiate V.42 without Detection Phase. If Rec. V.8 is in use, this is a request to disable V.42 Detection Phase
+ 3: Initiate V.42 with Detection Phase
+ 4: Initiate Altemative Protocol
+ 5: Initiate Synchronous Mode when connection is completed, immediately after the entire CONNECT result code
+ is delivered. V.24 circuits 113 and 115 are activated when Data State is entered
+ 6: Initiate Synchronous Access Mode when connection is completed, and Data State is entered
+ 7: Initiate Frame Tunnelling Mode when connection is completed, and Data State is entered
+
+ orig_fbk
+ 0: Error control optional (either LAPM or Alternative acceptable); if error control not established, maintain
+ DTE-DCE data rate and use V.14 buffered mode with flow control during non-error-control operation
+ 1: Error control optional (either LAPM or Alternative acceptable); if error control not established, change
+ DTE-DCE data rate to match line rate and use Direct mode
+ 2: Error control required (either LAPM or Alternative acceptable); if error control not established, disconnect
+ 3: Error control required (only LAPM acceptable); if error control not established, disconnect
+ 4: Error control required (only Altemative protocol acceptable); if error control not established, disconnect
+
+ ans_fbk
+ 0: Direct mode
+ 1: Error control disabled, use Buffered mode
+ 2: Error control optional (either LAPM or Alternative acceptable); if error control not established, maintain
+ DTE-DCE data rate and use local buffering and flow control during non-error-control operation
+ 3: Error control optional (either LAPM or Alternative acceptable); if error control not established, change
+ DTE-DCE data rate to match line rate and use Direct mode
+ 4: Error control required (either LAPM or Alternative acceptable); if error control not established, disconnect
+ 5: Error control required (only LAPM acceptable); if error control not established, disconnect
+ 6: Error control required (only Alternative protocol acceptable); if error control not established, disconnect
+ 7: Initiate Synchronous Mode when connection is completed, immediately after the entire CONNECT result code
+ is delivered. V.24 cicuits 113 and 115 are activated when Data State is entered
+ 8: Initiate Synchronous Access Mode when connection is completed, and Data State is entered
+ 9: Initiate Frame Tunnelling Mode when connection is completed, and Data State is entered */
+
/* TODO: */
t += 3;
+ locations[0] = NULL;
+ locations[1] = NULL;
+ locations[2] = NULL;
+ if (!parse_n_out(s, &t, locations, maxes, 3, "+ES:", "(0-7),(0-4),(0-9)"))
+ return NULL;
+ return t;
+}
+/*- End of function --------------------------------------------------------*/
+
+static const char *at_cmd_plus_ESA(at_state_t *s, const char *t)
+{
+ static const int maxes[8] =
+ {
+ 2, 1, 1, 1, 2, 1, 255, 255
+ };
+ int *locations[8];
+ int i;
+
+ /* V.80 8.2 - Synchronous access mode configuration */
+ /* TODO: */
+ t += 4;
+ for (i = 0; i < 8; i++)
+ locations[i] = NULL;
+ if (!parse_n_out(s, &t, locations, maxes, 8, "+ESA:", "(0-2),(0-1),(0-1),(0-1),(0-2),(0-1),(0-255),(0-255)"))
+ return NULL;
return t;
}
/*- End of function --------------------------------------------------------*/
@@ -3800,18 +3925,66 @@
static const char *at_cmd_plus_IBC(at_state_t *s, const char *t)
{
- /* TIA-617 8.3 - Control of in-band control */
+ static const int maxes[13] =
+ {
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+ };
+ int *locations[13];
+ int i;
+
+ /* V.80 7.9 - Control of in-band control */
/* TODO: */
t += 4;
+ /* 0: In-band control service disabled
+ 1: In-band control service enabled, 7-bit codes allowed, and top bit insignificant
+ 2; In-band control service enabled, 7-bit codes allowed, and 8-bit codes available
+
+ Circuits 105, 106, 107, 108, 109, 110, 125, 132, 133, 135, 142 in that order. For each one:
+ 0: disabled
+ 1: enabled
+
+ DCE line connect status reports:
+ 0: disabled
+ 1: enabled */
+ for (i = 0; i < 13; i++)
+ locations[i] = NULL;
+ if (!parse_n_out(s, &t, locations, maxes, 13, "+IBC:", "(0-2),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0.1),(0,1)"))
+ return NULL;
return t;
}
/*- End of function --------------------------------------------------------*/
static const char *at_cmd_plus_IBM(at_state_t *s, const char *t)
{
- /* TIA-617 8.4 - In-Band MARK idle reporting control */
- /* TODO: */
- t += 4;
+ static const int maxes[3] =
+ {
+ 7, 255, 255
+ };
+ int *locations[3];
+
+ /* V.80 7.10 - In-band MARK idle reporting control */
+ /* TODO: */
+ t += 4;
+ /* Report control
+ 0: No reports
+ 1: Report only once when <T1 > expires
+ 2: Report each time <T2> expires
+ 3: Report once when <T1> expires, and then each time <T2> expires
+ 4: Report only when the Mark-ldle Period ends; T3 = the entire interval
+ 5: Report the first time when <T1> is exceeded, and then once more when the mark idle period ends
+ 6: Report each time when <T2> is exceeded, and then once more when the mark idle period ends;
+ T3 = entire interval -- N*T2
+ 7: report the first time when <T1> is exceeded, and then each time <T2> is exceeded, and then once
+ more when the mark idle period ends; T3 = entire mark idle period -- N*T2 - T1
+
+ T1 in units of 10ms
+
+ T2 in units of 10ms */
+ locations[0] = NULL;
+ locations[1] = NULL;
+ locations[2] = NULL;
+ if (!parse_n_out(s, &t, locations, maxes, 3, "+IBM:", "(0-7),(0-255),(0-255)"))
+ return NULL;
return t;
}
/*- End of function --------------------------------------------------------*/
@@ -3821,19 +3994,19 @@
/* V.250 6.2.11 - DTE-DCE character framing */
t += 4;
/* Character format
- 0 auto detect
- 1 8 data 2 stop
- 2 8 data 1 parity 1 stop
- 3 8 data 1 stop
- 4 7 data 2 stop
- 5 7 data 1 parity 1 stop
- 6 7 data 1 stop
+ 0: auto detect
+ 1: 8 data 2 stop
+ 2: 8 data 1 parity 1 stop
+ 3: 8 data 1 stop
+ 4: 7 data 2 stop
+ 5: 7 data 1 parity 1 stop
+ 6: 7 data 1 stop
- parity
- 0 Odd
- 1 Even
- 2 Mark
- 3 Space */
+ Parity
+ 0: Odd
+ 1: Even
+ 2: Mark
+ 3: Space */
if (!parse_2_out(s, &t, &s->dte_char_format, 6, &s->dte_parity, 3, "+ICF:", "(0-6),(0-3)"))
return NULL;
return t;
@@ -3909,6 +4082,15 @@
}
/*- End of function --------------------------------------------------------*/
+static const char *at_cmd_plus_ITF(at_state_t *s, const char *t)
+{
+ /* V.80 8.4 - Transmit flow control thresholds */
+ /* TODO: */
+ t += 5;
+ return t;
+}
+/*- End of function --------------------------------------------------------*/
+
static const char *at_cmd_plus_MA(at_state_t *s, const char *t)
{
/* V.250 6.4.2 - Modulation automode control */
Modified: freeswitch/trunk/libs/spandsp/src/fax.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fax.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fax.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax.c,v 1.91 2009/04/12 03:29:58 steveu Exp $
+ * $Id: fax.c,v 1.92 2009/04/23 15:48:21 steveu Exp $
*/
/*! \file */
@@ -575,7 +575,7 @@
(void *) s,
fax_send_hdlc,
(void *) s);
- t30_set_supported_modems(&s->t30, T30_SUPPORT_V27TER | T30_SUPPORT_V29);
+ t30_set_supported_modems(&s->t30, T30_SUPPORT_V27TER | T30_SUPPORT_V29 | T30_SUPPORT_V17);
t30_restart(&s->t30);
#if defined(LOG_FAX_AUDIO)
{
Modified: freeswitch/trunk/libs/spandsp/src/g722.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g722.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g722.c Tue Apr 28 09:42:18 2009
@@ -28,7 +28,7 @@
* Computer Science, Speech Group
* Chengxiang Lu and Alex Hauptmann
*
- * $Id: g722.c,v 1.9 2009/02/21 04:27:46 steveu Exp $
+ * $Id: g722.c,v 1.10 2009/04/22 12:57:40 steveu Exp $
*/
/*! \file */
@@ -415,7 +415,8 @@
{
if (s->eight_k)
{
- amp[outlen++] = (int16_t) rlow;
+ /* We shift by 1 to allow for the 15 bit input to the G.722 algorithm. */
+ amp[outlen++] = (int16_t) (rlow << 1);
}
else
{
@@ -424,8 +425,10 @@
s->y[s->ptr] = (int16_t) (rlow - rhigh);
if (++s->ptr >= 12)
s->ptr = 0;
- amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr) >> 12);
- amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr) >> 12);
+ /* We shift by 12 to allow for the QMF filters (DC gain = 4096), less 1
+ to allow for the 15 bit input to the G.722 algorithm. */
+ amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr) >> 11);
+ amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr) >> 11);
}
}
}
@@ -511,7 +514,8 @@
{
if (s->eight_k)
{
- xlow = amp[j++];
+ /* We shift by 1 to allow for the 15 bit input to the G.722 algorithm. */
+ xlow = amp[j++] >> 1;
}
else
{
@@ -522,8 +526,11 @@
s->ptr = 0;
sumodd = vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr);
sumeven = vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr);
- xlow = (int16_t) ((sumeven + sumodd) >> 13);
- xhigh = (int16_t) ((sumeven - sumodd) >> 13);
+ /* We shift by 12 to allow for the QMF filters (DC gain = 4096), plus 1
+ to allow for us summing two filters, plus 1 to allow for the 15 bit
+ input to the G.722 algorithm. */
+ xlow = (int16_t) ((sumeven + sumodd) >> 14);
+ xhigh = (int16_t) ((sumeven - sumodd) >> 14);
}
}
/* Block 1L, SUBTRA */
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.2008.sln
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.2008.sln (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.2008.sln Tue Apr 28 09:42:18 2009
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_at_dictionary", "msvc\make_at_dictionary.2008.vcproj", "{DEE932AB-5911-4700-9EEB-8C7090A0A330}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "msvc\make_modem_filter.2008.vcproj", "{329A6FA0-0FCC-4435-A950-E670AEFA9838}"
@@ -19,6 +19,41 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download TIFF", "msvc\Download_TIFF.2008.vcproj", "{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t38_core_tests", "..\tests\msvc\t38_core_tests.vcproj", "{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t38_non_ecm_buffer_tests", "..\tests\msvc\t38_non_ecm_buffer_tests.vcproj", "{80A3D9D9-3846-4DA5-8676-F940D725EA62}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_int_tests", "..\tests\msvc\vector_int_tests.vcproj", "{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_float_tests", "..\tests\msvc\vector_float_tests.vcproj", "{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_tests", "..\tests\msvc\complex_tests.vcproj", "{A349379F-0FEA-49C8-9535-05F39663337B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_vector_float_tests", "..\tests\msvc\complex_vector_float_tests.vcproj", "{2B0D705C-1CF2-401C-BFBC-A43FB806908C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_vector_int_tests", "..\tests\msvc\complex_vector_int_tests.vcproj", "{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@@ -76,6 +111,69 @@
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.Build.0 = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|x64.ActiveCfg = All|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|Win32.ActiveCfg = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|Win32.Build.0 = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|x64.ActiveCfg = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|Win32.Build.0 = Debug|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|x64.ActiveCfg = Debug|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|Win32.ActiveCfg = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|Win32.Build.0 = Release|Win32
+ {A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|x64.ActiveCfg = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|Win32.ActiveCfg = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|Win32.Build.0 = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|x64.ActiveCfg = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|Win32.ActiveCfg = Debug|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|Win32.Build.0 = Debug|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|x64.ActiveCfg = Debug|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|Win32.ActiveCfg = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|Win32.Build.0 = Release|Win32
+ {80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|x64.ActiveCfg = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|Win32.ActiveCfg = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|Win32.Build.0 = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|x64.ActiveCfg = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|Win32.Build.0 = Debug|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|x64.ActiveCfg = Debug|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|Win32.ActiveCfg = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|Win32.Build.0 = Release|Win32
+ {80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|x64.ActiveCfg = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|Win32.ActiveCfg = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|Win32.Build.0 = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|x64.ActiveCfg = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|Win32.Build.0 = Debug|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|x64.ActiveCfg = Debug|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|Win32.ActiveCfg = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|Win32.Build.0 = Release|Win32
+ {EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|x64.ActiveCfg = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.All|Win32.ActiveCfg = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.All|Win32.Build.0 = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.All|x64.ActiveCfg = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Debug|Win32.Build.0 = Debug|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Debug|x64.ActiveCfg = Debug|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Release|Win32.ActiveCfg = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Release|Win32.Build.0 = Release|Win32
+ {A349379F-0FEA-49C8-9535-05F39663337B}.Release|x64.ActiveCfg = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|Win32.ActiveCfg = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|Win32.Build.0 = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|x64.ActiveCfg = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|Win32.Build.0 = Debug|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|x64.ActiveCfg = Debug|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|Win32.ActiveCfg = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|Win32.Build.0 = Release|Win32
+ {2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|x64.ActiveCfg = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|Win32.ActiveCfg = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|Win32.Build.0 = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|x64.ActiveCfg = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|Win32.Build.0 = Debug|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|x64.ActiveCfg = Debug|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|Win32.ActiveCfg = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|Win32.Build.0 = Release|Win32
+ {C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c (original)
+++ freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: make_at_dictionary.c,v 1.2 2009/02/10 17:16:57 steveu Exp $
+ * $Id: make_at_dictionary.c,v 1.4 2009/04/24 22:35:25 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -228,6 +228,7 @@
"+EFRAM", /* V.250 6.5.8 - Frame length */
"+ER", /* V.250 6.5.5 - Error control reporting */
"+ES", /* V.250 6.5.1 - Error control selection */
+ "+ESA", /* V.80 8.2 - Synchronous access mode configuration */
"+ESR", /* V.250 6.5.3 - Selective repeat */
"+ETBM", /* V.250 6.5.6 - Call termination buffer management */
"+EWIND", /* V.250 6.5.7 - Window size */
@@ -289,8 +290,8 @@
"+GMR", /* V.250 6.1.6 - Request revision identification */
"+GOI", /* V.250 6.1.8 - Request global object identification */
"+GSN", /* V.250 6.1.7 - Request product serial number identification */
- "+IBC", /* TIA-617 8.3 - Control of in-band control */
- "+IBM", /* TIA-617 8.4 - In-Band MARK idle reporting control */
+ "+IBC", /* V.80 7.9 - Control of in-band control */
+ "+IBM", /* V.80 7.10 - In-band MARK idle reporting control */
"+ICF", /* V.250 6.2.11 - DTE-DCE character framing */
"+ICLOK", /* V.250 6.2.14 - Select sync transmit clock source */
"+IDSR", /* V.250 6.2.16 - Select data set ready option */
@@ -299,6 +300,7 @@
"+ILSD", /* V.250 6.2.15 - Select long space disconnect option */
"+IPR", /* V.250 6.2.10 - Fixed DTE rate */
"+IRTS", /* V.250 6.2.17 - Select synchronous mode RTS option */
+ "+ITF", /* V.80 8.4 - Transmit flow control thresholds */
"+MA", /* V.250 6.4.2 - Modulation automode control */
"+MR", /* V.250 6.4.3 - Modulation reporting control */
"+MS", /* V.250 6.4.1 - Modulation selection */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/async.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/async.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/async.h Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.h,v 1.24 2009/02/12 12:38:39 steveu Exp $
+ * $Id: async.h,v 1.25 2009/04/23 14:12:34 steveu Exp $
*/
/*! \file */
@@ -78,7 +78,11 @@
/*! \brief A modem has completed its task, and shut down. */
SIG_STATUS_SHUTDOWN_COMPLETE = -10,
/*! \brief Regular octet report for things like HDLC to the MTP standards. */
- SIG_STATUS_OCTET_REPORT = -11
+ SIG_STATUS_OCTET_REPORT = -11,
+ /*! \brief Notification that a modem has detected signal quality degradation. */
+ SIG_STATUS_POOR_SIGNAL_QUALITY = -12,
+ /*! \brief Notification that a modem retrain has occurred. */
+ SIG_STATUS_MODEM_RETRAIN_OCCURRED = -13
};
/*! Message put function for data pumps */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_modems.h,v 1.10 2009/02/14 15:21:14 steveu Exp $
+ * $Id: fax_modems.h,v 1.11 2009/04/26 12:55:23 steveu Exp $
*/
/*! \file */
@@ -63,6 +63,10 @@
SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE(int) fax_modems_v29_v21_rx(void *user_data, const int16_t amp[], int len);
+SPAN_DECLARE(int) fax_modems_v17_v21_rx_fillin(void *user_data, int len);
+SPAN_DECLARE(int) fax_modems_v27ter_v21_rx_fillin(void *user_data, int len);
+SPAN_DECLARE(int) fax_modems_v29_v21_rx_fillin(void *user_data, int len);
+SPAN_DECLARE(void) fax_modems_start_rx_modem(fax_modems_state_t *s, int which);
SPAN_DECLARE(void) fax_modems_set_tep_mode(fax_modems_state_t *s, int use_tep);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/v22bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/v22bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/v22bis.h Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis.h,v 1.4 2009/04/17 14:37:53 steveu Exp $
+ * $Id: v22bis.h,v 1.9 2009/04/26 09:50:28 steveu Exp $
*/
#if !defined(_SPANDSP_PRIVATE_V22BIS_H_)
@@ -34,22 +34,26 @@
*/
struct v22bis_state_s
{
- /*! \brief The bit rate of the modem. Valid values are 1200 and 2400. */
+ /*! \brief The maximum permitted bit rate of the modem. Valid values are 1200 and 2400. */
int bit_rate;
/*! \brief TRUE is this is the calling side modem. */
int caller;
- /*! \brief The callback function used to put each bit received. */
- put_bit_func_t put_bit;
/*! \brief The callback function used to get the next bit to be transmitted. */
get_bit_func_t get_bit;
- /*! \brief A user specified opaque pointer passed to the callback routines. */
- void *user_data;
+ /*! \brief A user specified opaque pointer passed to the get_bit callback routine. */
+ void *get_bit_user_data;
+ /*! \brief The callback function used to put each bit received. */
+ put_bit_func_t put_bit;
+ /*! \brief A user specified opaque pointer passed to the put_bit callback routine. */
+ void *put_bit_user_data;
/*! \brief The callback function used to report modem status changes. */
modem_rx_status_func_t status_handler;
/*! \brief A user specified opaque pointer passed to the status function. */
void *status_user_data;
- /* RECEIVE SECTION */
+ int negotiated_bit_rate;
+
+ /* Receive section */
struct
{
/*! \brief The route raised cosine (RRC) pulse shaping filter buffer. */
@@ -84,8 +88,6 @@
/*! \brief The integral part of the carrier tracking filter. */
float carrier_track_i;
- int scrambled_ones_to_date;
-
/*! \brief A callback function which may be enabled to report every symbol's
constellation position. */
qam_report_handler_t qam_report;
@@ -132,12 +134,11 @@
int sixteen_way_decisions;
- int detected_unscrambled_ones;
- int detected_unscrambled_zeros;
- int detected_2400bps_markers;
+ int pattern_repeats;
+ int last_raw_bits;
} rx;
- /* TRANSMIT SECTION */
+ /* Transmit section */
struct
{
/*! \brief The gain factor needed to achieve the specified output power. */
@@ -181,5 +182,22 @@
logging_state_t logging;
};
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+/*! Reinitialise an existing V.22bis modem receive context.
+ \brief Reinitialise an existing V.22bis modem receive context.
+ \param s The modem context.
+ \return 0 for OK, -1 for bad parameter */
+int v22bis_rx_restart(v22bis_state_t *s);
+
+void v22bis_report_status_change(v22bis_state_t *s, int status);
+
+#if defined(__cplusplus)
+}
+#endif
+
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis.h,v 1.39 2009/04/17 14:37:53 steveu Exp $
+ * $Id: v22bis.h,v 1.41 2009/04/25 10:18:50 steveu Exp $
*/
/*! \file */
@@ -81,13 +81,6 @@
{
#endif
-/*! Reinitialise an existing V.22bis modem receive context.
- \brief Reinitialise an existing V.22bis modem receive context.
- \param s The modem context.
- \param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
- \return 0 for OK, -1 for bad parameter */
-SPAN_DECLARE(int) v22bis_rx_restart(v22bis_state_t *s, int bit_rate);
-
/*! Process a block of received V.22bis modem audio samples.
\brief Process a block of received V.22bis modem audio samples.
\param s The modem context.
@@ -108,7 +101,7 @@
\brief Get a snapshot of the current equalizer coefficients.
\param coeffs The vector of complex coefficients.
\return The number of coefficients in the vector. */
-SPAN_DECLARE(int) v22bis_equalizer_state(v22bis_state_t *s, complexf_t **coeffs);
+SPAN_DECLARE(int) v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coeffs);
/*! Get the current received carrier frequency.
\param s The modem context.
@@ -118,7 +111,7 @@
/*! Get the current symbol timing correction since startup.
\param s The modem context.
\return The correction. */
-SPAN_DECLARE(float) v22bis_symbol_timing_correction(v22bis_state_t *s);
+SPAN_DECLARE(float) v22bis_rx_symbol_timing_correction(v22bis_state_t *s);
/*! Get a current received signal power.
\param s The modem context.
@@ -134,7 +127,7 @@
\param s The modem context.
\param handler The handler routine.
\param user_data An opaque pointer passed to the handler routine. */
-SPAN_DECLARE(void) v22bis_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data);
+SPAN_DECLARE(void) v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data);
/*! Generate a block of V.22bis modem audio samples.
\brief Generate a block of V.22bis modem audio samples.
@@ -157,6 +150,18 @@
\return 0 for OK, -1 for bad parameter. */
SPAN_DECLARE(int) v22bis_restart(v22bis_state_t *s, int bit_rate);
+/*! Request a retrain for a V.22bis modem context. A rate change may also be resquested.
+ \brief Request a retrain for a V.22bis modem context.
+ \param s The modem context.
+ \param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
+ \return 0 for OK, -1 for bad parameter. */
+SPAN_DECLARE(int) v22bis_request_retrain(v22bis_state_t *s, int bit_rate);
+
+/*! Report the current operating bit rate of a V.22bis modem context.
+ \brief Report the current operating bit rate of a V.22bis modem context
+ \param s The modem context. */
+SPAN_DECLARE(int) v22bis_current_bit_rate(v22bis_state_t *s);
+
/*! Initialise a V.22bis modem context. This must be called before the first
use of the context, to initialise its contents.
\brief Initialise a V.22bis modem context.
@@ -173,8 +178,9 @@
int guard,
int caller,
get_bit_func_t get_bit,
+ void *get_bit_user_data,
put_bit_func_t put_bit,
- void *user_data);
+ void *put_bit_user_data);
/*! Release a V.22bis modem receive context.
\brief Release a V.22bis modem receive context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Tue Apr 28 09:42:18 2009
@@ -30,9 +30,9 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20090420
-#define SPANDSP_RELEASE_TIME 163808
-#define SPANDSP_RELEASE_DATETIME_STRING "20090420 163808"
+#define SPANDSP_RELEASE_DATE 20090427
+#define SPANDSP_RELEASE_TIME 151958
+#define SPANDSP_RELEASE_DATETIME_STRING "20090427 151958"
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.c,v 1.290 2009/04/16 12:11:54 steveu Exp $
+ * $Id: t30.c,v 1.291 2009/04/23 15:40:32 steveu Exp $
*/
/*! \file */
@@ -5914,7 +5914,7 @@
s->send_hdlc_user_data = send_hdlc_user_data;
/* Default to the basic modems. */
- s->supported_modems = T30_SUPPORT_V27TER | T30_SUPPORT_V29;
+ s->supported_modems = T30_SUPPORT_V27TER | T30_SUPPORT_V29 | T30_SUPPORT_V17;
s->supported_compressions = T30_SUPPORT_T4_1D_COMPRESSION | T30_SUPPORT_T4_2D_COMPRESSION;
s->supported_resolutions = T30_SUPPORT_STANDARD_RESOLUTION | T30_SUPPORT_FINE_RESOLUTION | T30_SUPPORT_SUPERFINE_RESOLUTION
| T30_SUPPORT_R8_RESOLUTION;
Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.c,v 1.145 2009/04/20 16:36:36 steveu Exp $
+ * $Id: v17rx.c,v 1.146 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -1323,6 +1323,16 @@
SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 14400:
+ case 12000:
+ case 9600:
+ case 7200:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v17_rx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/src/v17tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17tx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17tx.c,v 1.72 2009/04/12 04:20:01 steveu Exp $
+ * $Id: v17tx.c,v 1.73 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -400,6 +400,16 @@
SPAN_DECLARE(v17_tx_state_t *) v17_tx_init(v17_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 14400:
+ case 12000:
+ case 9600:
+ case 7200:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v17_tx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/src/v18.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v18.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v18.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v18.c,v 1.6 2009/04/20 16:36:36 steveu Exp $
+ * $Id: v18.c,v 1.7 2009/04/26 07:00:38 steveu Exp $
*/
/*! \file */
@@ -113,12 +113,21 @@
{"##8", 'W'},
{"##9", 'Z'},
{"##0", ' '},
+#if defined(WIN32)
+ {"#*1", 'X'}, // (Note 1) 111 1011
+ {"#*2", 'X'}, // (Note 1) 111 1100
+ {"#*3", 'X'}, // (Note 1) 111 1101
+ {"#*4", 'X'}, // (Note 1) 101 1011
+ {"#*5", 'X'}, // (Note 1) 101 1100
+ {"#*6", 'X'}, // (Note 1) 101 1101
+#else
{"#*1", '�'}, // (Note 1) 111 1011
{"#*2", '�'}, // (Note 1) 111 1100
{"#*3", '�'}, // (Note 1) 111 1101
{"#*4", '�'}, // (Note 1) 101 1011
{"#*5", '�'}, // (Note 1) 101 1100
{"#*6", '�'}, // (Note 1) 101 1101
+#endif
{"#0", '?'},
{"#1", 'c'},
{"#2", 'f'},
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_rx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_rx.c,v 1.56 2009/04/20 12:26:38 steveu Exp $
+ * $Id: v22bis_rx.c,v 1.66 2009/04/27 15:18:52 steveu Exp $
*/
/*! \file */
@@ -47,11 +47,12 @@
#include "spandsp/telephony.h"
#include "spandsp/logging.h"
+#include "spandsp/complex.h"
#include "spandsp/vector_float.h"
+#include "spandsp/complex_vector_float.h"
#include "spandsp/async.h"
#include "spandsp/power_meter.h"
#include "spandsp/arctan2.h"
-#include "spandsp/complex.h"
#include "spandsp/dds.h"
#include "spandsp/complex_filters.h"
@@ -108,10 +109,10 @@
V22BIS_RX_TRAINING_STAGE_SYMBOL_ACQUISITION,
V22BIS_RX_TRAINING_STAGE_LOG_PHASE,
V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES,
+ V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES_SUSTAINING,
V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200,
V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING,
- V22BIS_RX_TRAINING_STAGE_WAIT_FOR_START_1,
- V22BIS_RX_TRAINING_STAGE_WAIT_FOR_START_2,
+ V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400,
V22BIS_RX_TRAINING_STAGE_PARKED
};
@@ -158,7 +159,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(float) v22bis_symbol_timing_correction(v22bis_state_t *s)
+SPAN_DECLARE(float) v22bis_rx_symbol_timing_correction(v22bis_state_t *s)
{
return (float) s->rx.total_baud_timing_correction/((float) PULSESHAPER_COEFF_SETS*40.0f/(3.0f*2.0f));
}
@@ -177,16 +178,16 @@
}
/*- End of function --------------------------------------------------------*/
-static void report_status_change(v22bis_state_t *s, int status)
+void v22bis_report_status_change(v22bis_state_t *s, int status)
{
if (s->status_handler)
s->status_handler(s->status_user_data, status);
else if (s->put_bit)
- s->put_bit(s->user_data, status);
+ s->put_bit(s->put_bit_user_data, status);
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) v22bis_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
+SPAN_DECLARE(int) v22bis_rx_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
{
*coeffs = s->rx.eq_coeff;
return 2*V22BIS_EQUALIZER_LEN + 1;
@@ -195,31 +196,20 @@
static void equalizer_reset(v22bis_state_t *s)
{
- int i;
-
/* Start with an equalizer based on everything being perfect */
- for (i = 0; i < 2*V22BIS_EQUALIZER_LEN + 1; i++)
- s->rx.eq_coeff[i] = complex_setf(0.0f, 0.0f);
+#if defined(SPANDSP_USE_FIXED_POINTx)
+ cvec_zeroi16(s->rx.eq_coeff, 2*V22BIS_EQUALIZER_LEN + 1);
+ s->rx.eq_coeff[V22BIS_EQUALIZER_LEN] = complex_seti16(3*FP_FACTOR, 0*FP_FACTOR);
+ cvec_zeroi16(s->rx.eq_buf, V22BIS_EQUALIZER_MASK + 1);
+ s->rx.eq_delta = 32768.0f*EQUALIZER_DELTA/(2*V22BIS_EQUALIZER_LEN + 1);
+#else
+ cvec_zerof(s->rx.eq_coeff, 2*V22BIS_EQUALIZER_LEN + 1);
s->rx.eq_coeff[V22BIS_EQUALIZER_LEN] = complex_setf(3.0f, 0.0f);
- for (i = 0; i <= V22BIS_EQUALIZER_MASK; i++)
- s->rx.eq_buf[i] = complex_setf(0.0f, 0.0f);
-
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 6].re = -0.02f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 5].re = 0.035f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 4].re = 0.08f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 3].re = -0.30f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 2].re = -0.37f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN - 1].re = 0.09f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN].re = 3.19f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 1].re = 0.09f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 2].re = -0.37f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 3].re = -0.30f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 5].re = 0.035f;
- s->rx.eq_coeff[V22BIS_EQUALIZER_LEN + 6].re = -0.02f;
-
+ cvec_zerof(s->rx.eq_buf, V22BIS_EQUALIZER_MASK + 1);
+ s->rx.eq_delta = EQUALIZER_DELTA/(2*V22BIS_EQUALIZER_LEN + 1);
+#endif
s->rx.eq_put_step = 20 - 1;
s->rx.eq_step = 0;
- s->rx.eq_delta = EQUALIZER_DELTA/(2*V22BIS_EQUALIZER_LEN + 1);
}
/*- End of function --------------------------------------------------------*/
@@ -291,7 +281,9 @@
bit &= 1;
/* Descramble the bit */
- out_bit = (bit ^ (s->rx.scramble_reg >> 14) ^ (s->rx.scramble_reg >> 17)) & 1;
+ out_bit = (bit ^ (s->rx.scramble_reg >> 13) ^ (s->rx.scramble_reg >> 16)) & 1;
+ s->rx.scramble_reg = (s->rx.scramble_reg << 1) | bit;
+
if (s->rx.scrambler_pattern_count >= 64)
{
out_bit ^= 1;
@@ -301,7 +293,6 @@
s->rx.scrambler_pattern_count++;
else
s->rx.scrambler_pattern_count = 0;
- s->rx.scramble_reg = (s->rx.scramble_reg << 1) | bit;
return out_bit;
}
/*- End of function --------------------------------------------------------*/
@@ -312,7 +303,7 @@
/* Descramble the bit */
out_bit = descramble(s, bit);
- s->put_bit(s->user_data, out_bit);
+ s->put_bit(s->put_bit_user_data, out_bit);
}
/*- End of function --------------------------------------------------------*/
@@ -321,16 +312,16 @@
int raw_bits;
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
+ s->rx.constellation_state = nearest;
/* The first two bits are the quadrant */
put_bit(s, raw_bits >> 1);
put_bit(s, raw_bits);
- if (s->bit_rate == 2400)
+ if (s->rx.sixteen_way_decisions)
{
/* The other two bits are the position within the quadrant */
put_bit(s, nearest >> 1);
put_bit(s, nearest);
}
- s->rx.constellation_state = nearest;
}
/*- End of function --------------------------------------------------------*/
@@ -340,16 +331,16 @@
int out_bits;
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
+ s->rx.constellation_state = nearest;
/* The first two bits are the quadrant */
out_bits = descramble(s, raw_bits >> 1);
out_bits = (out_bits << 1) | descramble(s, raw_bits);
- if (s->bit_rate == 2400)
+ if (s->rx.sixteen_way_decisions)
{
/* The other two bits are the position within the quadrant */
out_bits = (out_bits << 1) | descramble(s, nearest >> 1);
out_bits = (out_bits << 1) | descramble(s, nearest);
}
- s->rx.constellation_state = nearest;
return out_bits;
}
/*- End of function --------------------------------------------------------*/
@@ -443,7 +434,7 @@
when the true symbol boundary is close to a sample boundary. */
s->rx.eq_put_step += (s->rx.gardner_integrate/16);
s->rx.total_baud_timing_correction += (s->rx.gardner_integrate/16);
-//span_log(&s->logging, SPAN_LOG_FLOW, "Gardner kick %d [total %d]\n", s->rx.gardner_integrate, s->rx.total_baud_timing_correction);
+ //span_log(&s->logging, SPAN_LOG_FLOW, "Gardner kick %d [total %d]\n", s->rx.gardner_integrate, s->rx.total_baud_timing_correction);
if (s->rx.qam_report)
s->rx.qam_report(s->rx.qam_user_data, NULL, NULL, s->rx.gardner_integrate);
s->rx.gardner_integrate = 0;
@@ -451,7 +442,6 @@
z = equalizer_get(s);
-//span_log(&s->logging, SPAN_LOG_FLOW, "VVV %p %d\n", s->user_data, s->rx.training);
if (s->rx.sixteen_way_decisions)
{
re = (int) (z.re + 3.0f);
@@ -468,20 +458,20 @@
}
else
{
- zz = complex_setf(3.0f/sqrtf(10.0f), -1.0f/sqrtf(10.0f));
+ zz = complex_setf(3.0f/3.162278f, -1.0f/3.162278f);
zz = complex_mulf(&z, &zz);
nearest = (find_quadrant(&zz) << 2) | 0x01;
- printf("Trackit rx %p %15.5f %15.5f %15.5f %15.5f %d\n", s, z.re, z.im, zz.re, zz.im, nearest);
}
+ raw_bits = 0;
switch (s->rx.training)
{
case V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION:
/* Normal operation. */
- track_carrier(s, &z, &v22bis_constellation[nearest]);
- tune_equalizer(s, &z, &v22bis_constellation[nearest]);
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
+ tune_equalizer(s, &z, target);
decode_baud(s, nearest);
- target = &v22bis_constellation[s->rx.constellation_state];
break;
case V22BIS_RX_TRAINING_STAGE_SYMBOL_ACQUISITION:
/* Allow time for the Gardner algorithm to settle the symbol timing. */
@@ -494,13 +484,13 @@
but since we might be off in the opposite direction from the source, the total
error could be higher. */
s->rx.gardner_step = 4;
- s->rx.detected_unscrambled_zeros = 0;
- s->rx.detected_unscrambled_ones = 0;
- s->rx.detected_2400bps_markers = 0;
+ s->rx.pattern_repeats = 0;
if (s->caller)
s->rx.training = V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES;
else
s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+ /* Be pessimistic and see what the handshake brings */
+ s->negotiated_bit_rate = 1200;
break;
}
/* Once we have pulled in the symbol timing in a coarse way, use finer
@@ -511,29 +501,25 @@
case V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES:
/* Calling modem only */
/* The calling modem should initially receive unscrambled ones at 1200bps */
- track_carrier(s, &z, &v22bis_constellation[nearest]);
- target = &z;
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
s->rx.constellation_state = nearest;
- switch (raw_bits)
- {
- case 0:
- s->rx.detected_unscrambled_zeros++;
- break;
- case 3:
- s->rx.detected_unscrambled_ones++;
- break;
- default:
- s->rx.detected_2400bps_markers++;
- break;
- }
-span_log(&s->logging, SPAN_LOG_FLOW, "TWIDDLING THUMBS - %d %d\n", s->rx.training_count, s->rx.detected_2400bps_markers);
+ if (raw_bits != s->rx.last_raw_bits)
+ s->rx.pattern_repeats = 0;
+ else
+ s->rx.pattern_repeats++;
if (++s->rx.training_count == ms_to_symbols(155 + 456))
{
- if (s->rx.detected_unscrambled_ones >= ms_to_symbols(456)
- ||
- s->rx.detected_unscrambled_zeros >= ms_to_symbols(456))
+ /* After the first 155ms things should have been steady, so check if the last 456ms was
+ steady at 11 or 00. */
+ if (raw_bits == s->rx.last_raw_bits
+ &&
+ (raw_bits == 0x3 || raw_bits == 0x0)
+ &&
+ s->rx.pattern_repeats >= ms_to_symbols(456))
{
+ /* It looks like the answering machine is sending us a clean unscrambled 11 or 00 */
if (s->bit_rate == 2400)
{
/* Try to establish at 2400bps */
@@ -544,127 +530,147 @@
else
{
/* Only try to establish at 1200bps */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S11 (Caller)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S11 (1200) (Caller)\n");
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_S11;
s->tx.training_count = 0;
}
}
-span_log(&s->logging, SPAN_LOG_FLOW, "unscrambled ones = %d, unscrambled zeros = %d, 2400 markers = %d\n", s->rx.detected_unscrambled_ones, s->rx.detected_unscrambled_zeros, s->rx.detected_2400bps_markers);
+ s->rx.pattern_repeats = 0;
s->rx.training_count = 0;
- s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
- s->rx.detected_unscrambled_zeros = 0;
- s->rx.detected_unscrambled_ones = 0;
- s->rx.detected_2400bps_markers = 0;
- s->rx.scrambled_ones_to_date = 0;
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES_SUSTAINING;
}
break;
- case V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200:
- track_carrier(s, &z, &v22bis_constellation[nearest]);
- tune_equalizer(s, &z, &v22bis_constellation[nearest]);
- target = &z;
+ case V22BIS_RX_TRAINING_STAGE_UNSCRAMBLED_ONES_SUSTAINING:
+ /* Calling modem only */
+ /* Wait for the end of the unscrambled ones at 1200bps */
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
- switch (raw_bits)
+ s->rx.constellation_state = nearest;
+ if (raw_bits != s->rx.last_raw_bits)
{
- case 0:
- s->rx.detected_unscrambled_zeros++;
- break;
- case 3:
- s->rx.detected_unscrambled_ones++;
- break;
- default:
- s->rx.detected_2400bps_markers++;
- break;
+ /* This looks like the end of the sustained initial unscrambled 11 or 00 */
+ s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ s->rx.training_count = 0;
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200;
+ s->rx.pattern_repeats = 0;
}
+ break;
+ case V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200:
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
+ tune_equalizer(s, &z, target);
+ raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
bitstream = decode_baudx(s, nearest);
- s->rx.scrambled_ones_to_date += ones[bitstream];
-span_log(&s->logging, SPAN_LOG_FLOW, "S11 0x%02x 0x%02x 0x%X %d %d %d %d %d %d\n", raw_bits, nearest, bitstream, s->rx.scrambled_ones_to_date, s->rx.detected_unscrambled_ones, s->rx.detected_unscrambled_zeros, s->rx.detected_2400bps_markers, s->rx.training_count, s->rx.detected_2400bps_markers);
- if (s->rx.detected_2400bps_markers && ++s->rx.training_count > ms_to_symbols(270))
+ s->rx.training_count++;
+//span_log(&s->logging, SPAN_LOG_FLOW, "S11 0x%02x 0x%02x 0x%X %d %d %d %d %d\n", raw_bits, nearest, bitstream, s->rx.scrambled_ones_to_date, 0, 0, 0, s->rx.training_count);
+ if (s->negotiated_bit_rate == 1200)
{
- if (!s->caller)
+ /* Search for the S1 signal */
+ if ((s->rx.last_raw_bits ^ raw_bits) == 0x3)
+ {
+ s->rx.pattern_repeats++;
+ }
+ else
{
- if (s->bit_rate == 2400 && s->rx.detected_2400bps_markers > 20)
+ if (s->rx.pattern_repeats >= 15 && (s->rx.last_raw_bits == 0x3 || s->rx.last_raw_bits == 0x0))
{
- /* Try to establish at 2400bps */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting U0011 (S1) (Answerer)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_U0011;
+ /* We should get a full run of 00 11 (about 60 bauds) at the calling modem, but only about 20
+ at the answering modem, as the first 40 are TED settling time. */
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ S1 detected at %d\n", s->rx.pattern_repeats);
+ if (s->bit_rate == 2400)
+ {
+ if (!s->caller)
+ {
+ /* Accept establishment at 2400bps */
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting U0011 (S1) (Answerer)\n");
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_U0011;
+ s->tx.training_count = 0;
+ }
+ s->negotiated_bit_rate = 2400;
+ }
+ }
+ s->rx.pattern_repeats = 0;
+ }
+ if (s->rx.training_count >= ms_to_symbols(270))
+ {
+ /* If we haven't seen the S1 signal by now, we are committed to be in 1200bps mode */
+ if (s->caller)
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (1200)\n");
+ /* The transmit side needs to sustain the scrambled ones for a timed period */
s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ /* Normal reception starts immediately */
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION;
+ s->rx.carrier_track_i = 8000.0f;
}
else
{
- /* We are going to work at 1200bps. */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ [1200] starting S11 (Answerer)\n");
- s->bit_rate = 1200;
- s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S11 (1200) (Answerer)\n");
+ /* The transmit side needs to sustain the scrambled ones for a timed period */
s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
+ /* The receive side needs to wait a timed period, receiving scrambled ones,
+ before entering normal operation. */
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING;
}
}
- s->rx.training = V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING;
- }
- break;
- case V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING:
- track_carrier(s, &z, &v22bis_constellation[nearest]);
- tune_equalizer(s, &z, &v22bis_constellation[nearest]);
- target = &z;
- raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
- switch (raw_bits)
- {
- case 0:
- s->rx.detected_unscrambled_zeros++;
- break;
- case 3:
- s->rx.detected_unscrambled_ones++;
- break;
- default:
- s->rx.detected_2400bps_markers++;
- break;
- }
- bitstream = decode_baudx(s, nearest);
- s->rx.scrambled_ones_to_date += ones[bitstream];
-span_log(&s->logging, SPAN_LOG_FLOW, "S11 0x%02x 0x%02x 0x%X %d %d %d %d %d sustain\n", raw_bits, nearest, bitstream, s->rx.scrambled_ones_to_date, s->rx.detected_unscrambled_ones, s->rx.detected_unscrambled_zeros, s->rx.detected_2400bps_markers, s->rx.training_count);
- if (s->rx.detected_2400bps_markers == 20)
- {
- /* It looks like we have the S1 (Unscrambled 00 11) section, so 2400bps
- operation is possible. */
- s->rx.detected_2400bps_markers++;
- if (s->bit_rate == 2400)
- {
- /* We are allowed to use 2400bps, and the far end is requesting 2400bps. Result: we are going to
- work at 2400bps */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ [2400] starting U0011 (S1)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_U0011;
- s->tx.training_count = 0;
- }
}
- if (++s->rx.training_count > ms_to_symbols(270 + 765))
+ else
{
if (s->caller)
{
- if (s->bit_rate == 2400)
+ if (s->rx.training_count >= ms_to_symbols(100 + 450))
{
- /* We've continued for a further 756+-10ms. This should have given the other
- side enough time to train its equaliser. */
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S1111 (B)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_S1111;
- s->tx.training_count = 0;
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting 16 way decisions (caller)\n");
+ s->rx.sixteen_way_decisions = TRUE;
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400;
+ s->rx.pattern_repeats = 0;
+ s->rx.carrier_track_i = 8000.0f;
}
- else
+ }
+ else
+ {
+ if (s->rx.training_count >= ms_to_symbols(450))
{
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ Tx normal operation (1200)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
- s->tx.training_count = 0;
- s->tx.current_get_bit = s->get_bit;
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting 16 way decisions (answerer)\n");
+ s->rx.sixteen_way_decisions = TRUE;
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400;
+ s->rx.pattern_repeats = 0;
}
}
- if (s->bit_rate == 2400)
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (2400)\n");
- else
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (1200)\n");
+ }
+ break;
+ case V22BIS_RX_TRAINING_STAGE_SCRAMBLED_ONES_AT_1200_SUSTAINING:
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
+ tune_equalizer(s, &z, target);
+ bitstream = decode_baudx(s, nearest);
+ if (++s->rx.training_count > ms_to_symbols(270 + 765))
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (1200)\n");
s->rx.training = V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION;
}
- if (s->bit_rate == 2400 && s->rx.training_count == ms_to_symbols(450))
+ break;
+ case V22BIS_RX_TRAINING_STAGE_WAIT_FOR_SCRAMBLED_ONES_AT_2400:
+ target = &v22bis_constellation[nearest];
+ track_carrier(s, &z, target);
+ tune_equalizer(s, &z, target);
+ bitstream = decode_baudx(s, nearest);
+ /* We need 32 sustained 1's to switch into normal operation. */
+ if (bitstream == 0xF)
+ {
+ if (++s->rx.pattern_repeats >= 9)
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (2400)\n");
+ s->rx.training = V22BIS_RX_TRAINING_STAGE_NORMAL_OPERATION;
+ }
+ }
+ else
{
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting 16 way decisions\n");
- s->rx.sixteen_way_decisions = TRUE;
+ s->rx.pattern_repeats = 0;
}
break;
case V22BIS_RX_TRAINING_STAGE_PARKED:
@@ -674,6 +680,7 @@
target = &z;
break;
}
+ s->rx.last_raw_bits = raw_bits;
if (s->rx.qam_report)
s->rx.qam_report(s->rx.qam_user_data, &z, target, s->rx.constellation_state);
}
@@ -721,8 +728,8 @@
/* Look for power below the carrier off point */
if (power < s->rx.carrier_off_power)
{
- v22bis_rx_restart(s, s->bit_rate);
- report_status_change(s, SIG_STATUS_CARRIER_DOWN);
+ v22bis_restart(s, s->bit_rate);
+ v22bis_report_status_change(s, SIG_STATUS_CARRIER_DOWN);
continue;
}
}
@@ -732,7 +739,7 @@
if (power < s->rx.carrier_on_power)
continue;
s->rx.signal_present = TRUE;
- report_status_change(s, SIG_STATUS_CARRIER_UP);
+ v22bis_report_status_change(s, SIG_STATUS_CARRIER_UP);
}
if (s->rx.training != V22BIS_RX_TRAINING_STAGE_PARKED)
{
@@ -813,11 +820,8 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) v22bis_rx_restart(v22bis_state_t *s, int bit_rate)
+int v22bis_rx_restart(v22bis_state_t *s)
{
- /* If bit_rate is 2400, the real bit rate is negotiated. If bit_rate
- is 1200, the real bit rate is forced to 1200. */
- s->bit_rate = bit_rate;
vec_zerof(s->rx.rrc_filter, sizeof(s->rx.rrc_filter)/sizeof(s->rx.rrc_filter[0]));
s->rx.rrc_filter_step = 0;
s->rx.scramble_reg = 0;
@@ -837,19 +841,24 @@
equalizer_reset(s);
- s->rx.detected_unscrambled_ones = 0;
- s->rx.detected_unscrambled_zeros = 0;
- s->rx.detected_2400bps_markers = 0;
+ s->rx.pattern_repeats = 0;
+ s->rx.last_raw_bits = 0;
s->rx.gardner_integrate = 0;
s->rx.gardner_step = 256;
s->rx.baud_phase = 0;
- s->rx.carrier_track_i = 8000.0f;
+ s->rx.training_error = 0.0f;
+ s->rx.total_baud_timing_correction = 0;
+ /* We want the carrier to pull in faster on the answerer side, as it has very little time to adapt. */
+ s->rx.carrier_track_i = (s->caller) ? 8000.0f : 40000.0f;
s->rx.carrier_track_p = 8000000.0f;
+
+ s->negotiated_bit_rate = 1200;
+
return 0;
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) v22bis_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
+SPAN_DECLARE(void) v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
{
s->rx.qam_report = handler;
s->rx.qam_user_data = user_data;
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_tx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_tx.c,v 1.56 2009/04/17 14:37:52 steveu Exp $
+ * $Id: v22bis_tx.c,v 1.61 2009/04/25 10:18:50 steveu Exp $
*/
/*! \file */
@@ -294,12 +294,13 @@
bit ^= 1;
s->tx.scrambler_pattern_count = 0;
}
- out_bit = (bit ^ (s->tx.scramble_reg >> 14) ^ (s->tx.scramble_reg >> 17)) & 1;
+ out_bit = (bit ^ (s->tx.scramble_reg >> 13) ^ (s->tx.scramble_reg >> 16)) & 1;
+ s->tx.scramble_reg = (s->tx.scramble_reg << 1) | out_bit;
+
if (out_bit == 1)
s->tx.scrambler_pattern_count++;
else
s->tx.scrambler_pattern_count = 0;
- s->tx.scramble_reg = (s->tx.scramble_reg << 1) | out_bit;
return out_bit;
}
/*- End of function --------------------------------------------------------*/
@@ -308,7 +309,7 @@
{
int bit;
- if ((bit = s->tx.current_get_bit(s->user_data)) == SIG_STATUS_END_OF_DATA)
+ if ((bit = s->tx.current_get_bit(s->get_bit_user_data)) == SIG_STATUS_END_OF_DATA)
{
/* Fill out this symbol with ones, and prepare to send
the rest of the shutdown sequence. */
@@ -334,8 +335,8 @@
{
/* Initial 75ms of silence is over */
span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting U11 1200\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_U11;
s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_U11;
}
/* Fall through */
case V22BIS_TX_TRAINING_STAGE_INITIAL_SILENCE:
@@ -353,37 +354,40 @@
/* Continuous unscrambled double dibit 00 11 at 1200bps. This is termed the S1 segment in
the V.22bis spec. It is only sent to request or accept 2400bps mode, and lasts 100+-3ms. After this
timed burst, we unconditionally change to sending scrambled ones at 1200bps. */
- s->tx.constellation_state = (s->tx.constellation_state + phase_steps[(s->tx.training_count & 1) ? 3 : 0]) & 3;
+ s->tx.constellation_state = (s->tx.constellation_state + phase_steps[3*(s->tx.training_count & 1)]) & 3;
z = v22bis_constellation[(s->tx.constellation_state << 2) | 0x01];
if (++s->tx.training_count >= ms_to_symbols(100))
{
span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S11 after U0011\n");
if (s->caller)
+ {
+ s->tx.training_count = 0;
s->tx.training = V22BIS_TX_TRAINING_STAGE_S11;
+ }
else
+ {
+ s->tx.training_count = ms_to_symbols(756 - (600 - 100));
s->tx.training = V22BIS_TX_TRAINING_STAGE_TIMED_S11;
- s->tx.training_count = 0;
+ }
}
break;
case V22BIS_TX_TRAINING_STAGE_TIMED_S11:
/* A timed period of scrambled ones at 1200bps. */
- if (!s->caller)
+ if (++s->tx.training_count >= ms_to_symbols(756))
{
- if (++s->tx.training_count >= ms_to_symbols(756))
+ if (s->negotiated_bit_rate == 2400)
{
- if (s->bit_rate == 2400)
- {
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S1111 (C)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_S1111;
- s->tx.training_count = 0;
- }
- else
- {
- span_log(&s->logging, SPAN_LOG_FLOW, "+++ Tx normal operation (1200)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
- s->tx.training_count = 0;
- s->tx.current_get_bit = s->get_bit;
- }
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ starting S1111 (C)\n");
+ s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_S1111;
+ }
+ else
+ {
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Tx normal operation (1200)\n");
+ s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
+ v22bis_report_status_change(s, SIG_STATUS_TRAINING_SUCCEEDED);
+ s->tx.current_get_bit = s->get_bit;
}
}
/* Fall through */
@@ -406,8 +410,9 @@
{
/* We have completed training. Now handle some real work. */
span_log(&s->logging, SPAN_LOG_FLOW, "+++ Tx normal operation (2400)\n");
- s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
s->tx.training_count = 0;
+ s->tx.training = V22BIS_TX_TRAINING_STAGE_NORMAL_OPERATION;
+ v22bis_report_status_change(s, SIG_STATUS_TRAINING_SUCCEEDED);
s->tx.current_get_bit = s->get_bit;
}
break;
@@ -442,7 +447,7 @@
bits = get_scrambled_bit(s);
bits = (bits << 1) | get_scrambled_bit(s);
s->tx.constellation_state = (s->tx.constellation_state + phase_steps[bits]) & 3;
- if (s->bit_rate == 1200)
+ if (s->negotiated_bit_rate == 1200)
{
bits = 0x01;
}
@@ -525,9 +530,8 @@
}
/*- End of function --------------------------------------------------------*/
-static int v22bis_tx_restart(v22bis_state_t *s, int bit_rate)
+static int v22bis_tx_restart(v22bis_state_t *s)
{
- s->bit_rate = bit_rate;
cvec_zerof(s->tx.rrc_filter, sizeof(s->tx.rrc_filter)/sizeof(s->tx.rrc_filter[0]));
s->tx.rrc_filter_step = 0;
s->tx.scramble_reg = 0;
@@ -550,14 +554,14 @@
SPAN_DECLARE(void) v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data)
{
s->get_bit = get_bit;
- s->user_data = user_data;
+ s->get_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(void) v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data)
{
s->put_bit = put_bit;
- s->user_data = user_data;
+ s->put_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
@@ -576,11 +580,40 @@
SPAN_DECLARE(int) v22bis_restart(v22bis_state_t *s, int bit_rate)
{
- if (bit_rate != 2400 && bit_rate != 1200)
+ switch (bit_rate)
+ {
+ case 2400:
+ case 1200:
+ break;
+ default:
return -1;
- if (v22bis_tx_restart(s, bit_rate))
+ }
+ s->bit_rate = bit_rate;
+ s->negotiated_bit_rate = 1200;
+ if (v22bis_tx_restart(s))
+ return -1;
+ return v22bis_rx_restart(s);
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) v22bis_request_retrain(v22bis_state_t *s, int bit_rate)
+{
+ switch (bit_rate)
+ {
+ case 2400:
+ case 1200:
+ break;
+ default:
return -1;
- return v22bis_rx_restart(s, bit_rate);
+ }
+ /* TODO: Implement retrain and bit rate change */
+ return -1;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) v22bis_current_bit_rate(v22bis_state_t *s)
+{
+ return s->negotiated_bit_rate;
}
/*- End of function --------------------------------------------------------*/
@@ -589,9 +622,18 @@
int guard,
int caller,
get_bit_func_t get_bit,
+ void *get_bit_user_data,
put_bit_func_t put_bit,
- void *user_data)
+ void *put_bit_user_data)
{
+ switch (bit_rate)
+ {
+ case 2400:
+ case 1200:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v22bis_state_t *) malloc(sizeof(*s))) == NULL)
@@ -604,8 +646,9 @@
s->caller = caller;
s->get_bit = get_bit;
+ s->get_bit_user_data = get_bit_user_data;
s->put_bit = put_bit;
- s->user_data = user_data;
+ s->put_bit_user_data = put_bit_user_data;
if (s->caller)
{
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.c,v 1.125 2009/04/20 16:36:36 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.126 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -1145,6 +1145,14 @@
SPAN_DECLARE(v27ter_rx_state_t *) v27ter_rx_init(v27ter_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 4800:
+ case 2400:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v27ter_rx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_tx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_tx.c,v 1.74 2009/04/12 04:20:01 steveu Exp $
+ * $Id: v27ter_tx.c,v 1.75 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -412,6 +412,14 @@
SPAN_DECLARE(v27ter_tx_state_t *) v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 4800:
+ case 2400:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v27ter_tx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.c,v 1.163 2009/04/20 16:36:36 steveu Exp $
+ * $Id: v29rx.c,v 1.164 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -1156,14 +1156,22 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(v29_rx_state_t *) v29_rx_init(v29_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(v29_rx_state_t *) v29_rx_init(v29_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 9600:
+ case 7200:
+ case 4800:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v29_rx_state_t *) malloc(sizeof(*s))) == NULL)
return NULL;
}
-
memset(s, 0, sizeof(*s));
span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
span_log_set_protocol(&s->logging, "V.29 RX");
@@ -1176,7 +1184,7 @@
/* The thresholds should be on at -26dBm0 and off at -31dBm0 */
v29_rx_signal_cutoff(s, -28.5f);
- v29_rx_restart(s, rate, FALSE);
+ v29_rx_restart(s, bit_rate, FALSE);
return s;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/v29tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29tx.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29tx.c,v 1.87 2009/04/12 04:20:01 steveu Exp $
+ * $Id: v29tx.c,v 1.88 2009/04/21 13:59:07 steveu Exp $
*/
/*! \file */
@@ -368,6 +368,15 @@
SPAN_DECLARE(v29_tx_state_t *) v29_tx_init(v29_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
+ switch (bit_rate)
+ {
+ case 9600:
+ case 7200:
+ case 4800:
+ break;
+ default:
+ return NULL;
+ }
if (s == NULL)
{
if ((s = (v29_tx_state_t *) malloc(sizeof(*s))) == NULL)
Modified: freeswitch/trunk/libs/spandsp/tests/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/tests/Makefile.am Tue Apr 28 09:42:18 2009
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-## $Id: Makefile.am,v 1.112 2009/04/01 13:22:40 steveu Exp $
+## $Id: Makefile.am,v 1.114 2009/04/26 08:25:37 steveu Exp $
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -25,7 +25,26 @@
noinst_DATA = sound_c1_8k.wav sound_c3_8k.wav
-EXTRA_DIST = regression_tests.sh v42bis_tests.sh fax_tests.sh tsb85_tests.sh
+EXTRA_DIST = regression_tests.sh \
+ v42bis_tests.sh \
+ fax_tests.sh \
+ tsb85_tests.sh \
+ msvc/adsi_tests.vcproj \
+ msvc/complex_tests.vcproj \
+ msvc/complex_vector_float_tests.vcproj \
+ msvc/complex_vector_int_tests.vcproj \
+ msvc/dtmf_rx_tests.vcproj \
+ msvc/dtmf_tx_tests.vcproj \
+ msvc/queue_tests.vcproj \
+ msvc/t38_core_tests.vcproj \
+ msvc/t38_non_ecm_buffer_tests.vcproj \
+ msvc/t38_terminal_tests.vcproj \
+ msvc/v22bis_tests.vcproj \
+ msvc/v29_tests.vcproj \
+ msvc/v8_tests.vcproj \
+ msvc/v80_tests.vcproj \
+ msvc/vector_float_tests.vcproj \
+ msvc/vector_int_tests.vcproj
MAINTAINERCLEANFILES = Makefile.in
Modified: freeswitch/trunk/libs/spandsp/tests/adsi_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/adsi_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/adsi_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: adsi_tests.c,v 1.55 2009/04/11 15:16:14 steveu Exp $
+ * $Id: adsi_tests.c,v 1.56 2009/04/26 07:24:35 steveu Exp $
*/
/*! \page adsi_tests_page ADSI tests
@@ -47,7 +47,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <strings.h>
#include <assert.h>
#include <audiofile.h>
Modified: freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/at_interpreter_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter_tests.c,v 1.20 2008/11/30 05:43:37 steveu Exp $
+ * $Id: at_interpreter_tests.c,v 1.22 2009/04/24 22:35:25 steveu Exp $
*/
/*! \file */
@@ -221,9 +221,14 @@
{"AT+EB=?\r", "\r\n+EB:\r\n\r\nOK\r\n"}, /* V.250 6.5.2 - Break handling in error control operation */
{"AT+EFCS=?\r", "\r\n+EFCS:(0-2)\r\n\r\nOK\r\n"}, /* V.250 6.5.4 - 32-bit frame check sequence */
{"AT+EFCS?\r", "\r\n+EFCS:0\r\n\r\nOK\r\n"},
- {"AT+EFRAM=?\r", "\r\n+EFRAM:(1-65535),(1-65535)\r\n\r\nOK\r\n"}, /* V.250 6.5.8 - Frame length */
+ {"AT+EFRAM=?\r", "\r\n+EFRAM:(1-65535),(1-65535)\r\n\r\nOK\r\n"},
+ /* V.250 6.5.8 - Frame length */
{"AT+ER=?\r", "\r\n+ER:(0,1)\r\n\r\nOK\r\n"}, /* V.250 6.5.5 - Error control reporting */
- {"AT+ES\r", "\r\nOK\r\n"}, /* V.250 6.5.1 - Error control selection */
+ {"AT+ES=?\r", "\r\n+ES:(0-7),(0-4),(0-9)\r\n\r\nOK\r\n"}, /* V.250 6.5.1 - Error control selection */
+ {"AT+ES?\r", "\r\n+ES:0,0,0\r\n\r\nOK\r\n"},
+ {"AT+ESA=?\r", "\r\n+ESA:(0-2),(0-1),(0-1),(0-1),(0-2),(0-1),(0-255),(0-255)\r\n\r\nOK\r\n"},
+ /* V.80 8.2 - Synchronous access mode configuration */
+ {"AT+ESA?\r", "\r\n+ESA:0,0,0,0,0,0,0,0\r\n\r\nOK\r\n"},
{"AT+ESR\r", "\r\nOK\r\n"}, /* V.250 6.5.3 - Selective repeat */
{"AT+ETBM=?\r", "\r\n+ETBM:(0-2),(0-2),(0-30)\r\n\r\nOK\r\n"}, /* T.31 8.5.1 - Adaptive reception control */
{"AT+ETBM?\r", "\r\n+ETBM:0,0\r\n\r\nOK\r\n"},
@@ -264,6 +269,11 @@
{"AT+GMR?\r", "\r\n" VERSION "\r\n\r\nOK\r\n"}, /* V.250 6.1.6 - Request revision identification */
{"AT+GOI\r", "\r\nOK\r\n"}, /* V.250 6.1.8 - Request global object identification */
{"AT+GSN?\r", "\r\n42\r\n\r\nOK\r\n"}, /* V.250 6.1.7 - Request product serial number identification */
+ {"AT+IBC=?\r", "\r\n+IBC:(0-2),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0.1),(0,1)\r\n\r\nOK\r\n"},
+ /* V.80 7.9 - Control of in-band control */
+ {"AT+IBC?\r", "\r\n+IBC:0,0,0,0,0,0,0,0,0,0,0,0,0\r\n\r\nOK\r\n"},
+ {"AT+IBM=?\r", "\r\n+IBM:(0-7),(0-255),(0-255)\r\n\r\nOK\r\n"}, /* V.80 7.10 - In-band MARK idle reporting control */
+ {"AT+IBM?\r", "\r\n+IBM:0,0,0\r\n\r\nOK\r\n"},
{"AT+ICF?\r", "\r\n+ICF:0,0\r\n\r\nOK\r\n"}, /* V.250 6.2.11 - DTE-DCE character framing */
{"AT+ICLOK?\r", "\r\n+ICLOK:0\r\n\r\nOK\r\n"}, /* V.250 6.2.14 - Select sync transmit clock source */
{"AT+IDSR?\r", "\r\n+IDSR:0\r\n\r\nOK\r\n"}, /* V.250 6.2.16 - Select data set ready option */
Modified: freeswitch/trunk/libs/spandsp/tests/complex_vector_float_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/complex_vector_float_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/complex_vector_float_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_float_tests.c,v 1.2 2008/10/09 13:25:19 steveu Exp $
+ * $Id: complex_vector_float_tests.c,v 1.3 2009/04/26 07:00:39 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
-#include <audiofile.h>
#include "spandsp.h"
Modified: freeswitch/trunk/libs/spandsp/tests/complex_vector_int_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/complex_vector_int_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/complex_vector_int_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_int_tests.c,v 1.1 2008/09/18 12:05:35 steveu Exp $
+ * $Id: complex_vector_int_tests.c,v 1.2 2009/04/26 07:00:39 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
-#include <audiofile.h>
#include "spandsp.h"
Modified: freeswitch/trunk/libs/spandsp/tests/fax_utils.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/fax_utils.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/fax_utils.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_utils.c,v 1.1 2009/02/20 12:34:20 steveu Exp $
+ * $Id: fax_utils.c,v 1.2 2009/04/25 14:17:47 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -31,10 +31,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
-#include <audiofile.h>
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/g711_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/g711_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/g711_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g711_tests.c,v 1.15 2008/11/30 10:17:31 steveu Exp $
+ * $Id: g711_tests.c,v 1.16 2009/04/22 12:57:40 steveu Exp $
*/
/*! \page g711_tests_page A-law and u-law conversion tests
@@ -38,6 +38,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
+#include <unistd.h>
#include <string.h>
#include <audiofile.h>
@@ -48,7 +49,11 @@
#include "spandsp.h"
#include "spandsp-sim.h"
-#define OUT_FILE_NAME "g711.wav"
+#define BLOCK_LEN 160
+
+#define IN_FILE_NAME "../test-data/local/short_nb_voice.wav"
+#define ENCODED_FILE_NAME "g711.g711"
+#define OUT_FILE_NAME "post_g711.wav"
int16_t amp[65536];
uint8_t ulaw_data[65536];
@@ -57,7 +62,7 @@
const uint8_t alaw_1khz_sine[] = {0x34, 0x21, 0x21, 0x34, 0xB4, 0xA1, 0xA1, 0xB4};
const uint8_t ulaw_1khz_sine[] = {0x1E, 0x0B, 0x0B, 0x1E, 0x9E, 0x8B, 0x8B, 0x9E};
-int main(int argc, char *argv[])
+static void compliance_tests(int log_audio)
{
AFfilehandle outhandle;
power_meter_t power_meter;
@@ -73,14 +78,18 @@
float worst_ulaw;
float tmp;
int len;
- g711_state_t *encode;
+ g711_state_t *enc_state;
g711_state_t *transcode;
- g711_state_t *decode;
-
- if ((outhandle = afOpenFile_telephony_write(OUT_FILE_NAME, 1)) == AF_NULL_FILEHANDLE)
+ g711_state_t *dec_state;
+
+ outhandle = AF_NULL_FILEHANDLE;
+ if (log_audio)
{
- fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
- exit(2);
+ if ((outhandle = afOpenFile_telephony_write(OUT_FILE_NAME, 1)) == AF_NULL_FILEHANDLE)
+ {
+ fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
+ exit(2);
+ }
}
printf("Conversion accuracy tests.\n");
@@ -116,14 +125,17 @@
}
amp[i] = post;
}
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- amp,
- 65536);
- if (outframes != 65536)
+ if (log_audio)
{
- fprintf(stderr, " Error writing wave file\n");
- exit(2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ 65536);
+ if (outframes != 65536)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
for (i = 0; i < 65536; i++)
{
@@ -151,14 +163,17 @@
}
amp[i] = post;
}
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- amp,
- 65536);
- if (outframes != 65536)
+ if (log_audio)
{
- fprintf(stderr, " Error writing wave file\n");
- exit(2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ 65536);
+ if (outframes != 65536)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
}
printf("Worst A-law error (ignoring small values) %f%%\n", worst_alaw*100.0);
@@ -207,14 +222,17 @@
power_meter_update(&power_meter, amp[i]);
}
printf("Reference u-law 1kHz tone is %fdBm0\n", power_meter_current_dbm0(&power_meter));
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- amp,
- 8000);
- if (outframes != 8000)
+ if (log_audio)
{
- fprintf(stderr, " Error writing wave file\n");
- exit(2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ 8000);
+ if (outframes != 8000)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
if (0.1f < fabs(power_meter_current_dbm0(&power_meter)))
{
@@ -228,14 +246,17 @@
power_meter_update(&power_meter, amp[i]);
}
printf("Reference A-law 1kHz tone is %fdBm0\n", power_meter_current_dbm0(&power_meter));
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- amp,
- 8000);
- if (outframes != 8000)
+ if (log_audio)
{
- fprintf(stderr, " Error writing wave file\n");
- exit(2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ amp,
+ 8000);
+ if (outframes != 8000)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
if (0.1f < fabs(power_meter_current_dbm0(&power_meter)))
{
@@ -272,16 +293,16 @@
}
}
- encode = g711_init(NULL, G711_ALAW);
+ enc_state = g711_init(NULL, G711_ALAW);
transcode = g711_init(NULL, G711_ALAW);
- decode = g711_init(NULL, G711_ULAW);
+ dec_state = g711_init(NULL, G711_ULAW);
len = 65536;
for (i = 0; i < len; i++)
amp[i] = i - 32768;
- len = g711_encode(encode, alaw_data, amp, len);
+ len = g711_encode(enc_state, alaw_data, amp, len);
len = g711_transcode(transcode, ulaw_data, alaw_data, len);
- len = g711_decode(decode, amp, ulaw_data, len);
+ len = g711_decode(dec_state, amp, ulaw_data, len);
if (len != 65536)
{
printf("Block coding gave the wrong length - %d instead of %d\n", len, 65536);
@@ -311,17 +332,204 @@
}
}
}
- g711_release(encode);
+ g711_release(enc_state);
g711_release(transcode);
- g711_release(decode);
+ g711_release(dec_state);
- if (afCloseFile(outhandle))
+ if (log_audio)
{
- fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
- exit(2);
+ if (afCloseFile(outhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
+ exit(2);
+ }
}
printf("Tests passed.\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+ AFfilehandle inhandle;
+ AFfilehandle outhandle;
+ int outframes;
+ int opt;
+ int samples;
+ int len2;
+ int len3;
+ int basic_tests;
+ int law;
+ int encode;
+ int decode;
+ int file;
+ const char *in_file;
+ const char *out_file;
+ g711_state_t *enc_state;
+ g711_state_t *dec_state;
+ int16_t indata[BLOCK_LEN];
+ int16_t outdata[BLOCK_LEN];
+ uint8_t g711data[BLOCK_LEN];
+
+ basic_tests = TRUE;
+ law = G711_ALAW;
+ encode = FALSE;
+ decode = FALSE;
+ in_file = NULL;
+ out_file = NULL;
+ while ((opt = getopt(argc, argv, "ad:e:l:u")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ law = G711_ALAW;
+ basic_tests = FALSE;
+ break;
+ case 'd':
+ in_file = optarg;
+ basic_tests = FALSE;
+ decode = TRUE;
+ break;
+ case 'e':
+ in_file = optarg;
+ basic_tests = FALSE;
+ encode = TRUE;
+ break;
+ case 'l':
+ out_file = optarg;
+ break;
+ case 'u':
+ law = G711_ULAW;
+ basic_tests = FALSE;
+ break;
+ default:
+ //usage();
+ exit(2);
+ }
+ }
+
+ if (basic_tests)
+ {
+ compliance_tests(TRUE);
+ }
+ else
+ {
+ if (!decode && !encode)
+ {
+ decode =
+ encode = TRUE;
+ }
+ if (in_file == NULL)
+ {
+ in_file = (encode) ? IN_FILE_NAME : ENCODED_FILE_NAME;
+ }
+ if (out_file == NULL)
+ {
+ out_file = (decode) ? OUT_FILE_NAME : ENCODED_FILE_NAME;
+ }
+ inhandle = AF_NULL_FILEHANDLE;
+ outhandle = AF_NULL_FILEHANDLE;
+ file = -1;
+ enc_state = NULL;
+ dec_state = NULL;
+ if (encode)
+ {
+ if ((inhandle = afOpenFile_telephony_read(in_file, 1)) == AF_NULL_FILEHANDLE)
+ {
+ fprintf(stderr, " Cannot open wave file '%s'\n", in_file);
+ exit(2);
+ }
+ enc_state = g711_init(NULL, law);
+ }
+ else
+ {
+ if ((file = open(in_file, O_RDONLY)) < 0)
+ {
+ fprintf(stderr, " Failed to open '%s'\n", in_file);
+ exit(2);
+ }
+ }
+ if (decode)
+ {
+ if ((outhandle = afOpenFile_telephony_write(out_file, 1)) == AF_NULL_FILEHANDLE)
+ {
+ fprintf(stderr, " Cannot create wave file '%s'\n", out_file);
+ exit(2);
+ }
+ dec_state = g711_init(NULL, law);
+ }
+ else
+ {
+ if ((file = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
+ {
+ fprintf(stderr, " Failed to open '%s'\n", out_file);
+ exit(2);
+ }
+ }
+ for (;;)
+ {
+ if (encode)
+ {
+ samples = afReadFrames(inhandle,
+ AF_DEFAULT_TRACK,
+ indata,
+ BLOCK_LEN);
+ if (samples <= 0)
+ break;
+ len2 = g711_encode(enc_state, g711data, indata, samples);
+ }
+ else
+ {
+ len2 = read(file, g711data, BLOCK_LEN);
+ if (len2 <= 0)
+ break;
+ }
+ if (decode)
+ {
+ len3 = g711_decode(dec_state, outdata, g711data, len2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ outdata,
+ len3);
+ if (outframes != len3)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
+ }
+ else
+ {
+ len3 = write(file, g711data, len2);
+ if (len3 <= 0)
+ break;
+ }
+ }
+ if (encode)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", IN_FILE_NAME);
+ exit(2);
+ }
+ }
+ else
+ {
+ close(file);
+ }
+ if (decode)
+ {
+ if (afCloseFile(outhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
+ exit(2);
+ }
+ }
+ else
+ {
+ close(file);
+ }
+ printf("'%s' translated to '%s' using %s.\n", in_file, out_file, (law == G711_ALAW) ? "A-law" : "u-law");
+ }
return 0;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/tests/g722_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/g722_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/g722_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g722_tests.c,v 1.29 2009/01/12 17:20:59 steveu Exp $
+ * $Id: g722_tests.c,v 1.30 2009/04/22 12:57:40 steveu Exp $
*/
/*! \file */
@@ -87,6 +87,7 @@
#define EIGHTK_IN_FILE_NAME "../test-data/local/short_nb_voice.wav"
#define IN_FILE_NAME "../test-data/local/short_wb_voice.wav"
+#define ENCODED_FILE_NAME "g722.g722"
#define OUT_FILE_NAME "post_g722.wav"
#if 0
@@ -217,41 +218,178 @@
}
/*- End of function --------------------------------------------------------*/
-int main(int argc, char *argv[])
+static void itu_compliance_tests(void)
{
g722_encode_state_t enc_state;
g722_decode_state_t dec_state;
- int len;
+ int i;
+ int j;
+ int k;
int len_comp;
int len_comp_upper;
int len_data;
+ int len;
+ int len2;
+ int mode;
+ int file;
+
+#if 1
+ /* ITU G.722 encode tests, using configuration 1. The QMF is bypassed */
+ for (file = 0; encode_test_files[file]; file += 2)
+ {
+ printf("Testing %s -> %s\n", encode_test_files[file], encode_test_files[file + 1]);
+
+ /* Get the input data */
+ len_data = get_test_vector(encode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
+
+ /* Get the reference output data */
+ len_comp = get_test_vector(encode_test_files[file + 1], itu_ref, MAX_TEST_VECTOR_LEN);
+
+ /* Process the input data */
+ /* Skip the reset stuff at each end of the data */
+ for (i = 0; i < len_data; i++)
+ {
+ if ((itu_data[i] & 1) == 0)
+ break;
+ }
+ for (j = i; j < len_data; j++)
+ {
+ if ((itu_data[j] & 1))
+ break;
+ }
+ len = j - i;
+ g722_encode_init(&enc_state, 64000, 0);
+ enc_state.itu_test_mode = TRUE;
+ len2 = g722_encode(&enc_state, compressed, itu_data + i, len);
+
+ /* Check the result against the ITU's reference output data */
+ j = 0;
+ for (k = 0; k < len2; k++)
+ {
+ if ((compressed[k] & 0xFF) != ((itu_ref[k + i] >> 8) & 0xFF))
+ {
+ printf(">>> %6d %4x %4x\n", k, compressed[k] & 0xFF, itu_ref[k + i] & 0xFFFF);
+ j++;
+ }
+ }
+ printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
+ if (j)
+ {
+ printf("Test failed\n");
+ exit(2);
+ }
+ printf("Test passed\n");
+ }
+#endif
+#if 1
+ /* ITU G.722 decode tests, using configuration 2. The QMF is bypassed */
+ /* Run each of the tests for each of the modes - 48kbps, 56kbps and 64kbps. */
+ for (mode = 1; mode <= 3; mode++)
+ {
+ for (file = 0; decode_test_files[file]; file += 5)
+ {
+ printf("Testing mode %d, %s -> %s + %s\n",
+ mode,
+ decode_test_files[file],
+ decode_test_files[file + mode],
+ decode_test_files[file + 4]);
+
+ /* Get the input data */
+ len_data = get_test_vector(decode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
+
+ /* Get the lower reference output data */
+ len_comp = get_test_vector(decode_test_files[file + mode], itu_ref, MAX_TEST_VECTOR_LEN);
+
+ /* Get the upper reference output data */
+ len_comp_upper = get_test_vector(decode_test_files[file + 4], itu_ref_upper, MAX_TEST_VECTOR_LEN);
+
+ /* Process the input data */
+ /* Skip the reset stuff at each end of the data */
+ for (i = 0; i < len_data; i++)
+ {
+ if ((itu_data[i] & 1) == 0)
+ break;
+ }
+ for (j = i; j < len_data; j++)
+ {
+ if ((itu_data[j] & 1))
+ break;
+ }
+ len = j - i;
+ for (k = 0; k < len; k++)
+ compressed[k] = itu_data[k + i] >> ((mode == 3) ? 10 : (mode == 2) ? 9 : 8);
+
+ g722_decode_init(&dec_state, (mode == 3) ? 48000 : (mode == 2) ? 56000 : 64000, 0);
+ dec_state.itu_test_mode = TRUE;
+ len2 = g722_decode(&dec_state, decompressed, compressed, len);
+
+ /* Check the result against the ITU's reference output data */
+ j = 0;
+ for (k = 0; k < len2; k += 2)
+ {
+ if ((decompressed[k] & 0xFFFF) != (itu_ref[(k >> 1) + i] & 0xFFFF)
+ ||
+ (decompressed[k + 1] & 0xFFFF) != (itu_ref_upper[(k >> 1) + i] & 0xFFFF))
+ {
+ printf(">>> %6d %4x %4x %4x %4x\n", k >> 1, decompressed[k] & 0xFFFF, decompressed[k + 1] & 0xFFFF, itu_ref[(k >> 1) + i] & 0xFFFF, itu_ref_upper[(k >> 1) + i] & 0xFFFF);
+ j++;
+ }
+ }
+ printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
+ if (j)
+ {
+ printf("Test failed\n");
+ exit(2);
+ }
+ printf("Test passed\n");
+ }
+ }
+#endif
+ printf("Tests passed.\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+ g722_encode_state_t enc_state;
+ g722_decode_state_t dec_state;
int len2;
int len3;
int i;
- int j;
- int k;
int file;
AFfilehandle inhandle;
AFfilehandle outhandle;
AFfilesetup filesetup;
int outframes;
int samples;
- int mode;
int opt;
int itutests;
int bit_rate;
int eight_k_in;
int eight_k_out;
+ int encode;
+ int decode;
+ int tone_test;
float x;
+ const char *in_file;
+ const char *out_file;
int16_t indata[BLOCK_LEN];
int16_t outdata[BLOCK_LEN];
uint8_t adpcmdata[BLOCK_LEN];
+ float tone_level;
+ uint32_t tone_phase;
+ int32_t tone_phase_rate;
bit_rate = 64000;
eight_k_in = FALSE;
eight_k_out = FALSE;
itutests = TRUE;
- while ((opt = getopt(argc, argv, "b:i:o:")) != -1)
+ encode = FALSE;
+ decode = FALSE;
+ tone_test = FALSE;
+ in_file = NULL;
+ out_file = NULL;
+ while ((opt = getopt(argc, argv, "b:d:e:i:l:o:t")) != -1)
{
switch (opt)
{
@@ -264,6 +402,16 @@
}
itutests = FALSE;
break;
+ case 'd':
+ in_file = optarg;
+ decode = TRUE;
+ itutests = FALSE;
+ break;
+ case 'e':
+ in_file = optarg;
+ encode = TRUE;
+ itutests = FALSE;
+ break;
case 'i':
i = atoi(optarg);
if (i != 8000 && i != 16000)
@@ -271,16 +419,25 @@
fprintf(stderr, "Invalid incoming sample rate. Only 8000 and 16000 are valid.\n");
exit(2);
}
- eight_k_in = (i == 8000);
+ eight_k_in = (i == 8000);
+ if (eight_k_in)
+ in_file = EIGHTK_IN_FILE_NAME;
+ break;
+ case 'l':
+ out_file = optarg;
break;
case 'o':
i = atoi(optarg);
if (i != 8000 && i != 16000)
{
- fprintf(stderr, "Invalid incoming sample rate. Only 8000 and 16000 are valid.\n");
+ fprintf(stderr, "Invalid outgoing sample rate. Only 8000 and 16000 are valid.\n");
exit(2);
}
- eight_k_out = (i == 8000);
+ eight_k_out = (i == 8000);
+ break;
+ case 't':
+ tone_test = TRUE;
+ itutests = FALSE;
break;
default:
//usage();
@@ -290,227 +447,201 @@
if (itutests)
{
-#if 1
- /* ITU G.722 encode tests, using configuration 1. The QMF is bypassed */
- for (file = 0; encode_test_files[file]; file += 2)
+ itu_compliance_tests();
+ }
+ else
+ {
+ tone_level = dds_scaling_dbm0f(2.5f);
+ tone_phase = 0;
+ tone_phase_rate = dds_phase_ratef(1500.0f/2.0f);
+ if (!decode && !encode)
{
- printf("Testing %s -> %s\n", encode_test_files[file], encode_test_files[file + 1]);
-
- /* Get the input data */
- len_data = get_test_vector(encode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
-
- /* Get the reference output data */
- len_comp = get_test_vector(encode_test_files[file + 1], itu_ref, MAX_TEST_VECTOR_LEN);
-
- /* Process the input data */
- /* Skip the reset stuff at each end of the data */
- for (i = 0; i < len_data; i++)
+ decode =
+ encode = TRUE;
+ }
+ if (in_file == NULL)
+ {
+ if (encode)
{
- if ((itu_data[i] & 1) == 0)
- break;
+ if (eight_k_in)
+ in_file = EIGHTK_IN_FILE_NAME;
+ else
+ in_file = IN_FILE_NAME;
}
- for (j = i; j < len_data; j++)
+ else
{
- if ((itu_data[j] & 1))
- break;
+ in_file = ENCODED_FILE_NAME;
}
- len = j - i;
- g722_encode_init(&enc_state, 64000, 0);
- enc_state.itu_test_mode = TRUE;
- len2 = g722_encode(&enc_state, compressed, itu_data + i, len);
-
- /* Check the result against the ITU's reference output data */
- j = 0;
- for (k = 0; k < len2; k++)
+ }
+ if (out_file == NULL)
+ {
+ out_file = (decode) ? OUT_FILE_NAME : ENCODED_FILE_NAME;
+ }
+ inhandle = AF_NULL_FILEHANDLE;
+ outhandle = AF_NULL_FILEHANDLE;
+ file = -1;
+ if (encode)
+ {
+ if (eight_k_in)
{
- if ((compressed[k] & 0xFF) != ((itu_ref[k + i] >> 8) & 0xFF))
+ if ((inhandle = afOpenFile(in_file, "r", NULL)) == AF_NULL_FILEHANDLE)
{
- printf(">>> %6d %4x %4x\n", k, compressed[k] & 0xFF, itu_ref[k + i] & 0xFFFF);
- j++;
+ fprintf(stderr, " Cannot open wave file '%s'\n", in_file);
+ exit(2);
+ }
+ if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+ {
+ fprintf(stderr, " Unexpected frame size in wave file '%s'\n", in_file);
+ exit(2);
+ }
+ if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+ {
+ fprintf(stderr, " Unexpected sample rate %f in wave file '%s'\n", x, in_file);
+ exit(2);
+ }
+ if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+ {
+ fprintf(stderr, " Unexpected number of channels in wave file '%s'\n", in_file);
+ exit(2);
}
}
- printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
- if (j)
+ else
{
- printf("Test failed\n");
- exit(2);
- }
- printf("Test passed\n");
- }
-#endif
-#if 1
- /* ITU G.722 decode tests, using configuration 2. The QMF is bypassed */
- /* Run each of the tests for each of the modes - 48kbps, 56kbps and 64kbps. */
- for (mode = 1; mode <= 3; mode++)
- {
- for (file = 0; decode_test_files[file]; file += 5)
- {
- printf("Testing mode %d, %s -> %s + %s\n",
- mode,
- decode_test_files[file],
- decode_test_files[file + mode],
- decode_test_files[file + 4]);
-
- /* Get the input data */
- len_data = get_test_vector(decode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
-
- /* Get the lower reference output data */
- len_comp = get_test_vector(decode_test_files[file + mode], itu_ref, MAX_TEST_VECTOR_LEN);
-
- /* Get the upper reference output data */
- len_comp_upper = get_test_vector(decode_test_files[file + 4], itu_ref_upper, MAX_TEST_VECTOR_LEN);
-
- /* Process the input data */
- /* Skip the reset stuff at each end of the data */
- for (i = 0; i < len_data; i++)
+ if ((inhandle = afOpenFile(in_file, "r", NULL)) == AF_NULL_FILEHANDLE)
{
- if ((itu_data[i] & 1) == 0)
- break;
+ fprintf(stderr, " Cannot open wave file '%s'\n", in_file);
+ exit(2);
}
- for (j = i; j < len_data; j++)
+ if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
{
- if ((itu_data[j] & 1))
- break;
- }
- len = j - i;
- for (k = 0; k < len; k++)
- compressed[k] = itu_data[k + i] >> ((mode == 3) ? 10 : (mode == 2) ? 9 : 8);
-
- g722_decode_init(&dec_state, (mode == 3) ? 48000 : (mode == 2) ? 56000 : 64000, 0);
- dec_state.itu_test_mode = TRUE;
- len2 = g722_decode(&dec_state, decompressed, compressed, len);
-
- /* Check the result against the ITU's reference output data */
- j = 0;
- for (k = 0; k < len2; k += 2)
- {
- if ((decompressed[k] & 0xFFFF) != (itu_ref[(k >> 1) + i] & 0xFFFF)
- ||
- (decompressed[k + 1] & 0xFFFF) != (itu_ref_upper[(k >> 1) + i] & 0xFFFF))
- {
- printf(">>> %6d %4x %4x %4x %4x\n", k >> 1, decompressed[k] & 0xFFFF, decompressed[k + 1] & 0xFFFF, itu_ref[(k >> 1) + i] & 0xFFFF, itu_ref_upper[(k >> 1) + i] & 0xFFFF);
- j++;
- }
+ fprintf(stderr, " Unexpected frame size in wave file '%s'\n", in_file);
+ exit(2);
+ }
+ if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) G722_SAMPLE_RATE)
+ {
+ fprintf(stderr, " Unexpected sample rate %f in wave file '%s'\n", x, in_file);
+ exit(2);
}
- printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
- if (j)
+ if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
{
- printf("Test failed\n");
+ fprintf(stderr, " Unexpected number of channels in wave file '%s'\n", in_file);
exit(2);
}
- printf("Test passed\n");
}
+ if (eight_k_in)
+ g722_encode_init(&enc_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
+ else
+ g722_encode_init(&enc_state, bit_rate, G722_PACKED);
}
-#endif
- printf("Tests passed.\n");
- }
- else
- {
- if (eight_k_in)
+ else
{
- if ((inhandle = afOpenFile(EIGHTK_IN_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
+ if ((file = open(in_file, O_RDONLY)) < 0)
{
- fprintf(stderr, " Cannot open wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+ fprintf(stderr, " Failed to open '%s'\n", in_file);
exit(2);
}
- if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+ }
+ if (decode)
+ {
+ if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
{
- fprintf(stderr, " Unexpected frame size in wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+ fprintf(stderr, " Failed to create file setup\n");
exit(2);
}
- if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
+ afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
+ if (eight_k_out)
+ afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
+ else
+ afInitRate(filesetup, AF_DEFAULT_TRACK, (float) G722_SAMPLE_RATE);
+ afInitFileFormat(filesetup, AF_FILE_WAVE);
+ afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
+ if ((outhandle = afOpenFile(out_file, "w", filesetup)) == AF_NULL_FILEHANDLE)
{
- fprintf(stderr, " Unexpected sample rate %f in wave file '%s'\n", x, EIGHTK_IN_FILE_NAME);
+ fprintf(stderr, " Cannot create wave file '%s'\n", out_file);
exit(2);
}
- if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+ afFreeFileSetup(filesetup);
+ if (eight_k_out)
+ g722_decode_init(&dec_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
+ else
+ g722_decode_init(&dec_state, bit_rate, G722_PACKED);
+ }
+ else
+ {
+ if ((file = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
{
- fprintf(stderr, " Unexpected number of channels in wave file '%s'\n", EIGHTK_IN_FILE_NAME);
+ fprintf(stderr, " Failed to open '%s'\n", out_file);
exit(2);
}
}
- else
+ for (;;)
{
- if ((inhandle = afOpenFile(IN_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
+ if (encode)
{
- fprintf(stderr, " Cannot open wave file '%s'\n", IN_FILE_NAME);
- exit(2);
+ samples = afReadFrames(inhandle,
+ AF_DEFAULT_TRACK,
+ indata,
+ BLOCK_LEN);
+ if (samples <= 0)
+ break;
+ if (tone_test)
+ {
+ for (i = 0; i < samples; i++)
+ indata[i] = dds_modf(&tone_phase, tone_phase_rate, tone_level, 0);
+ }
+ len2 = g722_encode(&enc_state, adpcmdata, indata, samples);
}
- if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
+ else
{
- fprintf(stderr, " Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
- exit(2);
+ len2 = read(file, adpcmdata, BLOCK_LEN);
+ if (len2 <= 0)
+ break;
}
- if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) G722_SAMPLE_RATE)
+ if (decode)
{
- fprintf(stderr, " Unexpected sample rate %f in wave file '%s'\n", x, IN_FILE_NAME);
- exit(2);
+ len3 = g722_decode(&dec_state, outdata, adpcmdata, len2);
+ outframes = afWriteFrames(outhandle,
+ AF_DEFAULT_TRACK,
+ outdata,
+ len3);
+ if (outframes != len3)
+ {
+ fprintf(stderr, " Error writing wave file\n");
+ exit(2);
+ }
}
- if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
+ else
{
- fprintf(stderr, " Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
- exit(2);
+ len3 = write(file, adpcmdata, len2);
+ if (len3 <= 0)
+ break;
}
}
-
- if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
+ if (encode)
{
- fprintf(stderr, " Failed to create file setup\n");
- exit(2);
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", IN_FILE_NAME);
+ exit(2);
+ }
}
- afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
- if (eight_k_out)
- afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
else
- afInitRate(filesetup, AF_DEFAULT_TRACK, (float) G722_SAMPLE_RATE);
- afInitFileFormat(filesetup, AF_FILE_WAVE);
- afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
- if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
{
- fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
- exit(2);
+ close(file);
}
- if (eight_k_in)
- g722_encode_init(&enc_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
- else
- g722_encode_init(&enc_state, bit_rate, G722_PACKED);
- if (eight_k_out)
- g722_decode_init(&dec_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
- else
- g722_decode_init(&dec_state, bit_rate, G722_PACKED);
- for (;;)
+ if (decode)
{
- samples = afReadFrames(inhandle,
- AF_DEFAULT_TRACK,
- indata,
- BLOCK_LEN);
- if (samples <= 0)
- break;
- len2 = g722_encode(&enc_state, adpcmdata, indata, samples);
- len3 = g722_decode(&dec_state, outdata, adpcmdata, len2);
- outframes = afWriteFrames(outhandle,
- AF_DEFAULT_TRACK,
- outdata,
- len3);
- if (outframes != len3)
+ if (afCloseFile(outhandle))
{
- fprintf(stderr, " Error writing wave file\n");
+ fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
exit(2);
}
}
- if (afCloseFile(inhandle))
- {
- fprintf(stderr, " Cannot close wave file '%s'\n", IN_FILE_NAME);
- exit(2);
- }
- if (afCloseFile(outhandle))
+ else
{
- fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
- exit(2);
+ close(file);
}
- afFreeFileSetup(filesetup);
-
- printf("'%s' transcoded to '%s' at %dbps.\n", IN_FILE_NAME, OUT_FILE_NAME, bit_rate);
+ printf("'%s' translated to '%s' at %dbps.\n", in_file, out_file, bit_rate);
}
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/tests/g726_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/g726_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/g726_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g726_tests.c,v 1.31 2009/01/12 17:20:59 steveu Exp $
+ * $Id: g726_tests.c,v 1.32 2009/04/22 12:57:40 steveu Exp $
*/
/*! \file */
@@ -1077,7 +1077,7 @@
}
/*- End of function --------------------------------------------------------*/
-int main(int argc, char *argv[])
+static void itu_compliance_tests(void)
{
g726_state_t enc_state;
g726_state_t dec_state;
@@ -1085,158 +1085,87 @@
int len3;
int i;
int test;
- int opt;
int bits_per_code;
- int itutests;
- int bit_rate;
int bad_samples;
- AFfilehandle inhandle;
- AFfilehandle outhandle;
- int16_t amp[1024];
- int frames;
- int outframes;
int conditioning_samples;
int samples;
int conditioning_adpcm;
int adpcm;
- int packing;
- i = 1;
- bit_rate = 32000;
- itutests = TRUE;
- packing = G726_PACKING_NONE;
- while ((opt = getopt(argc, argv, "b:lr")) != -1)
+ len2 = 0;
+ conditioning_samples = 0;
+ for (test = 0; itu_test_sets[test].rate; test++)
{
- switch (opt)
+ printf("Test %2d: '%s' + '%s'\n"
+ " -> '%s' + '%s'\n"
+ " -> '%s' [%d, %d, %d]\n",
+ test,
+ itu_test_sets[test].conditioning_pcm_file,
+ itu_test_sets[test].pcm_file,
+ itu_test_sets[test].conditioning_adpcm_file,
+ itu_test_sets[test].adpcm_file,
+ itu_test_sets[test].output_file,
+ itu_test_sets[test].rate,
+ itu_test_sets[test].compression_law,
+ itu_test_sets[test].decompression_law);
+ switch (itu_test_sets[test].rate)
{
- case 'b':
- bit_rate = atoi(optarg);
- if (bit_rate != 16000 && bit_rate != 24000 && bit_rate != 32000 && bit_rate != 40000)
- {
- fprintf(stderr, "Invalid bit rate selected. Only 16000, 24000, 32000 and 40000 are valid.\n");
- exit(2);
- }
- itutests = FALSE;
+ case 16000:
+ bits_per_code = 2;
break;
- case 'l':
- packing = G726_PACKING_LEFT;
- break;
- case 'r':
- packing = G726_PACKING_RIGHT;
+ case 24000:
+ bits_per_code = 3;
break;
+ case 32000:
default:
- //usage();
- exit(2);
+ bits_per_code = 4;
+ break;
+ case 40000:
+ bits_per_code = 5;
+ break;
}
- }
-
- len2 = 0;
- conditioning_samples = 0;
- if (itutests)
- {
- for (test = 0; itu_test_sets[test].rate; test++)
+ if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
{
- printf("Test %2d: '%s' + '%s'\n"
- " -> '%s' + '%s'\n"
- " -> '%s' [%d, %d, %d]\n",
- test,
- itu_test_sets[test].conditioning_pcm_file,
- itu_test_sets[test].pcm_file,
- itu_test_sets[test].conditioning_adpcm_file,
- itu_test_sets[test].adpcm_file,
- itu_test_sets[test].output_file,
- itu_test_sets[test].rate,
- itu_test_sets[test].compression_law,
- itu_test_sets[test].decompression_law);
- switch (itu_test_sets[test].rate)
- {
- case 16000:
- bits_per_code = 2;
- break;
- case 24000:
- bits_per_code = 3;
- break;
- case 32000:
- default:
- bits_per_code = 4;
- break;
- case 40000:
- bits_per_code = 5;
- break;
- }
- if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
+ /* Test the encode side */
+ g726_init(&enc_state, itu_test_sets[test].rate, itu_test_sets[test].compression_law, G726_PACKING_NONE);
+ if (itu_test_sets[test].conditioning_pcm_file[0])
{
- /* Test the encode side */
- g726_init(&enc_state, itu_test_sets[test].rate, itu_test_sets[test].compression_law, G726_PACKING_NONE);
- if (itu_test_sets[test].conditioning_pcm_file[0])
- {
- conditioning_samples = get_test_vector(itu_test_sets[test].conditioning_pcm_file, xlaw, MAX_TEST_VECTOR_LEN);
- printf("Test %d: Homing %d samples at %dbps\n", test, conditioning_samples, itu_test_sets[test].rate);
- }
- else
- {
- conditioning_samples = 0;
- }
- samples = get_test_vector(itu_test_sets[test].pcm_file, xlaw + conditioning_samples, MAX_TEST_VECTOR_LEN);
- memcpy(itudata, xlaw, samples + conditioning_samples);
- printf("Test %d: Compressing %d samples at %dbps\n", test, samples, itu_test_sets[test].rate);
- len2 = g726_encode(&enc_state, adpcmdata, itudata, conditioning_samples + samples);
- }
- /* Test the decode side */
- g726_init(&dec_state, itu_test_sets[test].rate, itu_test_sets[test].decompression_law, G726_PACKING_NONE);
- if (itu_test_sets[test].conditioning_adpcm_file[0])
- {
- conditioning_adpcm = get_test_vector(itu_test_sets[test].conditioning_adpcm_file, unpacked, MAX_TEST_VECTOR_LEN);
- printf("Test %d: Homing %d octets at %dbps\n", test, conditioning_adpcm, itu_test_sets[test].rate);
+ conditioning_samples = get_test_vector(itu_test_sets[test].conditioning_pcm_file, xlaw, MAX_TEST_VECTOR_LEN);
+ printf("Test %d: Homing %d samples at %dbps\n", test, conditioning_samples, itu_test_sets[test].rate);
}
else
{
- conditioning_adpcm = 0;
+ conditioning_samples = 0;
}
- adpcm = get_test_vector(itu_test_sets[test].adpcm_file, unpacked + conditioning_adpcm, MAX_TEST_VECTOR_LEN);
- if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
- {
- /* Test our compressed version against the reference compressed version */
- printf("Test %d: Compressed data check - %d/%d octets\n", test, conditioning_adpcm + adpcm, len2);
- if (conditioning_adpcm + adpcm == len2)
- {
- for (bad_samples = 0, i = conditioning_samples; i < len2; i++)
- {
- if (adpcmdata[i] != unpacked[i])
- {
- bad_samples++;
- printf("Test %d: Compressed mismatch %d %x %x\n", test, i, adpcmdata[i], unpacked[i]);
- }
- }
- if (bad_samples > 0)
- {
- printf("Test failed\n");
- exit(2);
- }
- printf("Test passed\n");
- }
- else
- {
- printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, conditioning_adpcm + adpcm, len2);
- exit(2);
- }
- }
-
- len3 = g726_decode(&dec_state, outdata, unpacked, conditioning_adpcm + adpcm);
-
- /* Get the output reference data */
- samples = get_test_vector(itu_test_sets[test].output_file, xlaw, MAX_TEST_VECTOR_LEN);
- memcpy(itu_ref, xlaw, samples);
- /* Test our decompressed version against the reference decompressed version */
- printf("Test %d: Decompressed data check - %d/%d samples\n", test, samples, len3 - conditioning_adpcm);
- if (samples == len3 - conditioning_adpcm)
+ samples = get_test_vector(itu_test_sets[test].pcm_file, xlaw + conditioning_samples, MAX_TEST_VECTOR_LEN);
+ memcpy(itudata, xlaw, samples + conditioning_samples);
+ printf("Test %d: Compressing %d samples at %dbps\n", test, samples, itu_test_sets[test].rate);
+ len2 = g726_encode(&enc_state, adpcmdata, itudata, conditioning_samples + samples);
+ }
+ /* Test the decode side */
+ g726_init(&dec_state, itu_test_sets[test].rate, itu_test_sets[test].decompression_law, G726_PACKING_NONE);
+ if (itu_test_sets[test].conditioning_adpcm_file[0])
+ {
+ conditioning_adpcm = get_test_vector(itu_test_sets[test].conditioning_adpcm_file, unpacked, MAX_TEST_VECTOR_LEN);
+ printf("Test %d: Homing %d octets at %dbps\n", test, conditioning_adpcm, itu_test_sets[test].rate);
+ }
+ else
+ {
+ conditioning_adpcm = 0;
+ }
+ adpcm = get_test_vector(itu_test_sets[test].adpcm_file, unpacked + conditioning_adpcm, MAX_TEST_VECTOR_LEN);
+ if (itu_test_sets[test].compression_law != G726_ENCODING_NONE)
+ {
+ /* Test our compressed version against the reference compressed version */
+ printf("Test %d: Compressed data check - %d/%d octets\n", test, conditioning_adpcm + adpcm, len2);
+ if (conditioning_adpcm + adpcm == len2)
{
- for (bad_samples = 0, i = 0; i < len3; i++)
+ for (bad_samples = 0, i = conditioning_samples; i < len2; i++)
{
- if (itu_ref[i] != ((uint8_t *) outdata)[i + conditioning_adpcm])
+ if (adpcmdata[i] != unpacked[i])
{
bad_samples++;
- printf("Test %d: Decompressed mismatch %d %x %x\n", test, i, itu_ref[i], ((uint8_t *) outdata)[i + conditioning_adpcm]);
+ printf("Test %d: Compressed mismatch %d %x %x\n", test, i, adpcmdata[i], unpacked[i]);
}
}
if (bad_samples > 0)
@@ -1248,12 +1177,92 @@
}
else
{
- printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, samples, len3 - conditioning_adpcm);
+ printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, conditioning_adpcm + adpcm, len2);
+ exit(2);
+ }
+ }
+
+ len3 = g726_decode(&dec_state, outdata, unpacked, conditioning_adpcm + adpcm);
+
+ /* Get the output reference data */
+ samples = get_test_vector(itu_test_sets[test].output_file, xlaw, MAX_TEST_VECTOR_LEN);
+ memcpy(itu_ref, xlaw, samples);
+ /* Test our decompressed version against the reference decompressed version */
+ printf("Test %d: Decompressed data check - %d/%d samples\n", test, samples, len3 - conditioning_adpcm);
+ if (samples == len3 - conditioning_adpcm)
+ {
+ for (bad_samples = 0, i = 0; i < len3; i++)
+ {
+ if (itu_ref[i] != ((uint8_t *) outdata)[i + conditioning_adpcm])
+ {
+ bad_samples++;
+ printf("Test %d: Decompressed mismatch %d %x %x\n", test, i, itu_ref[i], ((uint8_t *) outdata)[i + conditioning_adpcm]);
+ }
+ }
+ if (bad_samples > 0)
+ {
+ printf("Test failed\n");
+ exit(2);
+ }
+ printf("Test passed\n");
+ }
+ else
+ {
+ printf("Test %d: Length mismatch - ref = %d, processed = %d\n", test, samples, len3 - conditioning_adpcm);
+ exit(2);
+ }
+ }
+
+ printf("Tests passed.\n");
+}
+/*- End of function --------------------------------------------------------*/
+
+int main(int argc, char *argv[])
+{
+ g726_state_t enc_state;
+ g726_state_t dec_state;
+ int opt;
+ int itutests;
+ int bit_rate;
+ AFfilehandle inhandle;
+ AFfilehandle outhandle;
+ int16_t amp[1024];
+ int frames;
+ int outframes;
+ int adpcm;
+ int packing;
+
+ bit_rate = 32000;
+ itutests = TRUE;
+ packing = G726_PACKING_NONE;
+ while ((opt = getopt(argc, argv, "b:LR")) != -1)
+ {
+ switch (opt)
+ {
+ case 'b':
+ bit_rate = atoi(optarg);
+ if (bit_rate != 16000 && bit_rate != 24000 && bit_rate != 32000 && bit_rate != 40000)
+ {
+ fprintf(stderr, "Invalid bit rate selected. Only 16000, 24000, 32000 and 40000 are valid.\n");
exit(2);
}
+ itutests = FALSE;
+ break;
+ case 'L':
+ packing = G726_PACKING_LEFT;
+ break;
+ case 'R':
+ packing = G726_PACKING_RIGHT;
+ break;
+ default:
+ //usage();
+ exit(2);
}
+ }
- printf("Tests passed.\n");
+ if (itutests)
+ {
+ itu_compliance_tests();
}
else
{
@@ -1269,8 +1278,6 @@
}
printf("ADPCM packing is %d\n", packing);
- //g726_init(&enc_state, bit_rate, G726_ENCODING_LINEAR, G726_PACKING_LEFT);
- //g726_init(&dec_state, bit_rate, G726_ENCODING_LINEAR, G726_PACKING_RIGHT);
g726_init(&enc_state, bit_rate, G726_ENCODING_LINEAR, packing);
g726_init(&dec_state, bit_rate, G726_ENCODING_LINEAR, packing);
Modified: freeswitch/trunk/libs/spandsp/tests/gsm0610_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/gsm0610_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/gsm0610_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: gsm0610_tests.c,v 1.23 2009/01/12 17:20:59 steveu Exp $
+ * $Id: gsm0610_tests.c,v 1.24 2009/04/22 12:57:40 steveu Exp $
*/
/*! \file */
@@ -516,6 +516,30 @@
}
/*- End of function --------------------------------------------------------*/
+static void etsi_compliance_tests(void)
+{
+ perform_linear_test(TRUE, 1, "Seq01");
+ perform_linear_test(TRUE, 1, "Seq02");
+ perform_linear_test(TRUE, 1, "Seq03");
+ perform_linear_test(TRUE, 1, "Seq04");
+ perform_linear_test(FALSE, 1, "Seq05");
+ perform_law_test(TRUE, 'a', "Seq01");
+ perform_law_test(TRUE, 'a', "Seq02");
+ perform_law_test(TRUE, 'a', "Seq03");
+ perform_law_test(TRUE, 'a', "Seq04");
+ perform_law_test(FALSE, 'a', "Seq05");
+ perform_law_test(TRUE, 'u', "Seq01");
+ perform_law_test(TRUE, 'u', "Seq02");
+ perform_law_test(TRUE, 'u', "Seq03");
+ perform_law_test(TRUE, 'u', "Seq04");
+ perform_law_test(FALSE, 'u', "Seq05");
+ /* This is not actually an ETSI test */
+ perform_pack_unpack_test();
+
+ printf("Tests passed.\n");
+}
+/*- End of function --------------------------------------------------------*/
+
int main(int argc, char *argv[])
{
AFfilehandle inhandle;
@@ -552,25 +576,7 @@
if (etsitests)
{
- perform_linear_test(TRUE, 1, "Seq01");
- perform_linear_test(TRUE, 1, "Seq02");
- perform_linear_test(TRUE, 1, "Seq03");
- perform_linear_test(TRUE, 1, "Seq04");
- perform_linear_test(FALSE, 1, "Seq05");
- perform_law_test(TRUE, 'a', "Seq01");
- perform_law_test(TRUE, 'a', "Seq02");
- perform_law_test(TRUE, 'a', "Seq03");
- perform_law_test(TRUE, 'a', "Seq04");
- perform_law_test(FALSE, 'a', "Seq05");
- perform_law_test(TRUE, 'u', "Seq01");
- perform_law_test(TRUE, 'u', "Seq02");
- perform_law_test(TRUE, 'u', "Seq03");
- perform_law_test(TRUE, 'u', "Seq04");
- perform_law_test(FALSE, 'u', "Seq05");
- /* This is not actually an ETSI test */
- perform_pack_unpack_test();
-
- printf("Tests passed.\n");
+ etsi_compliance_tests();
}
else
{
Added: freeswitch/trunk/libs/spandsp/tests/msvc/adsi_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/adsi_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="adsi_tests"
+ ProjectGUID="{4B3877F1-B3E4-463C-8F39-12231480CC30}"
+ RootNamespace="adsi_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ AdditionalDependencies="..\src\Debug\spandsp.lib ..\spandsp-sim\Debug\spandsp.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ AdditionalDependencies="..\src\Debug\spandsp.lib ..\spandsp-sim\Debug\spandsp.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\adsi_tests.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/complex_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/complex_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="complex_tests"
+ ProjectGUID="{A349379F-0FEA-49C8-9535-05F39663337B}"
+ RootNamespace="complex_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\complex_tests.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_float_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_float_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="complex_vector_float_tests"
+ ProjectGUID="{2B0D705C-1CF2-401C-BFBC-A43FB806908C}"
+ RootNamespace="complex_vector_float_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\complex_vector_float_tests.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_int_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/complex_vector_int_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="complex_vector_int_tests"
+ ProjectGUID="{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}"
+ RootNamespace="complex_vector_int_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\complex_vector_int_tests.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_rx_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_rx_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="dtmf_rx_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="dtmf_rx_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\dtmf_rx_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_tx_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/dtmf_tx_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="dtmf_tx_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="dtmf_tx_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\dtmf_tx_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/queue_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/queue_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="queue_tests"
+ ProjectGUID="{80A3D9D9-3846-4DA5-8676-F940D725EA62}"
+ RootNamespace="queue_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\queue_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/t38_core_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/t38_core_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="t38_core_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="t38_core_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\t38_core_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/t38_non_ecm_buffer_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/t38_non_ecm_buffer_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="t38_non_ecm_buffer_tests"
+ ProjectGUID="{80A3D9D9-3846-4DA5-8676-F940D725EA62}"
+ RootNamespace="t38_non_ecm_buffer_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\t38_non_ecm_buffer_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/t38_terminal_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/t38_terminal_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="t38-terminal-tests"
+ ProjectGUID="{B5DECF33-1D06-459A-AE70-A06404909919}"
+ RootNamespace="t38terminaltests"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""..\src";"..\spandsp-sim";..\..\libtiff\include;"..\src\msvc""
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib ..\spandsp-sim\Debug\spandsp.lib"
+ GenerateDebugInformation="true"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ RuntimeLibrary="2"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ GenerateDebugInformation="true"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="fax_utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="media_monitor.cpp"
+ >
+ </File>
+ <File
+ RelativePath="t38_terminal_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/v22bis_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/v22bis_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="v22bis_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="v22bis_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\v22bis_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/v29_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/v29_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="v29_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="v29_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\v29_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/v80_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/v80_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="v80_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="v80_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\v80_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/v8_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/v8_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="v8_tests"
+ ProjectGUID="{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
+ RootNamespace="v8_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\v8_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/vector_float_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/vector_float_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="vector_float_tests"
+ ProjectGUID="{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}"
+ RootNamespace="vector_float_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\vector_float_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/tests/msvc/vector_int_tests.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/tests/msvc/vector_int_tests.vcproj Tue Apr 28 09:42:18 2009
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="vector_int_tests"
+ ProjectGUID="{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}"
+ RootNamespace="vector_int_tests"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;..\..\src\spandsp;..\..\src;..\..\src\msvc;..;..\..\..\tiff-3.8.2\libtiff"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\..\src\Debug\spandsp.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="..\src\Debug\spandsp.lib"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\msvc\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\vector_int_tests.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/libs/spandsp/tests/t38_core_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_core_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_core_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_core_tests.c,v 1.14 2008/11/30 13:44:35 steveu Exp $
+ * $Id: t38_core_tests.c,v 1.15 2009/04/25 14:17:47 steveu Exp $
*/
/*! \file */
@@ -42,16 +42,6 @@
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <audiofile.h>
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_gateway_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_gateway_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_gateway_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_gateway_tests.c,v 1.80 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t38_gateway_tests.c,v 1.81 2009/04/25 14:27:18 steveu Exp $
*/
/*! \file */
@@ -48,20 +48,13 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
#include <audiofile.h>
+#if !defined(_WIN32)
+#include <unistd.h>
+#endif
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_gateway_to_terminal_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_gateway_to_terminal_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_gateway_to_terminal_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_gateway_to_terminal_tests.c,v 1.64 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t38_gateway_to_terminal_tests.c,v 1.65 2009/04/25 14:27:18 steveu Exp $
*/
/*! \file */
@@ -48,20 +48,13 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
#include <audiofile.h>
+#if !defined(_WIN32)
+#include <unistd.h>
+#endif
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_non_ecm_buffer_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_non_ecm_buffer_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_non_ecm_buffer_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_non_ecm_buffer_tests.c,v 1.4 2008/11/30 13:44:35 steveu Exp $
+ * $Id: t38_non_ecm_buffer_tests.c,v 1.5 2009/04/25 14:17:47 steveu Exp $
*/
/*! \file */
@@ -40,20 +40,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <audiofile.h>
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_terminal_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_terminal_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_terminal_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_terminal_tests.c,v 1.65 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t38_terminal_tests.c,v 1.67 2009/04/25 14:34:45 steveu Exp $
*/
/*! \file */
@@ -34,7 +34,6 @@
T.38 termination <-> T.38 termination
*/
-/* Enable the following definition to enable direct probing into the FAX structures */
//#define WITH_SPANDSP_INTERNALS
#if defined(HAVE_CONFIG_H)
@@ -48,20 +47,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
+#if !defined(_WIN32)
+#include <unistd.h>
#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#include <audiofile.h>
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/t38_terminal_to_gateway_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t38_terminal_to_gateway_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t38_terminal_to_gateway_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_terminal_to_gateway_tests.c,v 1.63 2009/02/20 12:34:20 steveu Exp $
+ * $Id: t38_terminal_to_gateway_tests.c,v 1.64 2009/04/25 14:27:19 steveu Exp $
*/
/*! \file */
@@ -48,20 +48,13 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#if !defined(__USE_MISC)
-#define __USE_MISC
-#endif
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <sys/time.h>
#include <audiofile.h>
+#if !defined(_WIN32)
+#include <unistd.h>
+#endif
//#if defined(WITH_SPANDSP_INTERNALS)
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
Modified: freeswitch/trunk/libs/spandsp/tests/v17_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v17_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v17_tests.c Tue Apr 28 09:42:18 2009
@@ -23,7 +23,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17_tests.c,v 1.101 2009/03/15 09:09:21 steveu Exp $
+ * $Id: v17_tests.c,v 1.102 2009/04/25 16:30:52 steveu Exp $
*/
/*! \page v17_tests_page V.17 modem tests
@@ -483,6 +483,14 @@
if (use_gui)
qam_wait_to_end(qam_monitor);
#endif
+ if (decode_test_file)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
if (log_audio)
{
if (afCloseFile(outhandle))
Modified: freeswitch/trunk/libs/spandsp/tests/v22bis_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v22bis_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v22bis_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_tests.c,v 1.58 2009/04/17 14:37:53 steveu Exp $
+ * $Id: v22bis_tests.c,v 1.61 2009/04/25 16:30:52 steveu Exp $
*/
/*! \page v22bis_tests_page V.22bis modem tests
@@ -62,13 +62,13 @@
#define BLOCK_LEN 160
-#define IN_FILE_NAME "v22bis_samp.wav"
#define OUT_FILE_NAME "v22bis.wav"
-int rx_bits = 0;
-
+char *decode_test_file = NULL;
int use_gui = FALSE;
+int rx_bits = 0;
+
both_ways_line_model_state_t *model;
typedef struct
@@ -115,6 +115,7 @@
endpoint_t *s;
int i;
int len;
+ int bit_rate;
complexf_t *coeffs;
s = (endpoint_t *) user_data;
@@ -125,7 +126,9 @@
switch (bit)
{
case SIG_STATUS_TRAINING_SUCCEEDED:
- len = v22bis_equalizer_state(s->v22bis, &coeffs);
+ bit_rate = v22bis_current_bit_rate(s->v22bis);
+ printf("Negotiated bit rate: %d\n", bit_rate);
+ len = v22bis_rx_equalizer_state(s->v22bis, &coeffs);
printf("Equalizer:\n");
for (i = 0; i < len; i++)
printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
@@ -134,8 +137,10 @@
return;
}
- //printf("Rx bit %p - %d\n", user_data, bit);
- bert_put_bit(&s->bert_rx, bit);
+ if (decode_test_file)
+ printf("Rx bit %p-%d - %d\n", user_data, rx_bits++, bit);
+ else
+ bert_put_bit(&s->bert_rx, bit);
}
/*- End of function --------------------------------------------------------*/
@@ -166,7 +171,7 @@
{
qam_monitor_update_constel(s->qam_monitor, constel);
qam_monitor_update_carrier_tracking(s->qam_monitor, v22bis_rx_carrier_frequency(s->v22bis));
- qam_monitor_update_symbol_tracking(s->qam_monitor, v22bis_symbol_timing_correction(s->v22bis));
+ qam_monitor_update_symbol_tracking(s->qam_monitor, v22bis_rx_symbol_timing_correction(s->v22bis));
}
#endif
fpower = (constel->re - target->re)*(constel->re - target->re)
@@ -188,7 +193,7 @@
else
{
printf("Gardner step %d\n", symbol);
- len = v22bis_equalizer_state(s->v22bis, &coeffs);
+ len = v22bis_rx_equalizer_state(s->v22bis, &coeffs);
printf("Equalizer A:\n");
for (i = 0; i < len; i++)
printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
@@ -205,9 +210,11 @@
int16_t amp[2][BLOCK_LEN];
int16_t model_amp[2][BLOCK_LEN];
int16_t out_amp[2*BLOCK_LEN];
+ AFfilehandle inhandle;
AFfilehandle outhandle;
int outframes;
int samples;
+ int samples2;
int i;
int j;
int test_bps;
@@ -222,11 +229,12 @@
channel_codec = MUNGE_CODEC_NONE;
test_bps = 2400;
line_model_no = 0;
+ decode_test_file = NULL;
noise_level = -70;
signal_level = -13;
bits_per_test = 50000;
log_audio = FALSE;
- while ((opt = getopt(argc, argv, "b:B:c:glm:n:s:")) != -1)
+ while ((opt = getopt(argc, argv, "b:B:c:d:glm:n:s:")) != -1)
{
switch (opt)
{
@@ -244,6 +252,9 @@
case 'c':
channel_codec = atoi(optarg);
break;
+ case 'd':
+ decode_test_file = optarg;
+ break;
case 'g':
#if defined(ENABLE_GUI)
use_gui = TRUE;
@@ -270,6 +281,17 @@
break;
}
}
+ inhandle = AF_NULL_FILEHANDLE;
+ if (decode_test_file)
+ {
+ /* We will decode the audio from a wave file. */
+ if ((inhandle = afOpenFile_telephony_read(decode_test_file, 1)) == AF_NULL_FILEHANDLE)
+ {
+ fprintf(stderr, " Cannot open wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
+
outhandle = AF_NULL_FILEHANDLE;
if (log_audio)
{
@@ -283,11 +305,11 @@
for (i = 0; i < 2; i++)
{
- endpoint[i].v22bis = v22bis_init(NULL, test_bps, V22BIS_GUARD_TONE_1800HZ, (i == 0), v22bis_getbit, v22bis_putbit, &endpoint[i]);
+ endpoint[i].v22bis = v22bis_init(NULL, test_bps, V22BIS_GUARD_TONE_1800HZ, (i == 0), v22bis_getbit, &endpoint[i], v22bis_putbit, &endpoint[i]);
v22bis_tx_power(endpoint[i].v22bis, signal_level);
/* Move the carrier off a bit */
endpoint[i].v22bis->tx.carrier_phase_rate = dds_phase_ratef((i == 0) ? 1207.0f : 2407.0f);
- v22bis_set_qam_report_handler(endpoint[i].v22bis, qam_report, (void *) &endpoint[i]);
+ v22bis_rx_set_qam_report_handler(endpoint[i].v22bis, qam_report, (void *) &endpoint[i]);
span_log_set_level(&endpoint[i].v22bis->logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_SHOW_TAG | SPAN_LOG_SHOW_SAMPLE_TIME | SPAN_LOG_FLOW);
span_log_set_tag(&endpoint[i].v22bis->logging, (i == 0) ? "caller" : "answerer");
endpoint[i].smooth_power = 0.0f;
@@ -334,7 +356,7 @@
}
}
-#if 0
+#if 1
both_ways_line_model(model,
model_amp[0],
amp[0],
@@ -345,6 +367,15 @@
vec_copyi16(model_amp[0], amp[0], samples);
vec_copyi16(model_amp[1], amp[1], samples);
#endif
+ if (decode_test_file)
+ {
+ samples2 = afReadFrames(inhandle,
+ AF_DEFAULT_TRACK,
+ model_amp[0],
+ samples);
+ if (samples2 != samples)
+ break;
+ }
for (i = 0; i < 2; i++)
{
span_log_bump_samples(&endpoint[i].v22bis->logging, samples);
@@ -368,6 +399,18 @@
}
}
}
+#if defined(ENABLE_GUI)
+ if (use_gui)
+ qam_wait_to_end(endpoint[0].qam_monitor);
+#endif
+ if (decode_test_file)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
if (log_audio)
{
if (afCloseFile(outhandle) != 0)
Modified: freeswitch/trunk/libs/spandsp/tests/v27ter_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v27ter_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v27ter_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_tests.c,v 1.103 2009/03/15 09:09:21 steveu Exp $
+ * $Id: v27ter_tests.c,v 1.104 2009/04/25 16:30:52 steveu Exp $
*/
/*! \page v27ter_tests_page V.27ter modem tests
@@ -471,6 +471,14 @@
if (use_gui)
qam_wait_to_end(qam_monitor);
#endif
+ if (decode_test_file)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
if (log_audio)
{
if (afCloseFile(outhandle))
Modified: freeswitch/trunk/libs/spandsp/tests/v29_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v29_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v29_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29_tests.c,v 1.117 2009/03/15 09:09:21 steveu Exp $
+ * $Id: v29_tests.c,v 1.118 2009/04/25 16:30:52 steveu Exp $
*/
/*! \page v29_tests_page V.29 modem tests
@@ -500,6 +500,14 @@
if (use_gui)
qam_wait_to_end(qam_monitor);
#endif
+ if (decode_test_file)
+ {
+ if (afCloseFile(inhandle))
+ {
+ fprintf(stderr, " Cannot close wave file '%s'\n", decode_test_file);
+ exit(2);
+ }
+ }
if (log_audio)
{
if (afCloseFile(outhandle))
Modified: freeswitch/trunk/libs/spandsp/tests/v8_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/v8_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/v8_tests.c Tue Apr 28 09:42:18 2009
@@ -22,14 +22,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v8_tests.c,v 1.31 2008/11/30 10:17:31 steveu Exp $
+ * $Id: v8_tests.c,v 1.32 2009/04/24 22:35:25 steveu Exp $
*/
/*! \page v8_tests_page V.8 tests
\section v8_tests_page_sec_1 What does it do?
*/
-/* Enable the following definition to enable direct probing into the FAX structures */
+/* Enable the following definition to enable direct probing into the internal structures */
//#define WITH_SPANDSP_INTERNALS
#if defined(HAVE_CONFIG_H)
Modified: freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/vector_float_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_float_tests.c,v 1.12 2008/10/09 13:25:19 steveu Exp $
+ * $Id: vector_float_tests.c,v 1.13 2009/04/26 07:00:39 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
-#include <audiofile.h>
#include "spandsp.h"
Modified: freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/vector_int_tests.c Tue Apr 28 09:42:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_int_tests.c,v 1.10 2008/09/18 12:05:35 steveu Exp $
+ * $Id: vector_int_tests.c,v 1.11 2009/04/26 07:00:39 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
-#include <audiofile.h>
#include "spandsp.h"
1
0
Author: anthm
Date: Tue Apr 28 09:13:05 2009
New Revision: 13176
Log:
FSCORE-357
Modified:
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/switch_core_session.c
freeswitch/trunk/src/switch_core_state_machine.c
freeswitch/trunk/src/switch_ivr_bridge.c
freeswitch/trunk/src/switch_ivr_originate.c
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Tue Apr 28 09:13:05 2009
@@ -579,6 +579,7 @@
#define switch_core_session_destroy(session) switch_core_session_perform_destroy(session, __FILE__, __SWITCH_FUNC__, __LINE__)
SWITCH_DECLARE(void) switch_core_session_destroy_state(switch_core_session_t *session);
+SWITCH_DECLARE(void) switch_core_session_reporting_state(switch_core_session_t *session);
/*!
\brief Provide the total number of sessions
@@ -652,6 +653,13 @@
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(_In_z_ const char *uuid_str);
#endif
+
+#ifdef SWITCH_DEBUG_RWLOCKS
+#define switch_core_session_locate(uuid_str) switch_core_session_perform_force_locate(uuid_str, __FILE__, __SWITCH_FUNC__, __LINE__)
+#else
+SWITCH_DECLARE(switch_core_session_t *) switch_core_session_force_locate(_In_z_ const char *uuid_str);
+#endif
+
/*!
\brief Retrieve a global variable from the core
\param varname the name of the variable
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Tue Apr 28 09:13:05 2009
@@ -884,6 +884,7 @@
CF_DIVERT_EVENTS,
CF_BLOCK_STATE,
CF_FS_RTP,
+ CF_REPORTING,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
CF_FLAG_MAX
} switch_channel_flag_t;
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Tue Apr 28 09:13:05 2009
@@ -75,13 +75,58 @@
return session;
}
+
+
+
+#ifdef SWITCH_DEBUG_RWLOCKS
+SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_force_locate(const char *uuid_str, const char *file, const char *func, int line)
+#else
+SWITCH_DECLARE(switch_core_session_t *) switch_core_session_force_locate(const char *uuid_str)
+#endif
+{
+ switch_core_session_t *session = NULL;
+ switch_status_t status;
+
+ if (uuid_str) {
+ switch_mutex_lock(runtime.session_hash_mutex);
+ if ((session = switch_core_hash_find(session_manager.session_table, uuid_str))) {
+ /* Acquire a read lock on the session */
+
+ if (switch_test_flag(session, SSF_DESTROYED)) {
+ status = SWITCH_STATUS_FALSE;
+#ifdef SWITCH_DEBUG_RWLOCKS
+ switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "%s Read lock FAIL\n",
+ switch_channel_get_name(session->channel));
+#endif
+ } else {
+ status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
+#ifdef SWITCH_DEBUG_RWLOCKS
+ switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "%s Read lock ACQUIRED\n",
+ switch_channel_get_name(session->channel));
+#endif
+ }
+
+ if (status != SWITCH_STATUS_SUCCESS) {
+ /* not available, forget it */
+ session = NULL;
+ }
+ }
+ switch_mutex_unlock(runtime.session_hash_mutex);
+ }
+
+ /* if its not NULL, now it's up to you to rwunlock this */
+ return session;
+}
+
+
SWITCH_DECLARE(switch_status_t) switch_core_session_get_partner(switch_core_session_t *session, switch_core_session_t **partner)
{
const char *uuid;
if ((uuid = switch_channel_get_variable(session->channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
- *partner = switch_core_session_locate(uuid);
- return SWITCH_STATUS_SUCCESS;
+ if ((*partner = switch_core_session_locate(uuid))) {
+ return SWITCH_STATUS_SUCCESS;
+ }
}
*partner = NULL;
Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c (original)
+++ freeswitch/trunk/src/switch_core_state_machine.c Tue Apr 28 09:13:05 2009
@@ -406,24 +406,7 @@
goto done;
case CS_REPORTING: /* Call Detail */
{
- const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
-
- if (!switch_strlen_zero(var)) {
- if (!strcasecmp(var, "a_only")) {
- if (switch_channel_get_originator_caller_profile(session->channel)) {
- do_extra_handlers = 0;
- }
- } else if (!strcasecmp(var, "b_only")) {
- if (switch_channel_get_originatee_caller_profile(session->channel)) {
- do_extra_handlers = 0;
- }
- } else if (!switch_true(var)) {
- do_extra_handlers = 0;
- }
- }
-
- STATE_MACRO(reporting, "REPORTING");
-
+ switch_core_session_reporting_state(session);
switch_channel_set_state(session->channel, CS_DESTROY);
}
goto done;
@@ -578,6 +561,56 @@
return;
}
+
+SWITCH_DECLARE(void) switch_core_session_reporting_state(switch_core_session_t *session)
+{
+ switch_channel_state_t state = switch_channel_get_state(session->channel), midstate = state;
+ const switch_endpoint_interface_t *endpoint_interface;
+ const switch_state_handler_table_t *driver_state_handler = NULL;
+ const switch_state_handler_table_t *application_state_handler = NULL;
+ int proceed = 1;
+ int global_proceed = 1;
+ int do_extra_handlers = 1;
+ int silly = 0;
+ int index = 0;
+
+ if (switch_channel_test_flag(session->channel, CF_REPORTING)) {
+ return;
+ }
+
+ switch_channel_set_flag(session->channel, CF_REPORTING);
+
+ switch_assert(session != NULL);
+
+ session->thread_running = 1;
+ endpoint_interface = session->endpoint_interface;
+ switch_assert(endpoint_interface != NULL);
+
+ driver_state_handler = endpoint_interface->state_handler;
+ switch_assert(driver_state_handler != NULL);
+
+
+ const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
+
+ if (!switch_strlen_zero(var)) {
+ if (!strcasecmp(var, "a_only")) {
+ if (switch_channel_get_originator_caller_profile(session->channel)) {
+ do_extra_handlers = 0;
+ }
+ } else if (!strcasecmp(var, "b_only")) {
+ if (switch_channel_get_originatee_caller_profile(session->channel)) {
+ do_extra_handlers = 0;
+ }
+ } else if (!switch_true(var)) {
+ do_extra_handlers = 0;
+ }
+ }
+
+ STATE_MACRO(reporting, "REPORTING");
+
+ return;
+}
+
/* For Emacs:
* Local Variables:
* mode:c
Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c (original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c Tue Apr 28 09:13:05 2009
@@ -503,32 +503,9 @@
if (!switch_channel_test_flag(channel, CF_TRANSFER) && !switch_channel_test_flag(channel, CF_REDIRECT) && bd && !bd->clean_exit
&& state != CS_PARK && state != CS_ROUTING && !switch_channel_test_flag(channel, CF_INNER_BRIDGE)) {
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
- }
- }
-
-
- if (switch_true(switch_channel_get_variable(channel, SWITCH_COPY_XML_CDR_VARIABLE))) {
- switch_core_session_t *other_session;
- switch_channel_t *other_channel;
- switch_xml_t cdr;
- char *xml_text;
-
- if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) {
- other_channel = switch_core_session_get_channel(other_session);
-
- switch_channel_wait_for_state(channel, other_channel, CS_REPORTING);
-
- if (switch_ivr_generate_xml_cdr(session, &cdr) == SWITCH_STATUS_SUCCESS) {
- if ((xml_text = switch_xml_toxml(cdr, SWITCH_FALSE))) {
- switch_channel_set_variable(other_channel, "b_leg_cdr", xml_text);
- switch_safe_free(xml_text);
- }
- switch_xml_free(cdr);
- }
- switch_core_session_rwunlock(other_session);
}
}
-
+
if (switch_channel_get_state(channel) == CS_EXCHANGE_MEDIA) {
switch_channel_set_state(channel, CS_RESET);
}
@@ -979,6 +956,21 @@
switch_channel_set_variable(caller_channel, SWITCH_BRIDGE_HANGUP_CAUSE_VARIABLE, switch_channel_cause2str(cause));
}
+ if (switch_channel_down(peer_channel) && switch_true(switch_channel_get_variable(peer_channel, SWITCH_COPY_XML_CDR_VARIABLE))) {
+ switch_xml_t cdr;
+ char *xml_text;
+
+ switch_channel_wait_for_state(caller_channel, peer_channel, CS_DESTROY);
+
+ if (switch_ivr_generate_xml_cdr(peer_session, &cdr) == SWITCH_STATUS_SUCCESS) {
+ if ((xml_text = switch_xml_toxml(cdr, SWITCH_FALSE))) {
+ switch_channel_set_variable(caller_channel, "b_leg_cdr", xml_text);
+ switch_safe_free(xml_text);
+ }
+ switch_xml_free(cdr);
+ }
+ }
+
switch_core_session_rwunlock(peer_session);
} else {
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Tue Apr 28 09:13:05 2009
@@ -2045,6 +2045,8 @@
continue;
}
+ switch_channel_wait_for_state(caller_channel, switch_core_session_get_channel(originate_status[i].peer_session), CS_DESTROY);
+
if (switch_ivr_generate_xml_cdr(originate_status[i].peer_session, &cdr) == SWITCH_STATUS_SUCCESS) {
if ((xml_text = switch_xml_toxml(cdr, SWITCH_FALSE))) {
switch_snprintf(buf, sizeof(buf), "%s_%d", cdr_var, ++cdr_total);
1
0
Author: anthm
Date: Tue Apr 28 07:39:36 2009
New Revision: 13175
Log:
revert
Modified:
freeswitch/trunk/libs/apr/build/config.sub
Modified: freeswitch/trunk/libs/apr/build/config.sub
==============================================================================
--- freeswitch/trunk/libs/apr/build/config.sub (original)
+++ freeswitch/trunk/libs/apr/build/config.sub Tue Apr 28 07:39:36 2009
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-12-11'
+timestamp='2006-07-02'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -240,7 +241,7 @@
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -248,7 +249,8 @@
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -268,16 +270,17 @@
| mn10200 | mn10300 \
| mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
@@ -285,9 +288,6 @@
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -317,7 +317,7 @@
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -328,7 +328,7 @@
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -350,17 +350,18 @@
| mmix-* \
| mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -371,8 +372,6 @@
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -818,6 +817,12 @@
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -1120,7 +1125,7 @@
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1193,7 +1198,8 @@
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
@@ -1208,7 +1214,7 @@
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos*)
+ | -skyos* | -haiku* | -rdos* | -toppers*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1360,6 +1366,9 @@
# system, and we'll never get to this point.
case $basic_machine in
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1369,9 +1378,9 @@
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
1
0
[commit] r13174 - in freeswitch/trunk: libs/apr/build src src/mod/endpoints/mod_loopback
by FreeSWITCH SVN 28 Apr '09
by FreeSWITCH SVN 28 Apr '09
28 Apr '09
Author: anthm
Date: Mon Apr 27 22:58:37 2009
New Revision: 13174
Log:
MODENDP-215
Modified:
freeswitch/trunk/libs/apr/build/config.sub
freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c
freeswitch/trunk/src/switch_time.c
Modified: freeswitch/trunk/libs/apr/build/config.sub
==============================================================================
--- freeswitch/trunk/libs/apr/build/config.sub (original)
+++ freeswitch/trunk/libs/apr/build/config.sub Mon Apr 27 22:58:37 2009
@@ -1,10 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-timestamp='2006-07-02'
+timestamp='2005-12-11'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -241,7 +240,7 @@
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -249,8 +248,7 @@
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -270,17 +268,16 @@
| mn10200 | mn10300 \
| mt \
| msp430 \
- | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
@@ -288,6 +285,9 @@
| z8k)
basic_machine=$basic_machine-unknown
;;
+ m32c)
+ basic_machine=$basic_machine-unknown
+ ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -317,7 +317,7 @@
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
+ | avr-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -328,7 +328,7 @@
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32c-* | m32r-* | m32rle-* \
+ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -350,18 +350,17 @@
| mmix-* \
| mt-* \
| msp430-* \
- | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -372,6 +371,8 @@
| ymp-* \
| z8k-*)
;;
+ m32c-*)
+ ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -817,12 +818,6 @@
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -1125,7 +1120,7 @@
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1198,8 +1193,7 @@
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
@@ -1214,7 +1208,7 @@
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers*)
+ | -skyos* | -haiku* | -rdos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1366,9 +1360,6 @@
# system, and we'll never get to this point.
case $basic_machine in
- spu-*)
- os=-elf
- ;;
*-acorn)
os=-riscix1.2
;;
@@ -1378,9 +1369,9 @@
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
Modified: freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c Mon Apr 27 22:58:37 2009
@@ -745,6 +745,9 @@
switch_frame_t *frame = (switch_frame_t *) pop;
switch_frame_free(&frame);
}
+
+ switch_core_timer_sync(&tech_pvt->timer);
+
}
break;
default:
Modified: freeswitch/trunk/src/switch_time.c
==============================================================================
--- freeswitch/trunk/src/switch_time.c (original)
+++ freeswitch/trunk/src/switch_time.c Mon Apr 27 22:58:37 2009
@@ -327,7 +327,7 @@
int delta = (int)(private_info->reference - TIMER_MATRIX[timer->interval].tick);
/* sync up timer if it's not been called for a while otherwise it will return instantly several times until it catches up */
- if (delta < 0) {
+ if (delta < -1) {
private_info->reference = timer->tick = TIMER_MATRIX[timer->interval].tick;
}
timer_step(timer);
1
0