From c175200540acc667cbbc4ae9fa1fe7b9c126a4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Mesquita?= Date: Wed, 6 Jan 2010 04:31:20 +0000 Subject: [PATCH] Add a test sound to test the ringdev. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16169 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- fscomm/fshost.cpp | 2 ++ fscomm/prefdialog.ui | 2 +- fscomm/prefportaudio.cpp | 11 +++++++++++ fscomm/prefportaudio.h | 1 + fscomm/resources.qrc | 3 +++ fscomm/resources/test.wav | Bin 0 -> 3596 bytes 6 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 fscomm/resources/test.wav diff --git a/fscomm/fshost.cpp b/fscomm/fshost.cpp index 9cd0bd3796..6ddca28547 100644 --- a/fscomm/fshost.cpp +++ b/fscomm/fshost.cpp @@ -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()); diff --git a/fscomm/prefdialog.ui b/fscomm/prefdialog.ui index 1f228692c0..63d83ea4c2 100644 --- a/fscomm/prefdialog.ui +++ b/fscomm/prefdialog.ui @@ -234,7 +234,7 @@ - false + true diff --git a/fscomm/prefportaudio.cpp b/fscomm/prefportaudio.cpp index ecd1c603b9..16cc01ef23 100644 --- a/fscomm/prefportaudio.cpp +++ b/fscomm/prefportaudio.cpp @@ -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) diff --git a/fscomm/prefportaudio.h b/fscomm/prefportaudio.h index d427121629..9308e8b5dd 100644 --- a/fscomm/prefportaudio.h +++ b/fscomm/prefportaudio.h @@ -20,6 +20,7 @@ private slots: void holdFileChoose(); void outdevChangeDev(int); void ringdevChangeDev(int); + void ringdevTest(); private: void getPaDevlist(void); diff --git a/fscomm/resources.qrc b/fscomm/resources.qrc index 8c6ac288ed..2ee05d4693 100644 --- a/fscomm/resources.qrc +++ b/fscomm/resources.qrc @@ -11,4 +11,7 @@ conf/event_socket.conf.xml conf/portaudio.conf.xml + + resources/test.wav + diff --git a/fscomm/resources/test.wav b/fscomm/resources/test.wav new file mode 100644 index 0000000000000000000000000000000000000000..46daf5a872ef4a95e743bc77a740104e2cfe6753 GIT binary patch literal 3596 zcmX9>Sx{T)l_pj5FfTooJY;5^NotZx+Udo#-EF!X8*EI24R~eWcL{-ngtoiyo9?~Z zg#-d5b|f$uY`}N{+u+74-oWwnq&uFZlgwl$JySJRd7GN2Ibwd5O1JJk_blJ}{-f`& zEIV`Nul^=0tFEy2w8@72^!r&^S>J=t|9p_O|NUOpUuPLRkdANP$;y&AmgRV!7ZuIx z^TN_KkI2#l>ag~}GF$B~1S45V)ihry9Q3M+qDTVA@sdZ?{gJ_;p}}Y*=#@FbZR>7p zhSg@UI0;si;kj2=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