Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2020-08-26 19:24:54 +0300
committerRobert Adam <dev@robert-adam.de>2020-08-31 17:07:41 +0300
commitccd5421bd460540a2708ab7672bd284515fbd4d5 (patch)
tree79d8198523b3ee7008f159789759df82e354ba51 /src/ChannelListener.cpp
parent7d8a8b40d966fb54d3b05e7ea40ef0efc20a6d66 (diff)
FEAT(talking-ui): Allow ChannelListeners to be shown
With this feature the ChannelListeners of the local user can optionally been shown in the TalkingUI (and thereby the channels they are in as well). This is kinda similar to the option that allows you to always see the local user in the UI.
Diffstat (limited to 'src/ChannelListener.cpp')
-rw-r--r--src/ChannelListener.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ChannelListener.cpp b/src/ChannelListener.cpp
index 64d2fbc18..d0e86a087 100644
--- a/src/ChannelListener.cpp
+++ b/src/ChannelListener.cpp
@@ -94,9 +94,17 @@ int ChannelListener::getListenedChannelCountForUserImpl(unsigned int userSession
#ifdef MUMBLE
void ChannelListener::setListenerLocalVolumeAdjustmentImpl(int channelID, float volumeAdjustment) {
- QWriteLocker lock(&m_volumeLock);
+ float oldValue;
+ {
+ QWriteLocker lock(&m_volumeLock);
- m_listenerVolumeAdjustments.insert(channelID, volumeAdjustment);
+ oldValue = m_listenerVolumeAdjustments.value(channelID, 1.0f);
+ m_listenerVolumeAdjustments.insert(channelID, volumeAdjustment);
+ }
+
+ if (oldValue != volumeAdjustment) {
+ emit localVolumeAdjustmentsChanged(channelID, volumeAdjustment, oldValue);
+ }
}
float ChannelListener::getListenerLocalVolumeAdjustmentImpl(int channelID) const {