From 9a0e8c6a1f0703e80f1ff869f5910e61506118f2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 6 Jun 2007 23:27:21 +0000 Subject: [PATCH] update git-svn-id: http://svn.openzap.org/svn/openzap/trunk@225 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/include/libteletone.h | 9 ++------- libs/openzap/src/include/libteletone_generate.h | 4 ++-- libs/openzap/src/libteletone_generate.c | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/libs/openzap/src/include/libteletone.h b/libs/openzap/src/include/libteletone.h index 351afa1413..aaf7b0ed47 100644 --- a/libs/openzap/src/include/libteletone.h +++ b/libs/openzap/src/include/libteletone.h @@ -73,11 +73,7 @@ #ifdef __cplusplus extern "C" { -#ifdef _doh -} #endif -#endif - #define TELETONE_MAX_DTMF_DIGITS 128 #define TELETONE_MAX_TONES 6 #define TELETONE_TONE_RANGE 127 @@ -85,9 +81,9 @@ extern "C" { typedef double teletone_process_t; /*! \file libteletone.h - \brief Top level include file + \brief Top level include file - This file should be included by applications using the library + This file should be included by applications using the library */ /*! \brief An abstraction to store a tone mapping */ @@ -96,7 +92,6 @@ typedef struct { teletone_process_t freqs[TELETONE_MAX_TONES]; } teletone_tone_map_t; - #if !defined(M_PI) /* C99 systems may not define M_PI */ #define M_PI 3.14159265358979323846264338327 diff --git a/libs/openzap/src/include/libteletone_generate.h b/libs/openzap/src/include/libteletone_generate.h index 0ed8930539..be791555bd 100644 --- a/libs/openzap/src/include/libteletone_generate.h +++ b/libs/openzap/src/include/libteletone_generate.h @@ -112,7 +112,7 @@ struct teletone_dds_state { uint32_t scale_factor; uint32_t phase_accumulator; int16_t sample; - int32_t tx_level; + float tx_level; }; typedef struct teletone_dds_state teletone_dds_state_t; @@ -123,7 +123,7 @@ typedef struct teletone_dds_state teletone_dds_state_t; /* 3.02 represents twice the power */ #define DBM0_MAX_POWER (3.14f + 3.02f) -const int16_t TELETONE_SINES[SINE_TABLE_MAX]; +extern int16_t TELETONE_SINES[SINE_TABLE_MAX]; static __inline__ int16_t teletone_dds_modulate_sample(teletone_dds_state_t *dds) { diff --git a/libs/openzap/src/libteletone_generate.c b/libs/openzap/src/libteletone_generate.c index 9a36e6280c..edd573c7a1 100644 --- a/libs/openzap/src/libteletone_generate.c +++ b/libs/openzap/src/libteletone_generate.c @@ -79,7 +79,7 @@ #pragma warning(disable:4706) #endif -const int16_t TELETONE_SINES[SINE_TABLE_MAX] = { +int16_t TELETONE_SINES[SINE_TABLE_MAX] = { 0x00c9, 0x025b, 0x03ed, 0x057f, 0x0711, 0x08a2, 0x0a33, 0x0bc4, 0x0d54, 0x0ee4, 0x1073, 0x1201, 0x138f, 0x151c, 0x16a8, 0x1833, 0x19be, 0x1b47, 0x1cd0, 0x1e57, 0x1fdd, 0x2162, 0x22e5, 0x2467,