aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-04-14 21:48:14 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-04-14 21:48:14 +0200
commit882e3bb1c298343daf66f705bd4036c98c4f4b9f (patch)
treec90e59420d7d4daa639333ae32de336b631fd924 /src
parentb78a68e23216dd4f3c08f8101ba13ad713452206 (diff)
downloadglutte-o-matic-882e3bb1c298343daf66f705bd4036c98c4f4b9f.tar.gz
glutte-o-matic-882e3bb1c298343daf66f705bd4036c98c4f4b9f.tar.bz2
glutte-o-matic-882e3bb1c298343daf66f705bd4036c98c4f4b9f.zip
Switch to 16kHz audio
Diffstat (limited to 'src')
-rw-r--r--src/common/includes/Audio/audio_in.h4
-rw-r--r--src/common/includes/Audio/tone.h2
-rw-r--r--src/common/src/Audio/tone.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/common/includes/Audio/audio_in.h b/src/common/includes/Audio/audio_in.h
index 40482d9..d2e8378 100644
--- a/src/common/includes/Audio/audio_in.h
+++ b/src/common/includes/Audio/audio_in.h
@@ -27,8 +27,8 @@
#include <stdio.h>
#include "FreeRTOS.h"
-#define AUDIO_IN_RATE 8000
-#define AUDIO_IN_BUF_LEN 400
+#define AUDIO_IN_RATE 16000
+#define AUDIO_IN_BUF_LEN 1600
void audio_in_initialize(void);
diff --git a/src/common/includes/Audio/tone.h b/src/common/includes/Audio/tone.h
index 294fe54..f8f4132 100644
--- a/src/common/includes/Audio/tone.h
+++ b/src/common/includes/Audio/tone.h
@@ -30,8 +30,6 @@
#define TONE_BUFFER_LEN AUDIO_IN_BUF_LEN
-#define TONE_N 400
-
struct tone_detector {
float coef;
float Q1;
diff --git a/src/common/src/Audio/tone.c b/src/common/src/Audio/tone.c
index 29e2936..0618c8c 100644
--- a/src/common/src/Audio/tone.c
+++ b/src/common/src/Audio/tone.c
@@ -36,6 +36,8 @@
#include "arm_math.h"
#endif
+#define TONE_N 800
+
/* DTMF frequencies
* COL_1 COL_2 COL_3 COL_A
* 1209 1336 1477 1633