提交 c1752005 authored 作者: João Mesquita's avatar João Mesquita

Add a test sound to test the ringdev.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16169 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 fd32ad62
......@@ -59,6 +59,8 @@ void FSHost::run(void)
if (!conf_dir.exists(".fscomm"))
{
conf_dir.mkpath(".fscomm/conf/accounts");
conf_dir.mkpath(".fscomm/sounds");
QFile::copy(":/sounds/test.wav", QString("%1/.fscomm/sounds/test.wav").arg(QDir::homePath()));
conf_dir.mkpath(".fscomm/templates");
QFile rootXML(":/confs/freeswitch.xml");
QString dest = QString("%1/.fscomm/conf/freeswitch.xml").arg(conf_dir.absolutePath());
......
......@@ -234,7 +234,7 @@
<item>
<widget class="QPushButton" name="PaRingdevTestBtn">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="maximumSize">
<size>
......
......@@ -11,6 +11,17 @@ PrefPortaudio::PrefPortaudio(Ui::PrefDialog *ui, QObject *parent) :
connect(_ui->PaHoldFileBtn, SIGNAL(clicked()), this, SLOT(holdFileChoose()));
connect(_ui->PaOutdevCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(outdevChangeDev(int)));
connect(_ui->PaRingdevCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(ringdevChangeDev(int)));
connect(_ui->PaRingdevTestBtn, SIGNAL(clicked()), this, SLOT(ringdevTest()));
}
void PrefPortaudio::ringdevTest()
{
QString result;
if (g_FSHost.sendCmd("pa", QString("play %1/.fscomm/sounds/test.wav").arg(QDir::homePath()).toAscii().constData(), &result) != SWITCH_STATUS_SUCCESS)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error testing ringdev on mod_portaudio! %s\n",
result.toAscii().constData());
}
}
void PrefPortaudio::ringdevChangeDev(int dev)
......
......@@ -20,6 +20,7 @@ private slots:
void holdFileChoose();
void outdevChangeDev(int);
void ringdevChangeDev(int);
void ringdevTest();
private:
void getPaDevlist(void);
......
......@@ -11,4 +11,7 @@
<file alias="event_socket.conf.xml">conf/event_socket.conf.xml</file>
<file alias="portaudio.conf.xml">conf/portaudio.conf.xml</file>
</qresource>
<qresource prefix="/sounds">
<file alias="test.wav">resources/test.wav</file>
</qresource>
</RCC>
This diff was suppressed by a .gitattributes entry.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论