Overte C++ Documentation
AudioSolo.h
1 //
2 // AudioSolo.h
3 // libraries/audio/src
4 //
5 // Created by Clement Brisset on 11/5/18.
6 // Copyright 2018 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #pragma once
13 
14 #ifndef hifi_AudioSolo_h
15 #define hifi_AudioSolo_h
16 
17 #include <mutex>
18 
19 #include <QSet>
20 #include <QUuid>
21 
22 class AudioSolo {
23  using Mutex = std::recursive_mutex;
24  using Lock = std::unique_lock<Mutex>;
25 
26 public:
27  bool isSoloing() const;
28  QVector<QUuid> getUUIDs() const;
29  void addUUIDs(QVector<QUuid> uuidList);
30  void removeUUIDs(QVector<QUuid> uuidList);
31  void reset();
32 
33  void resend();
34 
35 private:
36  mutable Mutex _mutex;
37  QSet<QUuid> _nodesSoloed;
38 };
39 
40 #endif // hifi_AudioSolo_h