93 #ifndef LIBTELETONE_DETECT_H 94 #define LIBTELETONE_DETECT_H 110 #define TRUE (!FALSE) 126 #define DTMF_THRESHOLD 8.0e7 127 #define DTMF_NORMAL_TWIST 6.3 128 #define DTMF_REVERSE_TWIST 2.5 129 #define DTMF_RELATIVE_PEAK_ROW 6.3 130 #define DTMF_RELATIVE_PEAK_COL 6.3 131 #define DTMF_2ND_HARMONIC_ROW 2.5 132 #define DTMF_2ND_HARMONIC_COL 63.1 133 #define GRID_FACTOR 4 134 #define BLOCK_LEN 102 135 #define M_TWO_PI 2.0*M_PI 226 int16_t sample_buffer[],
244 int16_t sample_buffer[],
262 int16_t sample_buffer[],
#define TELETONE_MAX_TONES
A container for a single multi-tone detection TELETONE_MAX_TONES dictates the maximum simultaneous to...
void teletone_dtmf_detect_init(teletone_dtmf_detect_state_t *dtmf_detect_state, int sample_rate)
Initilize a DTMF detection state object.
teletone_hit_type_t teletone_dtmf_detect(teletone_dtmf_detect_state_t *dtmf_detect_state, int16_t sample_buffer[], int samples)
Check a sample buffer for the presence of DTMF digits.
An abstraction to store a tone mapping.
A container for a DTMF detection state.
A continer for the elements of a Goertzel Algorithm (The names are from his formula) ...
#define TELETONE_API(type)
switch_byte_t switch_byte_t * buf
int teletone_dtmf_get(teletone_dtmf_detect_state_t *dtmf_detect_state, char *buf, unsigned int *dur)
retrieve any collected digits into a string buffer
void teletone_multi_tone_init(teletone_multi_tone_t *mt, teletone_tone_map_t *map)
Initilize a multi-frequency tone detector.
void teletone_goertzel_update(teletone_goertzel_state_t *goertzel_state, int16_t sample_buffer[], int samples)
Step through the Goertzel Algorithm for each sample in a buffer.
An abstraction to store the coefficient of a tone frequency.
int teletone_multi_tone_detect(teletone_multi_tone_t *mt, int16_t sample_buffer[], int samples)
Check a sample buffer for the presence of the mulit-frequency tone described by mt.