4#ifndef QAUDIOSTATEMACHINEUTILS_P_H
5#define QAUDIOSTATEMACHINEUTILS_P_H
47 return state & ~DrainingFlag;
70template <
typename...
States>
81template <
typename T,
typename Predicate,
typename NewValueGetter>
83 NewValueGetter newValueGetter)
86 if (
target.compare_exchange_strong(prevValue, newValueGetter(prevValue),
87 std::memory_order_acq_rel))
constexpr bool isDrainingState(RawState state)
constexpr uint32_t AudioStateBitsCount
constexpr auto makeStatesChecker(States... states)
constexpr RawState removeDrainingFlag(RawState state)
constexpr RawState DrainingFlag
constexpr RawState AudioStateMask
constexpr QAudio::State toAudioState(RawState state)
constexpr RawState setStateError(RawState state, QAudio::Error error)
constexpr RawState AudioErrorMask
constexpr RawState toRawState(QAudio::State state, QAudio::Error error=QAudio::NoError)
constexpr RawState addDrainingFlag(RawState state)
constexpr QAudio::Error toAudioError(RawState state)
bool multipleCompareExchange(std::atomic< T > &target, T &prevValue, Predicate predicate, NewValueGetter newValueGetter)
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error