mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-06 01:06:31 +08:00
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:
committed by
Mathew Sutcliffe
parent
7292e265fb
commit
f91525b65b
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user