mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 22:08:27 +02:00
don't use unneeded atomic for AudioInjector State
This commit is contained in:
parent
5dc48dc9dc
commit
62b218632d
2 changed files with 3 additions and 3 deletions
|
@ -47,8 +47,8 @@ AudioInjector::AudioInjector(const QByteArray& audioData, const AudioInjectorOpt
|
|||
}
|
||||
|
||||
void AudioInjector::finish() {
|
||||
State oldState = std::atomic_exchange(&_state, State::Finished);
|
||||
bool shouldDelete = (oldState == State::NotFinishedWithPendingDelete);
|
||||
bool shouldDelete = (_state == State::NotFinishedWithPendingDelete);
|
||||
_state = State::Finished;
|
||||
|
||||
emit finished();
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ private:
|
|||
|
||||
QByteArray _audioData;
|
||||
AudioInjectorOptions _options;
|
||||
std::atomic<State> _state { State::NotFinished };
|
||||
State _state { State::NotFinished };
|
||||
bool _hasSetup = false;
|
||||
bool _shouldStop = false;
|
||||
float _loudness = 0.0f;
|
||||
|
|
Loading…
Reference in a new issue