mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Ref T609, allow to get COM unit from own aircraft context
This commit is contained in:
committed by
Mat Sutcliffe
parent
398f28fd9e
commit
9ba7dfee4d
@@ -713,6 +713,22 @@ namespace BlackCore
|
||||
this->setVoiceOutputVolume(v);
|
||||
}
|
||||
|
||||
CComSystem CContextAudio::getOwnComSystem(CComSystem::ComUnit unit) const
|
||||
{
|
||||
if (!this->getIContextOwnAircraft())
|
||||
{
|
||||
// context not available
|
||||
switch (unit)
|
||||
{
|
||||
case CComSystem::Com1: return CComSystem::getCom1System(122.800, 122.800);
|
||||
case CComSystem::Com2: return CComSystem::getCom2System(122.800, 122.800);
|
||||
default: break;
|
||||
}
|
||||
return CComSystem::getCom1System(122.800, 122.800);
|
||||
}
|
||||
return this->getIContextOwnAircraft()->getOwnComSystem(unit);
|
||||
}
|
||||
|
||||
QSharedPointer<IVoiceChannel> CContextAudio::getVoiceChannelBy(const CVoiceRoom &voiceRoom)
|
||||
{
|
||||
QSharedPointer<IVoiceChannel> voiceChannel;
|
||||
|
||||
@@ -167,6 +167,12 @@ namespace BlackCore
|
||||
void audioDecreaseVolume(bool enabled);
|
||||
//! @}
|
||||
|
||||
//! Get current COM unit from cockpit
|
||||
//! \remark cross context
|
||||
//! @{
|
||||
BlackMisc::Aviation::CComSystem getOwnComSystem(BlackMisc::Aviation::CComSystem::ComUnit unit) const;
|
||||
//! @}
|
||||
|
||||
//! Voice channel by room
|
||||
QSharedPointer<IVoiceChannel> getVoiceChannelBy(const BlackMisc::Audio::CVoiceRoom &voiceRoom);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user