mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
update spandsp to use newest snapshot http://www.soft-switch.org/downloads/snapshots/spandsp/spandsp-20080910.tar.gz
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9493 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -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: modem_monitor.cpp,v 1.15 2008/05/27 15:08:21 steveu Exp $
|
||||
* $Id: modem_monitor.cpp,v 1.17 2008/09/04 14:40:05 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -54,6 +54,8 @@
|
||||
#define SYMBOL_TRACKER_POINTS 12000
|
||||
#define CARRIER_TRACKER_POINTS 12000
|
||||
|
||||
#define FP_FACTOR 4096
|
||||
|
||||
struct qam_monitor_s
|
||||
{
|
||||
Fl_Double_Window *w;
|
||||
@@ -165,9 +167,9 @@ int qam_monitor_update_equalizer(qam_monitor_t *s, const complexf_t *coeffs, int
|
||||
break;
|
||||
if (isnan(coeffs[i].im) || isinf(coeffs[i].im))
|
||||
break;
|
||||
if (coeffs[i].re < -20.0 || coeffs[i].re > 20.0)
|
||||
if (coeffs[i].re < -20.0f || coeffs[i].re > 20.0f)
|
||||
break;
|
||||
if (coeffs[i].im < -20.0 || coeffs[i].im > 20.0)
|
||||
if (coeffs[i].im < -20.0f || coeffs[i].im > 20.0f)
|
||||
break;
|
||||
}
|
||||
if (i != len)
|
||||
@@ -214,6 +216,55 @@ int qam_monitor_update_equalizer(qam_monitor_t *s, const complexf_t *coeffs, int
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int qam_monitor_update_int_equalizer(qam_monitor_t *s, const complexi16_t *coeffs, int len)
|
||||
{
|
||||
int i;
|
||||
float min;
|
||||
float max;
|
||||
|
||||
if (s->eq_re)
|
||||
delete s->eq_re;
|
||||
if (s->eq_im)
|
||||
delete s->eq_im;
|
||||
|
||||
s->canvas_eq->current(s->canvas_eq);
|
||||
i = 0;
|
||||
min = coeffs[i].re;
|
||||
if (min > coeffs[i].im)
|
||||
min = coeffs[i].im;
|
||||
max = coeffs[i].re;
|
||||
if (max < coeffs[i].im)
|
||||
max = coeffs[i].im;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
s->eq_re_plot[2*i] = (i - len/2)/2.0f;
|
||||
s->eq_re_plot[2*i + 1] = coeffs[i].re/(float) FP_FACTOR;
|
||||
if (min > coeffs[i].re)
|
||||
min = coeffs[i].re;
|
||||
if (max < coeffs[i].re)
|
||||
max = coeffs[i].re;
|
||||
|
||||
s->eq_im_plot[2*i] = (i - len/2)/2.0f;
|
||||
s->eq_im_plot[2*i + 1] = coeffs[i].im/(float) FP_FACTOR;
|
||||
if (min > coeffs[i].im)
|
||||
min = coeffs[i].im;
|
||||
if (max < coeffs[i].im)
|
||||
max = coeffs[i].im;
|
||||
}
|
||||
min /= (float) FP_FACTOR;
|
||||
max /= (float) FP_FACTOR;
|
||||
|
||||
s->eq_x->minimum(-len/4.0);
|
||||
s->eq_x->maximum(len/4.0);
|
||||
s->eq_y->maximum((max == min) ? max + 0.2 : max);
|
||||
s->eq_y->minimum(min);
|
||||
s->eq_re = new Ca_Line(len, s->eq_re_plot, 0, 0, FL_BLUE, CA_NO_POINT);
|
||||
s->eq_im = new Ca_Line(len, s->eq_im_plot, 0, 0, FL_RED, CA_NO_POINT);
|
||||
Fl::check();
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int qam_monitor_update_symbol_tracking(qam_monitor_t *s, float total_correction)
|
||||
{
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user