📄 gcos.h
字号:
#ifndef __GCOS_H
#define __GCOS_H
// These are the coefficients for DTMF digits, ring, dial and busy tones
// detection using the Goertzel algorithm. These are specifically tuned
// for detecting the frequencies described below based on an 8KHz sampling
// rate and a 206-byte frame. If these parameters are changed, this table
// must be recomputed from the original formulas. There has been some manual
// tweaking, though, because experimentation showed that slightly increasing
// some of the constants resulted in much better detection.
//
// These numbers are defined as macros because they are used in two very
// different ways because of speed optimization needs: in the inner goertzel
// loop (executed *every sample*, thus speed-critical; that's why this loop is
// unrolled), those numbers are arguments for an in-line assembly macro that
// performs the multiply-accumulate operations. In the outer loop, which is
// less speed-critical, they are looked up from a table defined in goertzel.h.
#define GCOS0040 0x1FF
#define GCOS0440 0X1E3
#define GCOS0697 0X1B4
#define GCOS0770 0x1A3
#define GCOS0852 0x190
#define GCOS0941 0x17F
#define GCOS1209 0x12B
#define GCOS1336 0x104
#define GCOS1477 0xD0
#define GCOS1633 0x92
#endif // _GCOS_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -