mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 14:03:17 +02:00
NotFinished never should have had its own bit
Since there is a Finished flag too. So now, it is just 0, used as a starting point, and we check for !hasState(Finished). <sigh>
This commit is contained in:
parent
dc6ab167e4
commit
df615b1503
1 changed files with 6 additions and 12 deletions
|
@ -34,11 +34,11 @@ class AudioInjectorManager;
|
|||
|
||||
|
||||
enum class AudioInjectorState : uint8_t {
|
||||
NotFinished = 1,
|
||||
Finished = 2,
|
||||
PendingDelete = 4,
|
||||
LocalInjectionFinished = 8,
|
||||
NetworkInjectionFinished = 16
|
||||
NotFinished = 0,
|
||||
Finished = 1,
|
||||
PendingDelete = 2,
|
||||
LocalInjectionFinished = 4,
|
||||
NetworkInjectionFinished = 8
|
||||
};
|
||||
|
||||
AudioInjectorState operator& (AudioInjectorState lhs, AudioInjectorState rhs);
|
||||
|
@ -50,12 +50,6 @@ class AudioInjector : public QObject {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static const uint8_t NotFinished = 1;
|
||||
static const uint8_t Finished = 2;
|
||||
static const uint8_t PendingDelete = 4;
|
||||
static const uint8_t LocalInjectionFinished = 8;
|
||||
static const uint8_t NetworkInjectionFinished = 16;
|
||||
|
||||
AudioInjector(QObject* parent);
|
||||
AudioInjector(const Sound& sound, const AudioInjectorOptions& injectorOptions);
|
||||
AudioInjector(const QByteArray& audioData, const AudioInjectorOptions& injectorOptions);
|
||||
|
@ -90,7 +84,7 @@ public slots:
|
|||
void setOptions(const AudioInjectorOptions& options);
|
||||
|
||||
float getLoudness() const { return _loudness; }
|
||||
bool isPlaying() const { return stateHas(AudioInjectorState::NotFinished); }
|
||||
bool isPlaying() const { return !stateHas(AudioInjectorState::Finished); }
|
||||
void finish();
|
||||
void finishLocalInjection();
|
||||
void finishNetworkInjection();
|
||||
|
|
Loading…
Reference in a new issue