Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
74430cb3
提交
74430cb3
authored
9月 14, 2010
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
doh
上级
6f2c455f
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
16 行增加
和
16 行删除
+16
-16
libteletone_generate.c
libs/freetdm/src/libteletone_generate.c
+10
-10
libteletone_generate.c
libs/libteletone/src/libteletone_generate.c
+6
-6
没有找到文件。
libs/freetdm/src/libteletone_generate.c
浏览文件 @
74430cb3
...
@@ -244,7 +244,7 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
...
@@ -244,7 +244,7 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
if
(
ts
->
debug
&&
ts
->
debug_stream
)
{
if
(
ts
->
debug
&&
ts
->
debug_stream
)
{
if
(
map
->
freqs
[
0
]
<=
0
)
{
if
(
map
->
freqs
[
0
]
<=
0
)
{
fprintf
(
ts
->
debug_stream
,
"wait %d (%dms)
\n
"
,
wait
,
wait
/
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
));
fprintf
(
ts
->
debug_stream
,
"wait %d (%dms)
\n
"
,
wait
,
wait
/
(
ts
->
rate
/
1000
));
}
else
{
}
else
{
fprintf
(
ts
->
debug_stream
,
"Generate: ("
);
fprintf
(
ts
->
debug_stream
,
"Generate: ("
);
...
@@ -256,14 +256,14 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
...
@@ -256,14 +256,14 @@ TELETONE_API(int) teletone_mux_tones(teletone_generation_session_t *ts, teletone
") [volume %0.2fdB; samples %d(%dms) x %d channel%s; wait %d(%dms); decay_factor %0.2fdB; decay_step %d(%dms); wrote %d bytes]
\n
"
,
") [volume %0.2fdB; samples %d(%dms) x %d channel%s; wait %d(%dms); decay_factor %0.2fdB; decay_step %d(%dms); wrote %d bytes]
\n
"
,
ts
->
volume
,
ts
->
volume
,
duration
,
duration
,
duration
/
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
),
duration
/
(
ts
->
rate
/
1000
),
ts
->
channels
,
ts
->
channels
,
ts
->
channels
==
1
?
""
:
"s"
,
ts
->
channels
==
1
?
""
:
"s"
,
wait
,
wait
,
wait
/
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
),
wait
/
(
ts
->
rate
/
1000
),
ts
->
decay_factor
,
ts
->
decay_factor
,
ts
->
decay_step
,
ts
->
decay_step
,
ts
->
decay_step
/
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
),
ts
->
decay_step
/
(
ts
->
rate
/
1000
),
ts
->
samples
*
2
);
ts
->
samples
*
2
);
}
}
}
}
...
@@ -307,7 +307,7 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
...
@@ -307,7 +307,7 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
ts
->
rate
=
atoi
(
cur
+
2
);
ts
->
rate
=
atoi
(
cur
+
2
);
break
;
break
;
case
'd'
:
case
'd'
:
ts
->
duration
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
duration
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
);
break
;
break
;
case
'v'
:
case
'v'
:
{
{
...
@@ -318,18 +318,18 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
...
@@ -318,18 +318,18 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
}
}
break
;
break
;
case
'>'
:
case
'>'
:
ts
->
decay_step
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
decay_step
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
);
ts
->
decay_direction
=
-
1
;
ts
->
decay_direction
=
-
1
;
break
;
break
;
case
'<'
:
case
'<'
:
ts
->
decay_step
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
decay_step
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
);
ts
->
decay_direction
=
1
;
ts
->
decay_direction
=
1
;
break
;
break
;
case
'+'
:
case
'+'
:
ts
->
decay_factor
=
(
float
)
atof
(
cur
+
2
);
ts
->
decay_factor
=
(
float
)
atof
(
cur
+
2
);
break
;
break
;
case
'w'
:
case
'w'
:
ts
->
wait
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
wait
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
);
break
;
break
;
case
'l'
:
case
'l'
:
ts
->
loops
=
atoi
(
cur
+
2
);
ts
->
loops
=
atoi
(
cur
+
2
);
...
@@ -369,10 +369,10 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
...
@@ -369,10 +369,10 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
*
next
++
=
'\0'
;
*
next
++
=
'\0'
;
}
}
if
(
i
==
0
)
{
if
(
i
==
0
)
{
ts
->
tmp_duration
=
atoi
(
p
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
tmp_duration
=
atoi
(
p
)
*
(
ts
->
rate
/
1000
);
i
++
;
i
++
;
}
else
if
(
i
==
1
)
{
}
else
if
(
i
==
1
)
{
ts
->
tmp_wait
=
atoi
(
p
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
tmp_wait
=
atoi
(
p
)
*
(
ts
->
rate
/
1000
);
i
++
;
i
++
;
}
else
{
}
else
{
mymap
.
freqs
[
i
++
-
2
]
=
atof
(
p
);
mymap
.
freqs
[
i
++
-
2
]
=
atof
(
p
);
...
...
libs/libteletone/src/libteletone_generate.c
浏览文件 @
74430cb3
...
@@ -355,7 +355,7 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
...
@@ -355,7 +355,7 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
ts
->
rate
=
atoi
(
cur
+
2
);
ts
->
rate
=
atoi
(
cur
+
2
);
break
;
break
;
case
'd'
:
case
'd'
:
ts
->
duration
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
duration
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
);
break
;
break
;
case
'v'
:
case
'v'
:
{
{
...
@@ -366,18 +366,18 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
...
@@ -366,18 +366,18 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
}
}
break
;
break
;
case
'>'
:
case
'>'
:
ts
->
decay_step
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
decay_step
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
);
ts
->
decay_direction
=
-
1
;
ts
->
decay_direction
=
-
1
;
break
;
break
;
case
'<'
:
case
'<'
:
ts
->
decay_step
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
decay_step
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
);
ts
->
decay_direction
=
1
;
ts
->
decay_direction
=
1
;
break
;
break
;
case
'+'
:
case
'+'
:
ts
->
decay_factor
=
(
float
)
atof
(
cur
+
2
);
ts
->
decay_factor
=
(
float
)
atof
(
cur
+
2
);
break
;
break
;
case
'w'
:
case
'w'
:
ts
->
wait
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
wait
=
atoi
(
cur
+
2
)
*
(
ts
->
rate
/
1000
);
break
;
break
;
case
'l'
:
case
'l'
:
ts
->
loops
=
atoi
(
cur
+
2
);
ts
->
loops
=
atoi
(
cur
+
2
);
...
@@ -417,10 +417,10 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
...
@@ -417,10 +417,10 @@ TELETONE_API(int) teletone_run(teletone_generation_session_t *ts, const char *cm
*
next
++
=
'\0'
;
*
next
++
=
'\0'
;
}
}
if
(
i
==
0
)
{
if
(
i
==
0
)
{
ts
->
tmp_duration
=
atoi
(
p
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
tmp_duration
=
atoi
(
p
)
*
(
ts
->
rate
/
1000
);
i
++
;
i
++
;
}
else
if
(
i
==
1
)
{
}
else
if
(
i
==
1
)
{
ts
->
tmp_wait
=
atoi
(
p
)
*
(
ts
->
rate
/
1000
/
ts
->
channels
?
ts
->
channels
:
1
);
ts
->
tmp_wait
=
atoi
(
p
)
*
(
ts
->
rate
/
1000
);
i
++
;
i
++
;
}
else
{
}
else
{
mymap
.
freqs
[
i
++
-
2
]
=
atof
(
p
);
mymap
.
freqs
[
i
++
-
2
]
=
atof
(
p
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论