decoder/Thread: move code to DecoderControl::LockIsReplayGainEnabled()

This commit is contained in:
Max Kellermann
2022-07-08 16:19:40 +02:00
parent 666e5d7904
commit c0d5bd2048
2 changed files with 9 additions and 6 deletions

View File

@@ -257,6 +257,12 @@ public:
return HasFailed();
}
[[gnu::pure]]
bool LockIsReplayGainEnabled() const noexcept {
const std::scoped_lock<Mutex> protect(mutex);
return replay_gain_mode != ReplayGainMode::OFF;
}
/**
* Transition this obejct from DecoderState::START to
* DecoderState::DECODE.