update to spandsp snapshot 20091005

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15084 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-10-05 14:34:26 +00:00
parent 4e440b6e4c
commit dab4d9068d
46 changed files with 1316 additions and 505 deletions

View File

@@ -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: make_line_models.c,v 1.9 2009/02/10 17:49:20 steveu Exp $
* $Id: make_line_models.c,v 1.10 2009/09/23 16:02:59 steveu Exp $
*/
/*! \page make_line_models_page Telephony line model construction
@@ -849,7 +849,8 @@ static void generate_ad_edd(void)
offset = (f - edd[l - 1].freq)/(edd[l].freq - edd[l - 1].freq);
delay = (1.0f - offset)*edd[l - 1].edd[k] + offset*edd[l].edd[k];
}
phase = 2.0f*M_PI*f*delay*0.001f;
//phase = 2.0f*M_PI*f*delay*0.001f;
phase = 0.0f;
#if defined(HAVE_FFTW3_H)
in[i][0] = amp*cosf(phase);
in[i][1] = amp*sinf(phase);
@@ -874,7 +875,7 @@ static void generate_ad_edd(void)
fprintf(outfile, "/* V.56bis AD-%d, EDD%d */\n", (j == 0) ? 1 : j + 4, k + 1);
fprintf(outfile, "float ad_%d_edd_%d_model[] =\n", (j == 0) ? 1 : j + 4, k + 1);
fprintf(outfile, "const float ad_%d_edd_%d_model[] =\n", (j == 0) ? 1 : j + 4, k + 1);
fprintf(outfile, "{\n");
/* Normalise the filter's gain */
pw = 0.0f;
@@ -955,7 +956,8 @@ static void generate_proakis(void)
/* Linear interpolation */
amp = ((1.0f - offset)*proakis[index].amp + offset*proakis[index + 1].amp)/2.3f;
delay = (1.0f - offset)*proakis[index].delay + offset*proakis[index + 1].delay;
phase = 2.0f*M_PI*f*delay*0.001f;
//phase = 2.0f*M_PI*f*delay*0.001f;
phase = 0.0f;
#if defined(HAVE_FFTW3_H)
in[i][0] = amp*cosf(phase);
in[i][1] = amp*sinf(phase);
@@ -978,7 +980,7 @@ static void generate_proakis(void)
fprintf(outfile, "/* Medium range telephone line response\n");
fprintf(outfile, " (from p 537, Digital Communication, John G. Proakis */\n");
fprintf(outfile, "float proakis_line_model[] =\n");
fprintf(outfile, "const float proakis_line_model[] =\n");
fprintf(outfile, "{\n");
/* Normalise the filter's gain */
pw = 0.0f;