mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 15:43:24 +02:00
Resend solo nodes on mixer reconnect
This commit is contained in:
parent
b8cb433fa1
commit
65a83cb026
3 changed files with 17 additions and 1 deletions
|
@ -284,6 +284,11 @@ AudioClient::AudioClient() :
|
|||
connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, [this] {
|
||||
_solo.reset();
|
||||
});
|
||||
connect(nodeList.data(), &NodeList::nodeAdded, this, [this](SharedNodePointer node) {
|
||||
if (node->getType() == NodeType::AudioMixer) {
|
||||
_solo.resend();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
AudioClient::~AudioClient() {
|
||||
|
|
|
@ -72,6 +72,15 @@ void AudioSolo::removeUUIDs(QVector<QUuid> uuidList) {
|
|||
}
|
||||
|
||||
void AudioSolo::reset() {
|
||||
Lock lock(_mutex);
|
||||
removeUUIDs(getUUIDs());
|
||||
}
|
||||
|
||||
|
||||
void AudioSolo::resend() {
|
||||
Lock lock(_mutex);
|
||||
auto uuids = getUUIDs();
|
||||
_nodesSoloed.clear();
|
||||
addUUIDs(uuids);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <QUuid>
|
||||
|
||||
class AudioSolo {
|
||||
using Mutex = std::mutex;
|
||||
using Mutex = std::recursive_mutex;
|
||||
using Lock = std::unique_lock<Mutex>;
|
||||
|
||||
public:
|
||||
|
@ -30,6 +30,8 @@ public:
|
|||
void removeUUIDs(QVector<QUuid> uuidList);
|
||||
void reset();
|
||||
|
||||
void resend();
|
||||
|
||||
private:
|
||||
mutable Mutex _mutex;
|
||||
QSet<QUuid> _nodesSoloed;
|
||||
|
|
Loading…
Reference in a new issue