[AFV] Ref T739, use the Audio base class with the shared CAfvClient functions

This commit is contained in:
Klaus Basan
2019-10-16 12:40:10 +02:00
parent 383352f79c
commit 8d956436e7
11 changed files with 62 additions and 61 deletions

View File

@@ -81,7 +81,7 @@ namespace BlackCore
CContextOwnAircraft *CContextOwnAircraft::registerWithDBus(CDBusServer *server)
{
if (!server || m_mode != CCoreFacadeConfig::LocalInDBusServer) return this;
if (!server || m_mode != CCoreFacadeConfig::LocalInDBusServer) { return this; }
server->addObject(IContextOwnAircraft::ObjectPath(), this);
return this;
}
@@ -418,7 +418,8 @@ namespace BlackCore
void CContextOwnAircraft::setAudioOutputVolume(int outputVolume)
{
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << outputVolume; }
if (this->getIContextAudio()) this->getIContextAudio()->setVoiceOutputVolume(outputVolume);
CContextAudioBase *audio = qobject_cast<CContextAudioBase *>(this->getIContextAudio());
if (audio) { audio->setVoiceOutputVolume(outputVolume); }
}
void CContextOwnAircraft::xCtxChangedAtcStationOnlineConnectionStatus(const CAtcStation &atcStation, bool connected)