diff --git a/src/blackcore/afv/clients/afvclient.cpp b/src/blackcore/afv/clients/afvclient.cpp index 197917ef1..10668f80f 100644 --- a/src/blackcore/afv/clients/afvclient.cpp +++ b/src/blackcore/afv/clients/afvclient.cpp @@ -138,31 +138,33 @@ namespace BlackCore QMutexLocker lock(&m_mutexConnection); // async connection - m_connection->connectTo(cid, password, callsign, client, { this, [ = ](bool authenticated) + m_connection->connectTo(cid, password, callsign, client, { - // this is the callback when the connection has been established - - const QVector aliasedStations = m_connection->getAllAliasedStations(); - this->setAliasedStations(aliasedStations); // threadsafe - this->onTimerUpdate(); - - // const bool isConnected = this->isConnected(); // threadsafe - if (authenticated) + this, [ = ](bool authenticated) { - // restart timer, normally it should be started already, paranoia - // as I run in "my thread" starting timer should be OK + // this is the callback when the connection has been established + + const QVector aliasedStations = m_connection->getAllAliasedStations(); + this->setAliasedStations(aliasedStations); // threadsafe + this->onTimerUpdate(); + + // const bool isConnected = this->isConnected(); // threadsafe + if (authenticated) { - QMutexLocker lock(&m_mutex); - if (m_voiceServerTimer) { m_voiceServerTimer->start(PositionUpdatesMs); } + // restart timer, normally it should be started already, paranoia + // as I run in "my thread" starting timer should be OK + { + QMutexLocker lock(&m_mutex); + if (m_voiceServerTimer) { m_voiceServerTimer->start(PositionUpdatesMs); } + } + emit this->connectionStatusChanged(Connected); + } + else + { + emit this->connectionStatusChanged(Disconnected); } - emit this->connectionStatusChanged(Connected); } - else - { - emit this->connectionStatusChanged(Disconnected); - } - } - }); + }); } } @@ -298,7 +300,6 @@ namespace BlackCore this->setReceiveAudio(false); // threadsafe // stop input/output - { QMutexLocker lock{&m_mutex}; m_input->stop(); diff --git a/src/blackcore/db/databasewriter.cpp b/src/blackcore/db/databasewriter.cpp index 2a7571972..059448862 100644 --- a/src/blackcore/db/databasewriter.cpp +++ b/src/blackcore/db/databasewriter.cpp @@ -95,7 +95,7 @@ namespace BlackCore request.setRawHeader(QByteArray("swift-extrainfo"), eInfo); const int logId = m_writeLog.addPendingUrl(url); m_pendingModelPublishReply = sApp->postToNetwork(request, logId, multiPart, { this, &CDatabaseWriter::postedModelsResponse}); - m_modelReplyPendingSince = QDateTime::currentMSecsSinceEpoch(); + m_modelReplyPendingSince = QDateTime::currentMSecsSinceEpoch(); return msgs; } diff --git a/src/blackmisc/directoryutils.cpp b/src/blackmisc/directoryutils.cpp index 5b9e481b5..a2be93a26 100644 --- a/src/blackmisc/directoryutils.cpp +++ b/src/blackmisc/directoryutils.cpp @@ -51,6 +51,12 @@ namespace BlackMisc return pDir; } + const QString &CDirectoryUtils::audioPluginDirectory() + { + static const QString pDir(CFileUtils::appendFilePaths(binDirectory(), "audio")); + return pDir; + } + const QString &CDirectoryUtils::getXSwiftBusBuildDirectory() { if (!CBuildConfig::isLocalDeveloperDebugBuild()) diff --git a/src/blackmisc/directoryutils.h b/src/blackmisc/directoryutils.h index 6bcc3728b..3125f8056 100644 --- a/src/blackmisc/directoryutils.h +++ b/src/blackmisc/directoryutils.h @@ -43,6 +43,10 @@ namespace BlackMisc //! Plugins directory static const QString &pluginsDirectory(); + //! Audio plugins directory for Qt audio + //! \remark contains the audio plugins + static const QString &audioPluginDirectory(); + //! The build directory //! \remark if is a local build static const QString &getXSwiftBusBuildDirectory();