mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-09 19:16:01 +08:00
Remove duplicate CVoiceVatlib object.
Move the one in Client into its own thread instead refs #226
This commit is contained in:
@@ -19,6 +19,9 @@ Client::Client(QObject *parent) :
|
||||
QObject(parent),
|
||||
m_voice(new BlackCore::CVoiceVatlib())
|
||||
{
|
||||
m_voice->moveToThread(&m_threadVoice);
|
||||
m_threadVoice.start();
|
||||
|
||||
using namespace BlackCore;
|
||||
connect(m_voice, &IVoice::squelchTestFinished, this, &Client::onSquelchTestFinished);
|
||||
connect(m_voice, &IVoice::micTestFinished, this, &Client::onMicTestFinished);
|
||||
@@ -91,6 +94,9 @@ void Client::echo(QTextStream &line)
|
||||
|
||||
void Client::exit(QTextStream &)
|
||||
{
|
||||
qDebug() << "Shutting down...";
|
||||
m_threadVoice.quit();
|
||||
m_threadVoice.wait(5000);
|
||||
emit quit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user