From 882e3bb1c298343daf66f705bd4036c98c4f4b9f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 14 Apr 2019 21:48:14 +0200 Subject: Switch to 16kHz audio --- src/common/includes/Audio/audio_in.h | 4 ++-- src/common/includes/Audio/tone.h | 2 -- src/common/src/Audio/tone.c | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common') 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 #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 -- cgit v1.2.3