Expanded voice sample to an interactive app

refs #36
- Based on the existing network sample, expanded the voice sample to an interactive app
- Implmenented commands: mic test, squelch test

refs #81
This commit is contained in:
Roland Winklmeier
2013-11-30 18:24:46 +01:00
committed by Mathew Sutcliffe
parent 7292e265fb
commit f91525b65b
9 changed files with 218 additions and 13 deletions

View File

@@ -4,6 +4,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "blackcore/voiceclient_vatlib.h"
#include "client.h"
#include "reader.h"
#include <QCoreApplication>
#include <QDebug>
@@ -15,15 +19,12 @@ int main(int argc, char *argv[])
BlackMisc::IContext::getInstance().setObject(*new BlackMisc::CDebug());
BlackMisc::IContext::getInstance().setObject<BlackCore::IVoiceClient>(*new BlackCore::CVoiceClientVatlib());
BlackCore::IVoiceClient *voiceClient = BlackMisc::IContext::getInstance().singleton<BlackCore::IVoiceClient>();
QList<COutputAudioDevice> outputDevices = voiceClient->audioOutputDevices(0);
qDebug() << "Found " << outputDevices.size() << " output devices:";
foreach (COutputAudioDevice device, outputDevices)
{
qDebug() << device.name();
}
Client client;
LineReader reader;
QObject::connect(&reader, SIGNAL(command(const QString&)), &client, SLOT(command(const QString&)));
QObject::connect(&client, SIGNAL(quit()), &reader, SLOT(terminate()));
QObject::connect(&client, SIGNAL(quit()), &app, SLOT(quit()));
reader.start();
app.exec();
}