mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T730, removed voice room related funcions from audio context
This commit is contained in:
committed by
Mat Sutcliffe
parent
81ade55cb5
commit
6071e77b7f
@@ -21,6 +21,7 @@ namespace BlackCore
|
||||
{
|
||||
//! Audio Input Device
|
||||
//! \todo Settings classes to store hardware settings (hardware device)
|
||||
//! \deprecated will be removed as we use Qt classes now
|
||||
class BLACKCORE_EXPORT IAudioInputDevice : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -50,6 +51,7 @@ namespace BlackCore
|
||||
class BLACKCORE_EXPORT CAudioInputDeviceDummy : public IAudioInputDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CAudioInputDeviceDummy(QObject *parent = nullptr) : IAudioInputDevice(parent) {}
|
||||
@@ -102,6 +104,6 @@ namespace BlackCore
|
||||
//! Get output volume between 0 ... 300%
|
||||
virtual int getOutputVolume() const = 0;
|
||||
};
|
||||
}
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -11,20 +11,22 @@
|
||||
#ifndef BLACKCORE_CONTEXT_CONTEXTAUDIO_H
|
||||
#define BLACKCORE_CONTEXT_CONTEXTAUDIO_H
|
||||
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
#include "blackcore/context/context.h"
|
||||
#include "blackcore/corefacade.h"
|
||||
#include "blackcore/corefacadeconfig.h"
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voicesetup.h"
|
||||
#include "blackmisc/audio/ptt.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
#include "blackmisc/identifier.h"
|
||||
#include "blackmisc/network/userlist.h"
|
||||
#include "blackmisc/identifier.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
@@ -82,17 +84,13 @@ namespace BlackCore
|
||||
virtual ~IContextAudio() override {}
|
||||
|
||||
signals:
|
||||
//! Voice rooms changed
|
||||
//! \details the flag indicates, whether a room got connected or disconnected
|
||||
void changedVoiceRooms(const BlackMisc::Audio::CVoiceRoomList &voiceRooms, bool connected);
|
||||
|
||||
//! Voice room members changed
|
||||
void changedVoiceRoomMembers();
|
||||
|
||||
//! Audio volume changed
|
||||
//! \sa setVoiceOutputVolume
|
||||
void changedAudioVolume(int volume);
|
||||
|
||||
//! PTT status in a particular voice client
|
||||
void ptt(bool active, BlackMisc::Audio::PTTCOM pttcom, const BlackMisc::CIdentifier &identifier);
|
||||
|
||||
//! Mute changed
|
||||
void changedMute(bool muted);
|
||||
|
||||
@@ -103,17 +101,11 @@ namespace BlackCore
|
||||
void changedSelectedAudioDevices(const BlackMisc::Audio::CAudioDeviceInfoList &devices);
|
||||
|
||||
public slots:
|
||||
//! Set voice rooms
|
||||
virtual void setComVoiceRooms(const BlackMisc::Audio::CVoiceRoomList &voiceRooms) = 0;
|
||||
|
||||
//! Leave all voice rooms
|
||||
virtual void leaveAllVoiceRooms() = 0;
|
||||
|
||||
//! Room users
|
||||
virtual BlackMisc::Network::CUserList getRoomUsers(BlackMisc::Aviation::CComSystem::ComUnit comUnit) const = 0;
|
||||
|
||||
//! Audio devices
|
||||
//! Audio devices @{
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getAudioDevices() const = 0;
|
||||
BlackMisc::Audio::CAudioDeviceInfoList getAudioInputDevices() const { return this->getAudioDevices().getInputDevices(); }
|
||||
BlackMisc::Audio::CAudioDeviceInfoList getAudioOutputDevices() const { return this->getAudioDevices().getOutputDevices(); }
|
||||
//! @}
|
||||
|
||||
//! Audio runs where
|
||||
virtual BlackMisc::CIdentifier audioRunsWhere() const = 0;
|
||||
@@ -127,7 +119,7 @@ namespace BlackCore
|
||||
|
||||
//! Set current audio device
|
||||
//! \param audioDevice can be input or audio device
|
||||
virtual void setCurrentAudioDevice(const BlackMisc::Audio::CAudioDeviceInfo &audioDevice) = 0;
|
||||
virtual void setCurrentAudioDevices(const BlackMisc::Audio::CAudioDeviceInfo &inputDevice, const BlackMisc::Audio::CAudioDeviceInfo &outputDevice) = 0;
|
||||
|
||||
//! Set voice output volume (0..300)
|
||||
virtual void setVoiceOutputVolume(int volume) = 0;
|
||||
|
||||
@@ -32,28 +32,7 @@ namespace BlackCore
|
||||
CContextAudioEmpty(CCoreFacade *runtime) : IContextAudio(CCoreFacadeConfig::NotUsed, runtime) {}
|
||||
|
||||
public slots:
|
||||
//! \copydoc IContextAudio::setComVoiceRooms
|
||||
virtual void setComVoiceRooms(const BlackMisc::Audio::CVoiceRoomList &newRooms) override
|
||||
{
|
||||
Q_UNUSED(newRooms);
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::getRoomUsers()
|
||||
virtual BlackMisc::Network::CUserList getRoomUsers(BlackMisc::Aviation::CComSystem::ComUnit comUnitValue) const override
|
||||
{
|
||||
Q_UNUSED(comUnitValue);
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return BlackMisc::Network::CUserList();
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::leaveAllVoiceRooms
|
||||
virtual void leaveAllVoiceRooms() override
|
||||
{
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::audioRunsWhere()
|
||||
//! \copydoc IContextAudio::audioRunsWhere
|
||||
virtual BlackMisc::CIdentifier audioRunsWhere() const override
|
||||
{
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
@@ -61,31 +40,32 @@ namespace BlackCore
|
||||
return i;
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::getAudioDevices()
|
||||
//! \copydoc IContextAudio::getAudioDevices
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getAudioDevices() const override
|
||||
{
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return BlackMisc::Audio::CAudioDeviceInfoList();
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::getCurrentAudioDevices()
|
||||
//! \copydoc IContextAudio::getCurrentAudioDevices
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getCurrentAudioDevices() const override
|
||||
{
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return BlackMisc::Audio::CAudioDeviceInfoList();
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::setCurrentAudioDevice()
|
||||
virtual void setCurrentAudioDevice(const BlackMisc::Audio::CAudioDeviceInfo &audioDevice) override
|
||||
//! \copydoc IContextAudio::setCurrentAudioDevices
|
||||
virtual void setCurrentAudioDevices(const BlackMisc::Audio::CAudioDeviceInfo &inputDevice, const BlackMisc::Audio::CAudioDeviceInfo &outputDevice) override
|
||||
{
|
||||
Q_UNUSED(audioDevice);
|
||||
Q_UNUSED(inputDevice)
|
||||
Q_UNUSED(outputDevice)
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::setVoiceOutputVolume
|
||||
virtual void setVoiceOutputVolume(int volume) override
|
||||
{
|
||||
Q_UNUSED(volume);
|
||||
Q_UNUSED(volume)
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
@@ -99,7 +79,7 @@ namespace BlackCore
|
||||
//! \copydoc IContextAudio::setMute
|
||||
virtual void setMute(bool muted) override
|
||||
{
|
||||
Q_UNUSED(muted);
|
||||
Q_UNUSED(muted)
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
@@ -113,23 +93,23 @@ namespace BlackCore
|
||||
//! \copydoc IContextAudio::playSelcalTone()
|
||||
virtual void playSelcalTone(const BlackMisc::Aviation::CSelcal &selcal) override
|
||||
{
|
||||
Q_UNUSED(selcal);
|
||||
Q_UNUSED(selcal)
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::playNotification()
|
||||
virtual void playNotification(BlackMisc::Audio::CNotificationSounds::NotificationFlag notification, bool considerSettings, int volume = -1) override
|
||||
{
|
||||
Q_UNUSED(volume);
|
||||
Q_UNUSED(notification);
|
||||
Q_UNUSED(considerSettings);
|
||||
Q_UNUSED(volume)
|
||||
Q_UNUSED(notification)
|
||||
Q_UNUSED(considerSettings)
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::enableAudioLoopback()
|
||||
virtual void enableAudioLoopback(bool enable = true) override
|
||||
{
|
||||
Q_UNUSED(enable);
|
||||
Q_UNUSED(enable)
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
@@ -143,8 +123,8 @@ namespace BlackCore
|
||||
//! \copydoc IContextAudio::parseCommandLine
|
||||
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) override
|
||||
{
|
||||
Q_UNUSED(commandLine);
|
||||
Q_UNUSED(originator);
|
||||
Q_UNUSED(commandLine)
|
||||
Q_UNUSED(originator)
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return false;
|
||||
}
|
||||
@@ -159,7 +139,7 @@ namespace BlackCore
|
||||
//! \copydoc IContextAudio::setVoiceSetup
|
||||
virtual void setVoiceSetup(const BlackMisc::Audio::CVoiceSetup &setup) override
|
||||
{
|
||||
Q_UNUSED(setup);
|
||||
Q_UNUSED(setup)
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "blackcore/context/contextaudioproxy.h"
|
||||
#include "blackmisc/audio/ptt.h"
|
||||
#include "blackmisc/dbus.h"
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#include "blackmisc/genericdbusinterface.h"
|
||||
@@ -36,7 +37,7 @@ namespace BlackCore
|
||||
// connect signals, asserts when failures
|
||||
QDBusConnection con = QDBusConnection::sessionBus();
|
||||
CContextAudioProxy c(CDBusServer::coreServiceName(), con, CCoreFacadeConfig::Remote, nullptr);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
}
|
||||
|
||||
void CContextAudioProxy::relaySignals(const QString &serviceName, QDBusConnection &connection)
|
||||
@@ -59,22 +60,14 @@ namespace BlackCore
|
||||
s = connection.connect(serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(),
|
||||
"changedSelectedAudioDevices", this, SIGNAL(changedSelectedAudioDevices(BlackMisc::Audio::CAudioDeviceInfoList)));
|
||||
Q_ASSERT(s);
|
||||
|
||||
Q_UNUSED(s);
|
||||
s = connection.connect(serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(),
|
||||
"ptt", this, SIGNAL(ptt(bool, BlackMisc::Audio::PTTCOM, BlackMisc::CIdentifier)));
|
||||
Q_ASSERT(s);
|
||||
Q_UNUSED(s)
|
||||
|
||||
this->relayBaseClassSignals(serviceName, connection, IContextAudio::ObjectPath(), IContextAudio::InterfaceName());
|
||||
}
|
||||
|
||||
void CContextAudioProxy::leaveAllVoiceRooms()
|
||||
{
|
||||
this->m_dBusInterface->callDBus(QLatin1String("leaveAllVoiceRooms"));
|
||||
}
|
||||
|
||||
BlackMisc::Network::CUserList CContextAudioProxy::getRoomUsers(CComSystem::ComUnit comUnitValue) const
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<CUserList>(QLatin1String("getRoomUsers"), comUnitValue);
|
||||
}
|
||||
|
||||
CAudioDeviceInfoList CContextAudioProxy::getAudioDevices() const
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<CAudioDeviceInfoList>(QLatin1String("getAudioDevices"));
|
||||
@@ -90,14 +83,9 @@ namespace BlackCore
|
||||
return this->m_dBusInterface->callDBusRet<CAudioDeviceInfoList>(QLatin1String("getCurrentAudioDevices"));
|
||||
}
|
||||
|
||||
void CContextAudioProxy::setCurrentAudioDevice(const CAudioDeviceInfo &audioDevice)
|
||||
void CContextAudioProxy::setCurrentAudioDevices(const CAudioDeviceInfo &inputDevice, const CAudioDeviceInfo &outputDevice)
|
||||
{
|
||||
this->m_dBusInterface->callDBus(QLatin1String("setCurrentAudioDevice"), audioDevice);
|
||||
}
|
||||
|
||||
void CContextAudioProxy::setComVoiceRooms(const CVoiceRoomList &voiceRooms)
|
||||
{
|
||||
this->m_dBusInterface->callDBus(QLatin1String("setComVoiceRooms"), voiceRooms);
|
||||
this->m_dBusInterface->callDBus(QLatin1String("setCurrentAudioDevices"), inputDevice, outputDevice);
|
||||
}
|
||||
|
||||
void CContextAudioProxy::playSelcalTone(const CSelcal &selcal)
|
||||
|
||||
@@ -63,13 +63,10 @@ namespace BlackCore
|
||||
// interface overrides
|
||||
//! \publicsection
|
||||
//! @{
|
||||
virtual void setComVoiceRooms(const BlackMisc::Audio::CVoiceRoomList &voiceRooms) override;
|
||||
virtual BlackMisc::Network::CUserList getRoomUsers(BlackMisc::Aviation::CComSystem::ComUnit comUnitValue) const override;
|
||||
virtual void leaveAllVoiceRooms() override;
|
||||
virtual BlackMisc::CIdentifier audioRunsWhere() const override;
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getAudioDevices() const override;
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getCurrentAudioDevices() const override;
|
||||
virtual void setCurrentAudioDevice(const BlackMisc::Audio::CAudioDeviceInfo &audioDevice) override;
|
||||
virtual void setCurrentAudioDevices(const BlackMisc::Audio::CAudioDeviceInfo &inputDevice, const BlackMisc::Audio::CAudioDeviceInfo &outputDevice) override;
|
||||
virtual void setVoiceOutputVolume(int volume) override;
|
||||
virtual int getVoiceOutputVolume() const override;
|
||||
virtual void setMute(bool muted) override;
|
||||
|
||||
@@ -287,12 +287,10 @@ namespace BlackCore
|
||||
if (m_contextAudio && m_contextAudio->isUsingImplementingObject())
|
||||
{
|
||||
Q_ASSERT(m_contextApplication);
|
||||
c = connect(m_contextApplication, &IContextApplication::fakedSetComVoiceRoom, this->getCContextAudio(), &CContextAudio::setComVoiceRooms, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
times.insert("Post setup, connects audio", time.restart());
|
||||
c = connect(m_contextNetwork, &IContextNetwork::connectionStatusChanged,
|
||||
this->getCContextAudio(), &CContextAudio::xCtxNetworkConnectionStatusChanged, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
times.insert("Post setup, connects audio", time.restart());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>307</width>
|
||||
<width>227</width>
|
||||
<height>254</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -14,46 +14,15 @@
|
||||
<string>Audio setup</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="le_Info">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>extra info goes here</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="cb_DisableAudioEffects">
|
||||
<property name="text">
|
||||
<string>Disable realistic audio simulation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioLoopback">
|
||||
<property name="text">
|
||||
<string>Loopback, test sound in- to output</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="11" column="1">
|
||||
<widget class="QProgressBar" name="pb_LevelOut">
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Info">
|
||||
<property name="text">
|
||||
<string>Info</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QSlider" name="hs_VolumeIn">
|
||||
<item row="10" column="1">
|
||||
<widget class="QSlider" name="hs_VolumeOut">
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
@@ -69,10 +38,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="cb_SetupAudioOutputDevice">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
<item row="8" column="1">
|
||||
<widget class="QSlider" name="hs_VolumeIn">
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -83,52 +55,79 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lbl_VolumeIn">
|
||||
<property name="text">
|
||||
<string>In</string>
|
||||
</property>
|
||||
<item row="7" column="1">
|
||||
<widget class="QWidget" name="wi_TestAudio" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_TestAudio">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_SetupAudioLoopback">
|
||||
<property name="text">
|
||||
<string>Loopback, test sound in- to output</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cb_SetupAudioInputDevice">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="lbl_SetupAudioLoopback">
|
||||
<property name="text">
|
||||
<string>Test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QProgressBar" name="pb_LevelIn">
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="lbl_VolumeOut">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Info">
|
||||
<property name="text">
|
||||
<string>Out</string>
|
||||
<string>Info</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QSlider" name="hs_VolumeOut">
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<item row="2" column="1">
|
||||
<widget class="QWidget" name="wi_InDevice" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_InDevice">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cb_SetupAudioInputDevice">
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="tb_RefreshInDevice">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/diagona/icons/diagona/icons/arrow-circle-135.png</normaloff>:/diagona/icons/diagona/icons/arrow-circle-135.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
@@ -171,6 +170,90 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QProgressBar" name="pb_LevelIn">
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="lbl_VolumeIn">
|
||||
<property name="text">
|
||||
<string>In</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QWidget" name="wi_OutDevice" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_OutDevice">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cb_SetupAudioOutputDevice"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="tb_RefreshOutDevice">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/diagona/icons/diagona/icons/arrow-circle-135.png</normaloff>:/diagona/icons/diagona/icons/arrow-circle-135.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="cb_DisableAudioEffects">
|
||||
<property name="text">
|
||||
<string>Disable realistic audio simulation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="le_Info">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>extra info goes here</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="lbl_VolumeOut">
|
||||
<property name="text">
|
||||
<string>Out</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QToolButton" name="tb_ResetInVolume">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QToolButton" name="tb_ResetOutVolume">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
@@ -180,7 +263,9 @@
|
||||
<tabstop>cb_2Tx</tabstop>
|
||||
<tabstop>cb_2Rec</tabstop>
|
||||
<tabstop>cb_SetupAudioInputDevice</tabstop>
|
||||
<tabstop>tb_RefreshInDevice</tabstop>
|
||||
<tabstop>cb_SetupAudioOutputDevice</tabstop>
|
||||
<tabstop>tb_RefreshOutDevice</tabstop>
|
||||
<tabstop>cb_DisableAudioEffects</tabstop>
|
||||
<tabstop>cb_SetupAudioLoopback</tabstop>
|
||||
<tabstop>hs_VolumeIn</tabstop>
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace BlackGui
|
||||
c = connect(ui->sb_NotificationValueVolume, qOverload<int>(&QSpinBox::valueChanged), this, &CAudioSetupComponent::onNotificationVolumeChanged);
|
||||
Q_ASSERT(c);
|
||||
}
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
}
|
||||
|
||||
CAudioSetupComponent::~CAudioSetupComponent()
|
||||
@@ -193,14 +193,14 @@ namespace BlackGui
|
||||
const CAudioDeviceInfoList inputDevices = devices.getInputDevices();
|
||||
if (index >= inputDevices.size()) { return; }
|
||||
selectedDevice = inputDevices[index];
|
||||
sGui->getIContextAudio()->setCurrentAudioDevice(selectedDevice);
|
||||
// sGui->getIContextAudio()->setCurrentAudioDevices(selectedDevice);
|
||||
}
|
||||
else if (sender == ui->cb_SetupAudioOutputDevice)
|
||||
{
|
||||
const CAudioDeviceInfoList outputDevices = devices.getOutputDevices();
|
||||
if (index >= outputDevices.size()) { return; }
|
||||
selectedDevice = outputDevices[index];
|
||||
sGui->getIContextAudio()->setCurrentAudioDevice(selectedDevice);
|
||||
// sGui->getIContextAudio()->setCurrentAudioDevices(selectedDevice);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace BlackGui
|
||||
connect(sGui->getIContextOwnAircraft(), &IContextOwnAircraft::changedSelcal, this, &CCockpitComComponent::updateSelcalFromContext, Qt::QueuedConnection);
|
||||
|
||||
// hook up with audio context
|
||||
connect(sGui->getIContextAudio(), &IContextAudio::changedVoiceRooms, this, &CCockpitComComponent::updateVoiceRoomStatusFromContext, Qt::QueuedConnection);
|
||||
// connect(sGui->getIContextAudio(), &IContextAudio::changedVoiceRooms, this, &CCockpitComComponent::updateVoiceRoomStatusFromContext, Qt::QueuedConnection);
|
||||
|
||||
// network
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::changedAtcStationsOnlineDigest, this, &CCockpitComComponent::onAtcStationsChanged, Qt::QueuedConnection);
|
||||
|
||||
@@ -241,7 +241,6 @@ namespace BlackGui
|
||||
else
|
||||
{
|
||||
// disconnect from network
|
||||
sGui->getIContextAudio()->leaveAllVoiceRooms();
|
||||
sGui->setExtraWindowTitle("");
|
||||
msg = sGui->getIContextNetwork()->disconnectFromNetwork();
|
||||
}
|
||||
|
||||
@@ -344,7 +344,6 @@ namespace BlackGui
|
||||
else
|
||||
{
|
||||
// disconnect from network
|
||||
sGui->getIContextAudio()->leaveAllVoiceRooms();
|
||||
sGui->setExtraWindowTitle("");
|
||||
msg = sGui->getIContextNetwork()->disconnectFromNetwork();
|
||||
}
|
||||
|
||||
@@ -134,7 +134,6 @@ namespace BlackGui
|
||||
else
|
||||
{
|
||||
// disconnect from network
|
||||
sGui->getIContextAudio()->leaveAllVoiceRooms();
|
||||
sGui->setExtraWindowTitle("");
|
||||
msg = sGui->getIContextNetwork()->disconnectFromNetwork();
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ namespace BlackGui
|
||||
connect(ui->cb_CockpitVoiceRoom2Override, &QCheckBox::toggled, this, &CVoiceRoomsComponent::onVoiceRoomOverrideChanged);
|
||||
connect(ui->le_CockpitVoiceRoomCom1, &QLineEdit::returnPressed, this, &CVoiceRoomsComponent::onVoiceRoomUrlsReturnPressed);
|
||||
connect(ui->le_CockpitVoiceRoomCom2, &QLineEdit::returnPressed, this, &CVoiceRoomsComponent::onVoiceRoomUrlsReturnPressed);
|
||||
connect(sGui->getIContextAudio(), &IContextAudio::changedVoiceRooms, this, &CVoiceRoomsComponent::updateAudioVoiceRoomsFromContext, Qt::QueuedConnection);
|
||||
connect(sGui->getIContextAudio(), &IContextAudio::changedVoiceRoomMembers, this, &CVoiceRoomsComponent::updateVoiceRoomMembers, Qt::QueuedConnection);
|
||||
// connect(sGui->getIContextAudio(), &IContextAudio::changedVoiceRooms, this, &CVoiceRoomsComponent::updateAudioVoiceRoomsFromContext, Qt::QueuedConnection);
|
||||
// connect(sGui->getIContextAudio(), &IContextAudio::changedVoiceRoomMembers, this, &CVoiceRoomsComponent::updateVoiceRoomMembers, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
CVoiceRoomsComponent::~CVoiceRoomsComponent()
|
||||
@@ -131,7 +131,7 @@ namespace BlackGui
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->getIContextAudio()) { return; }
|
||||
if (!ui->le_CockpitVoiceRoomCom1->text().trimmed().isEmpty())
|
||||
{
|
||||
ui->tvp_CockpitVoiceRoom1->updateContainer(sGui->getIContextAudio()->getRoomUsers(CComSystem::Com1));
|
||||
// ui->tvp_CockpitVoiceRoom1->updateContainer(sGui->getIContextAudio()->getRoomUsers(CComSystem::Com1));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -140,7 +140,7 @@ namespace BlackGui
|
||||
|
||||
if (!ui->le_CockpitVoiceRoomCom2->text().trimmed().isEmpty())
|
||||
{
|
||||
ui->tvp_CockpitVoiceRoom2->updateContainer(sGui->getIContextAudio()->getRoomUsers(CComSystem::Com2));
|
||||
// ui->tvp_CockpitVoiceRoom2->updateContainer(sGui->getIContextAudio()->getRoomUsers(CComSystem::Com2));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -123,7 +123,6 @@ void SwiftGuiStd::performGracefulShutdown()
|
||||
{
|
||||
if (m_contextAudioAvailable)
|
||||
{
|
||||
sGui->getIContextAudio()->leaveAllVoiceRooms();
|
||||
sGui->getIContextAudio()->disconnect(this); // break down signal / slots
|
||||
}
|
||||
sGui->getIContextNetwork()->disconnectFromNetwork();
|
||||
|
||||
Reference in New Issue
Block a user