mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +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
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user