diff --git a/src/blackcore/context/contextaudio.cpp b/src/blackcore/context/contextaudio.cpp index c8782d5ef..5a59e9747 100644 --- a/src/blackcore/context/contextaudio.cpp +++ b/src/blackcore/context/contextaudio.cpp @@ -114,10 +114,10 @@ namespace BlackCore Q_ASSERT_X(m_voiceClient->owner() == this, Q_FUNC_INFO, "Wrong owner"); Q_ASSERT_X(!CThreadUtils::isApplicationThread(m_voiceClient->thread()), Q_FUNC_INFO, "Must NOT be in main thread"); - connect(m_voiceClient, &CAfvClient::outputVolumePeakVU, this, &CContextAudioBase::outputVolumePeakVU, Qt::QueuedConnection); - connect(m_voiceClient, &CAfvClient::inputVolumePeakVU, this, &CContextAudioBase::inputVolumePeakVU, Qt::QueuedConnection); - connect(m_voiceClient, &CAfvClient::receivingCallsignsChanged, this, &CContextAudioBase::receivingCallsignsChanged, Qt::QueuedConnection); - connect(m_voiceClient, &CAfvClient::updatedFromOwnAircraftCockpit, this, &CContextAudioBase::updatedFromOwnAircraftCockpit, Qt::QueuedConnection); + // connect(m_voiceClient, &CAfvClient::outputVolumePeakVU, this, &CContextAudioBase::outputVolumePeakVU, Qt::QueuedConnection); + // connect(m_voiceClient, &CAfvClient::inputVolumePeakVU, this, &CContextAudioBase::inputVolumePeakVU, Qt::QueuedConnection); + // connect(m_voiceClient, &CAfvClient::receivingCallsignsChanged, this, &CContextAudioBase::receivingCallsignsChanged, Qt::QueuedConnection); + // connect(m_voiceClient, &CAfvClient::updatedFromOwnAircraftCockpit, this, &CContextAudioBase::updatedFromOwnAircraftCockpit, Qt::QueuedConnection); connect(m_voiceClient, &CAfvClient::startedAudio, this, &CContextAudioBase::startedAudio, Qt::QueuedConnection); connect(m_voiceClient, &CAfvClient::ptt, this, &CContextAudioBase::ptt, Qt::QueuedConnection); diff --git a/src/blackcore/context/contextaudio.h b/src/blackcore/context/contextaudio.h index 7ca145af5..fdfa978a0 100644 --- a/src/blackcore/context/contextaudio.h +++ b/src/blackcore/context/contextaudio.h @@ -178,6 +178,9 @@ namespace BlackCore //! Is COM unit transmitting? bool isTransmittingComUnit(BlackMisc::Aviation::CComSystem::ComUnit comUnit) const; + //! \todo WORKAROUND to hide the "local signals" + Afv::Clients::CAfvClient *afvClient() const { return m_voiceClient; } + // -------- parts which can run in core and GUI, referring to local voice client ------------ public slots: @@ -213,6 +216,8 @@ namespace BlackCore //! PTT in voice client received void ptt(bool active, BlackMisc::Audio::PTTCOM pttcom, const BlackMisc::CIdentifier &identifier); + /** Workaround those must be invisible for DBus + //! VU levels @{ void inputVolumePeakVU(double value); void outputVolumePeakVU(double value); @@ -224,6 +229,8 @@ namespace BlackCore //! Client updated from own aicraft data void updatedFromOwnAircraftCockpit(); + **/ + // ------------ local signals ------- private: diff --git a/src/blackgui/components/audiodevicevolumesetupcomponent.cpp b/src/blackgui/components/audiodevicevolumesetupcomponent.cpp index c07de4f31..000b4a750 100644 --- a/src/blackgui/components/audiodevicevolumesetupcomponent.cpp +++ b/src/blackgui/components/audiodevicevolumesetupcomponent.cpp @@ -9,6 +9,7 @@ #include "blackgui/components/audiodevicevolumesetupcomponent.h" #include "blackgui/guiapplication.h" #include "blackgui/guiutility.h" +#include "blackcore/afv/clients/afvclient.h" #include "blackcore/context/contextaudioimpl.h" #include "blackmisc/audio/audiodeviceinfo.h" @@ -26,6 +27,7 @@ using namespace BlackCore; using namespace BlackCore::Afv::Audio; +using namespace BlackCore::Afv::Clients; using namespace BlackCore::Context; using namespace BlackMisc; using namespace BlackMisc::Aviation; @@ -112,16 +114,18 @@ namespace BlackGui c = connect(sGui->getCContextAudioBase(), &CContextAudioBase::startedAudio, this, &CAudioDeviceVolumeSetupComponent::onAudioStarted, Qt::QueuedConnection); Q_ASSERT(c); - c = connect(sGui->getCContextAudioBase(), &CContextAudioBase::outputVolumePeakVU, this, &CAudioDeviceVolumeSetupComponent::onOutputVU, Qt::QueuedConnection); + //! \todo Workaround to avoid context signals + + c = connect(sGui->getCContextAudioBase()->afvClient(), &CAfvClient::outputVolumePeakVU, this, &CAudioDeviceVolumeSetupComponent::onOutputVU, Qt::QueuedConnection); Q_ASSERT(c); - c = connect(sGui->getCContextAudioBase(), &CContextAudioBase::inputVolumePeakVU, this, &CAudioDeviceVolumeSetupComponent::onInputVU, Qt::QueuedConnection); + c = connect(sGui->getCContextAudioBase()->afvClient(), &CAfvClient::inputVolumePeakVU, this, &CAudioDeviceVolumeSetupComponent::onInputVU, Qt::QueuedConnection); Q_ASSERT(c); - c = connect(sGui->getCContextAudioBase(), &CContextAudioBase::receivingCallsignsChanged, this, &CAudioDeviceVolumeSetupComponent::onReceivingCallsignsChanged, Qt::QueuedConnection); + c = connect(sGui->getCContextAudioBase()->afvClient(), &CAfvClient::receivingCallsignsChanged, this, &CAudioDeviceVolumeSetupComponent::onReceivingCallsignsChanged, Qt::QueuedConnection); Q_ASSERT(c); - c = connect(sGui->getCContextAudioBase(), &CContextAudioBase::updatedFromOwnAircraftCockpit, this, &CAudioDeviceVolumeSetupComponent::onUpdatedClientWithCockpitData, Qt::QueuedConnection); + c = connect(sGui->getCContextAudioBase()->afvClient(), &CAfvClient::updatedFromOwnAircraftCockpit, this, &CAudioDeviceVolumeSetupComponent::onUpdatedClientWithCockpitData, Qt::QueuedConnection); Q_ASSERT(c); this->onUpdatedClientWithCockpitData();