提交 6b902424 authored 作者: Michael Jerris's avatar Michael Jerris

CID:1214189 Division or modulo by float zero

上级 269db090
...@@ -141,6 +141,10 @@ TELETONE_API(void) teletone_dtmf_detect_init (teletone_dtmf_detect_state_t *dtmf ...@@ -141,6 +141,10 @@ TELETONE_API(void) teletone_dtmf_detect_init (teletone_dtmf_detect_state_t *dtmf
int i; int i;
float theta; float theta;
if (!sample_rate) {
sample_rate = 8000;
}
dtmf_detect_state->hit1 = dtmf_detect_state->hit2 = 0; dtmf_detect_state->hit1 = dtmf_detect_state->hit2 = 0;
for (i = 0; i < GRID_FACTOR; i++) { for (i = 0; i < GRID_FACTOR; i++) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论