Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
785a5851
提交
785a5851
authored
10月 20, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-8338 a few regressions that were relying on this bug to function properly in stereo situations
上级
42803902
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
5 行删除
+7
-5
switch_ivr_play_say.c
src/switch_ivr_play_say.c
+6
-4
switch_pcm.c
src/switch_pcm.c
+1
-1
没有找到文件。
src/switch_ivr_play_say.c
浏览文件 @
785a5851
...
...
@@ -1047,7 +1047,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
int16_t
*
abuf
=
NULL
;
switch_dtmf_t
dtmf
=
{
0
};
uint32_t
interval
=
0
,
samples
=
0
,
framelen
,
sample_start
=
0
;
uint32_t
interval
=
0
,
samples
=
0
,
framelen
,
sample_start
=
0
,
channels
=
1
;
uint32_t
ilen
=
0
;
switch_size_t
olen
=
0
,
llen
=
0
;
switch_frame_t
write_frame
=
{
0
};
...
...
@@ -1388,6 +1388,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
write_frame
.
codec
=
switch_core_session_get_read_codec
(
session
);
samples
=
read_impl
.
samples_per_packet
;
framelen
=
read_impl
.
encoded_bytes_per_packet
;
channels
=
read_impl
.
number_of_channels
;
if
(
framelen
==
0
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"%s cannot play or record native files with variable length data
\n
"
,
switch_channel_get_name
(
channel
));
...
...
@@ -1410,6 +1411,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
write_frame
.
codec
=
&
codec
;
samples
=
codec
.
implementation
->
samples_per_packet
;
framelen
=
codec
.
implementation
->
decoded_bytes_per_packet
;
channels
=
codec
.
implementation
->
number_of_channels
;
}
last_native
=
test_native
;
...
...
@@ -1417,8 +1419,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
if
(
timer_name
&&
!
timer
.
samplecount
)
{
uint32_t
len
;
len
=
samples
*
2
;
if
(
switch_core_timer_init
(
&
timer
,
timer_name
,
interval
,
samples
/
codec
.
implementation
->
number_of_channels
,
pool
)
!=
SWITCH_STATUS_SUCCESS
)
{
len
=
samples
*
2
*
channels
;
if
(
switch_core_timer_init
(
&
timer
,
timer_name
,
interval
,
samples
,
pool
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"Setup timer failed!
\n
"
);
switch_core_codec_destroy
(
&
codec
);
switch_core_session_io_write_lock
(
session
);
...
...
@@ -1444,7 +1446,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
switch_core_service_session
(
session
);
}
ilen
=
samples
;
ilen
=
samples
*
channels
;
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_PLAYBACK_START
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_channel_event_set_data
(
channel
,
event
);
...
...
src/switch_pcm.c
浏览文件 @
785a5851
...
...
@@ -321,7 +321,7 @@ static void mod_g711_load(switch_loadable_module_interface_t ** module_interface
48000
,
/* actual samples transferred per second */
64000
*
6
*
2
,
/* bits transferred per second */
mpf
*
count
,
/* number of microseconds per frame */
spf
*
count
*
6
*
2
,
/* number of samples per frame */
spf
*
count
*
6
,
/* number of samples per frame */
bpf
*
count
*
6
*
2
,
/* number of bytes per frame decompressed */
ebpf
*
count
*
6
*
2
,
/* number of bytes per frame compressed */
2
,
/* number of channels represented */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论