Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c80c4e33
提交
c80c4e33
authored
6月 16, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
format
git-svn-id:
http://svn.openzap.org/svn/openzap/trunk@267
a93c3328-9c30-0410-af19-c9cd2b2d52af
上级
cae2014e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
158 行增加
和
158 行删除
+158
-158
libteletone_detect.h
libs/openzap/src/include/libteletone_detect.h
+12
-12
libteletone_generate.h
libs/openzap/src/include/libteletone_generate.h
+9
-9
libteletone_detect.c
libs/openzap/src/libteletone_detect.c
+135
-135
libteletone_generate.c
libs/openzap/src/libteletone_generate.c
+2
-2
没有找到文件。
libs/openzap/src/include/libteletone_detect.h
浏览文件 @
c80c4e33
...
...
@@ -54,7 +54,7 @@
* Exception:
* The author hereby grants the use of this source code under the
* following license if and only if the source code is distributed
* as part of the openzap library.
Any use or distribution of this
* as part of the openzap library.
Any use or distribution of this
* source code outside the scope of the openzap library will nullify the
* following license and reinact the MPL 1.1 as stated above.
*
...
...
@@ -80,7 +80,7 @@
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER
* A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
...
...
@@ -105,9 +105,9 @@ extern "C" {
*/
#ifndef FALSE
#define FALSE
0
#define FALSE
0
#ifndef TRUE
#define TRUE
(!FALSE)
#define TRUE
(!FALSE)
#endif
#endif
...
...
@@ -123,13 +123,13 @@ extern "C" {
* Frequency tolerance +- 1.5% will detect, +-3.5% will reject
*/
#define DTMF_THRESHOLD
8.0e7
#define DTMF_NORMAL_TWIST
6.3
/* 8dB */
#define DTMF_REVERSE_TWIST
2.5
/* 4dB */
#define DTMF_RELATIVE_PEAK_ROW
6.3
/* 8dB */
#define DTMF_RELATIVE_PEAK_COL
6.3
/* 8dB */
#define DTMF_2ND_HARMONIC_ROW
2.5
/* 4dB */
#define DTMF_2ND_HARMONIC_COL
63.1
/* 18dB */
#define DTMF_THRESHOLD
8.0e7
#define DTMF_NORMAL_TWIST
6.3
/* 8dB */
#define DTMF_REVERSE_TWIST
2.5
/* 4dB */
#define DTMF_RELATIVE_PEAK_ROW
6.3
/* 8dB */
#define DTMF_RELATIVE_PEAK_COL
6.3
/* 8dB */
#define DTMF_2ND_HARMONIC_ROW
2.5
/* 4dB */
#define DTMF_2ND_HARMONIC_COL
63.1
/* 18dB */
#define GRID_FACTOR 4
#define BLOCK_LEN 102
#define M_TWO_PI 2.0*M_PI
...
...
@@ -154,7 +154,7 @@ extern "C" {
teletone_goertzel_state_t
row_out2nd
[
GRID_FACTOR
];
teletone_goertzel_state_t
col_out2nd
[
GRID_FACTOR
];
float
energy
;
int
current_sample
;
char
digits
[
TELETONE_MAX_DTMF_DIGITS
+
1
];
int
current_digits
;
...
...
libs/openzap/src/include/libteletone_generate.h
浏览文件 @
c80c4e33
...
...
@@ -33,7 +33,7 @@
* Exception:
* The author hereby grants the use of this source code under the
* following license if and only if the source code is distributed
* as part of the openzap library.
Any use or distribution of this
* as part of the openzap library.
Any use or distribution of this
* source code outside the scope of the openzap library will nullify the
* following license and reinact the MPL 1.1 as stated above.
*
...
...
@@ -59,7 +59,7 @@
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER
* A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
...
...
@@ -138,25 +138,25 @@ static __inline__ int32_t teletone_dds_phase_rate(teletone_process_t tone, uint3
static
__inline__
int16_t
teletone_dds_state_modulate_sample
(
teletone_dds_state_t
*
dds
,
uint32_t
pindex
)
{
int32_t
bitmask
=
dds
->
phase_accumulator
,
sine_index
=
(
bitmask
>>=
23
)
&
SINE_TABLE_LEN
;
int32_t
bitmask
=
dds
->
phase_accumulator
,
sine_index
=
(
bitmask
>>=
23
)
&
SINE_TABLE_LEN
;
int16_t
sample
;
if
(
pindex
>=
MAX_PHASE_TONES
)
{
if
(
pindex
>=
MAX_PHASE_TONES
)
{
pindex
=
0
;
}
if
(
bitmask
&
SINE_TABLE_MAX
)
{
sine_index
=
SINE_TABLE_LEN
-
sine_index
;
if
(
bitmask
&
SINE_TABLE_MAX
)
{
sine_index
=
SINE_TABLE_LEN
-
sine_index
;
}
sample
=
TELETONE_SINES
[
sine_index
];
sample
=
TELETONE_SINES
[
sine_index
];
if
(
bitmask
&
(
SINE_TABLE_MAX
*
2
))
{
if
(
bitmask
&
(
SINE_TABLE_MAX
*
2
))
{
sample
*=
-
1
;
}
dds
->
phase_accumulator
+=
dds
->
phase_rate
[
pindex
];
return
(
int16_t
)
(
sample
*
dds
->
scale_factor
>>
15
);
return
(
int16_t
)
(
sample
*
dds
->
scale_factor
>>
15
);
}
static
__inline__
void
teletone_dds_state_set_tx_level
(
teletone_dds_state_t
*
dds
,
float
tx_level
)
...
...
libs/openzap/src/libteletone_detect.c
浏览文件 @
c80c4e33
差异被折叠。
点击展开。
libs/openzap/src/libteletone_generate.c
浏览文件 @
c80c4e33
...
...
@@ -33,7 +33,7 @@
* Exception:
* The author hereby grants the use of this source code under the
* following license if and only if the source code is distributed
* as part of the openzap library.
Any use or distribution of this
* as part of the openzap library.
Any use or distribution of this
* source code outside the scope of the openzap library will nullify the
* following license and reinact the MPL 1.1 as stated above.
*
...
...
@@ -59,7 +59,7 @@
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER
* A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论