~ubuntu-branches/ubuntu/trusty/iaxmodem/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/spandsp/src/v29rx.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien BLACHE
  • Date: 2007-02-24 12:38:11 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070224123811-k7g072s1ww76qekl
Tags: 0.2.1~dfsg-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 * along with this program; if not, write to the Free Software
23
23
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
24
 *
25
 
 * $Id: v29rx.c,v 1.98 2006/10/24 13:45:27 steveu Exp $
 
25
 * $Id: v29rx.c,v 1.100 2006/11/28 16:59:57 steveu Exp $
26
26
 */
27
27
 
28
28
/*! \file */
35
35
#include <string.h>
36
36
#include <stdio.h>
37
37
#include <stdlib.h>
 
38
#if defined(HAVE_TGMATH_H)
 
39
#include <tgmath.h>
 
40
#endif
 
41
#if defined(HAVE_MATH_H)
38
42
#include <math.h>
 
43
#endif
39
44
 
40
45
#include "spandsp/telephony.h"
41
46
#include "spandsp/logging.h"
1541
1546
void v29_rx_signal_cutoff(v29_rx_state_t *s, float cutoff)
1542
1547
{
1543
1548
    /* The 0.4 factor allows for the gain of the DC blocker */
1544
 
    s->carrier_on_power = power_meter_level_dbm0(cutoff + 2.5f)*0.4f;
1545
 
    s->carrier_off_power = power_meter_level_dbm0(cutoff - 2.5f)*0.4f;
 
1549
    s->carrier_on_power = (int32_t) (power_meter_level_dbm0(cutoff + 2.5f)*0.4f);
 
1550
    s->carrier_off_power = (int32_t) (power_meter_level_dbm0(cutoff - 2.5f)*0.4f);
1546
1551
}
1547
1552
/*- End of function --------------------------------------------------------*/
1548
1553