gcos.h

来自「charger fo nimh bat 3.6v」· C头文件 代码 · 共 31 行

H
31
字号
#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 + =
减小字号Ctrl + -
显示快捷键?