Diff
Modified: freeswitch/trunk/fscomm/fshost.cpp (16168 => 16169)
--- freeswitch/trunk/fscomm/fshost.cpp 2010-01-06 03:45:00 UTC (rev 16168)
+++ freeswitch/trunk/fscomm/fshost.cpp 2010-01-06 04:31:20 UTC (rev 16169)
@@ -59,6 +59,8 @@
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());
Modified: freeswitch/trunk/fscomm/prefdialog.ui (16168 => 16169)
--- freeswitch/trunk/fscomm/prefdialog.ui 2010-01-06 03:45:00 UTC (rev 16168)
+++ freeswitch/trunk/fscomm/prefdialog.ui 2010-01-06 04:31:20 UTC (rev 16169)
@@ -234,7 +234,7 @@
<item>
<widget class="QPushButton" name="PaRingdevTestBtn">
<property name="enabled">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="maximumSize">
<size>
Modified: freeswitch/trunk/fscomm/prefportaudio.cpp (16168 => 16169)
--- freeswitch/trunk/fscomm/prefportaudio.cpp 2010-01-06 03:45:00 UTC (rev 16168)
+++ freeswitch/trunk/fscomm/prefportaudio.cpp 2010-01-06 04:31:20 UTC (rev 16169)
@@ -11,8 +11,19 @@
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)
{
QString result;
Modified: freeswitch/trunk/fscomm/prefportaudio.h (16168 => 16169)
--- freeswitch/trunk/fscomm/prefportaudio.h 2010-01-06 03:45:00 UTC (rev 16168)
+++ freeswitch/trunk/fscomm/prefportaudio.h 2010-01-06 04:31:20 UTC (rev 16169)
@@ -20,6 +20,7 @@
void holdFileChoose();
void outdevChangeDev(int);
void ringdevChangeDev(int);
+ void ringdevTest();
private:
void getPaDevlist(void);
Added: freeswitch/trunk/fscomm/resources/test.wav
(Binary files differ)
Property changes on: freeswitch/trunk/fscomm/resources/test.wav
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: freeswitch/trunk/fscomm/resources.qrc (16168 => 16169)
--- freeswitch/trunk/fscomm/resources.qrc 2010-01-06 03:45:00 UTC (rev 16168)
+++ freeswitch/trunk/fscomm/resources.qrc 2010-01-06 04:31:20 UTC (rev 16169)
@@ -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>