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