aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2022-12-15 09:52:52 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2022-12-16 12:43:14 +0100
commit3d18361d2ef5d52dbf28c528e5ca56c5d9eebb2b (patch)
tree857489ec5f89bf8bce71be527bd05559d28ebb88
parent5acdb94f10f677ecbced3bd3a55fa7449fd17306 (diff)
Removed obsolete hexdump function from DTMF decoder
-rw-r--r--src/libdtmf/dtmf_decode.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/libdtmf/dtmf_decode.c b/src/libdtmf/dtmf_decode.c
index 7e104bd..8270ae3 100644
--- a/src/libdtmf/dtmf_decode.c
+++ b/src/libdtmf/dtmf_decode.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <math.h>
#include "../libsample/sample.h"
+#include "../libdebug/debug.h"
#include "dtmf_decode.h"
//#define DEBUG
@@ -40,22 +41,6 @@
static const char dtmf_digit[] = " 123A456B789C*0#D";
-#ifdef DEBUG
-const char *_debug_amplitude(double level)
-{
- static char text[42];
-
- strcpy(text, " : ");
- if (level > 1.0)
- level = 1.0;
- if (level < -1.0)
- level = -1.0;
- text[20 + (int)(level * 20)] = '*';
-
- return text;
-}
-#endif
-
int dtmf_decode_init(dtmf_dec_t *dtmf, void *priv, void (*recv_digit)(void *priv, char digit, dtmf_meas_t *meas), int samplerate, double max_amplitude, double min_amplitude)
{
int rc;
@@ -149,7 +134,7 @@ void dtmf_decode(dtmf_dec_t *dtmf, sample_t *samples, int length)
for (i = 0; i < length; i++) {
#ifdef DEBUG
-// printf("%s %.5f\n", _debug_amplitude(samples[i]/2.0), samples[i]/2.0);
+// printf("%s %.5f\n", debug_amplitude(samples[i]/2.0), samples[i]/2.0);
#endif
/* get frequency of low frequencies, correct amplitude drop at cutoff point */
f1 = frequency_low[i] + (DTMF_LOW_1 + DTMF_LOW_4) / 2.0;