Add a test sound to test the ringdev.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16169 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
João Mesquita 2010-01-06 04:31:20 +00:00
parent fd32ad6202
commit c175200540
6 changed files with 18 additions and 1 deletions

View File

@ -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());

View File

@ -234,7 +234,7 @@
<item>
<widget class="QPushButton" name="PaRingdevTestBtn">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="maximumSize">
<size>

View File

@ -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)

View File

@ -20,6 +20,7 @@ private slots:
void holdFileChoose();
void outdevChangeDev(int);
void ringdevChangeDev(int);
void ringdevTest();
private:
void getPaDevlist(void);

View File

@ -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>

BIN
fscomm/resources/test.wav Normal file

Binary file not shown.