Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
df43e51c
提交
df43e51c
authored
3月 18, 2011
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
initial reworking for mod_portaudio multiple enpoint support
上级
8cb2bad0
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
70 行增加
和
15 行删除
+70
-15
portaudio.conf.xml
conf/autoload_configs/portaudio.conf.xml
+29
-4
mod_portaudio.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
+28
-0
pablio.h
src/mod/endpoints/mod_portaudio/pablio.h
+13
-11
没有找到文件。
conf/autoload_configs/portaudio.conf.xml
浏览文件 @
df43e51c
...
@@ -5,12 +5,14 @@
...
@@ -5,12 +5,14 @@
or the device number prefixed with # eg "#1" (or blank for default) -->
or the device number prefixed with # eg "#1" (or blank for default) -->
<!-- device to use for input -->
<!-- device to use for input -->
<param
name=
"indev"
value=
""
/>
<param
name=
"indev"
value=
"
Built-in Input
"
/>
<!-- device to use for output -->
<!-- device to use for output -->
<param
name=
"outdev"
value=
""
/>
<!--<param name="outdev" value="Built-in Output"/>-->
<param
name=
"outdev"
value=
"#2"
/>
<!--device to use for inbound ring -->
<!--device to use for inbound ring -->
<!--<param name="ringdev" value=""/>-->
<param
name=
"ringdev"
value=
"Built-in Output"
/>
<!--File to play as the ring sound -->
<!--File to play as the ring sound -->
<!--<param name="ring-file" value="/sounds/ring.wav"/>-->
<!--<param name="ring-file" value="/sounds/ring.wav"/>-->
<!--Number of seconds to pause between rings -->
<!--Number of seconds to pause between rings -->
...
@@ -29,7 +31,30 @@
...
@@ -29,7 +31,30 @@
<param
name=
"cid-num"
value=
"$${outbound_caller_id}"
/>
<param
name=
"cid-num"
value=
"$${outbound_caller_id}"
/>
<!--audio sample rate and interval -->
<!--audio sample rate and interval -->
<param
name=
"sample-rate"
value=
"48000"
/>
<!--<param name="sample-rate" value="48000"/>-->
<param
name=
"sample-rate"
value=
"8000"
/>
<param
name=
"codec-ms"
value=
"20"
/>
<param
name=
"codec-ms"
value=
"20"
/>
</settings>
</settings>
<shared-devices>
<device
friendly-name=
"usb1"
device=
"#2"
>
<param
name=
"channels"
value=
"2"
/>
<param
name=
"sample-rate"
value=
"8000"
/>
<param
name=
"codec-ms"
value=
"20"
/>
</device>
</shared-devices>
<endpoints>
<endpoint
name=
"usbout-left"
>
<param
name=
"outdev"
value=
"usb1:0"
/>
</endpoint>
<endpoint
name=
"usbout-right"
>
<param
name=
"outdev"
value=
"usb1:1"
/>
</endpoint>
</endpoints>
</configuration>
</configuration>
src/mod/endpoints/mod_portaudio/mod_portaudio.c
浏览文件 @
df43e51c
...
@@ -106,6 +106,34 @@ struct audio_stream {
...
@@ -106,6 +106,34 @@ struct audio_stream {
};
};
typedef
struct
audio_stream
audio_stream_t
;
typedef
struct
audio_stream
audio_stream_t
;
typedef
struct
_pa_shared_device
{
/*! Sampling rate */
int
sample_rate
;
/*! */
int
codec_ms
;
/*! Device number */
int
devno
;
/*! Running stream (if a stream is already running for devno) */
audio_stream_t
*
stream
;
/*! The actual portaudio device number */
/*! It's a shared device after all */
switch_mutex_t
*
mutex
;
}
pa_shared_device_t
;
typedef
struct
_pa_endpoint
{
/*! Input device for this endpoint */
pa_shared_device_t
*
indev
;
/*! Output device for this endpoint */
pa_shared_device_t
*
outdev
;
/*! Channel index within the input device stream */
int
inchan
;
/*! Channel index within the input device stream */
int
outchan
;
}
pa_endpoint_t
;
static
struct
{
static
struct
{
int
debug
;
int
debug
;
int
port
;
int
port
;
...
...
src/mod/endpoints/mod_portaudio/pablio.h
浏览文件 @
df43e51c
...
@@ -56,9 +56,8 @@ extern "C" {
...
@@ -56,9 +56,8 @@ extern "C" {
#include <string.h>
#include <string.h>
typedef
struct
{
#define MAX_IO_CHANNELS 2
PaUtilRingBuffer
inFIFO
;
typedef
struct
{
PaUtilRingBuffer
outFIFO
;
PaStream
*
istream
;
PaStream
*
istream
;
PaStream
*
ostream
;
PaStream
*
ostream
;
PaStream
*
iostream
;
PaStream
*
iostream
;
...
@@ -66,7 +65,10 @@ extern "C" {
...
@@ -66,7 +65,10 @@ extern "C" {
int
do_dual
;
int
do_dual
;
int
has_in
;
int
has_in
;
int
has_out
;
int
has_out
;
}
PABLIO_Stream
;
PaUtilRingBuffer
inFIFOs
[
2
]
PaUtilRingBuffer
outFIFOs
[
2
]
int
channelCount
;
}
PABLIO_Stream
;
/* Values for flags for OpenAudioStream(). */
/* Values for flags for OpenAudioStream(). */
#define PABLIO_READ (1<<0)
#define PABLIO_READ (1<<0)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论