Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
AudioStateMachineUtils Namespace Reference

Typedefs

using RawState = int
 

Functions

constexpr bool isDrainingState (RawState state)
 
constexpr RawState addDrainingFlag (RawState state)
 
constexpr RawState removeDrainingFlag (RawState state)
 
constexpr QAudio::State toAudioState (RawState state)
 
constexpr QAudio::Error toAudioError (RawState state)
 
constexpr RawState toRawState (QAudio::State state, QAudio::Error error=QAudio::NoError)
 
constexpr RawState setStateError (RawState state, QAudio::Error error)
 
template<typename... States>
constexpr auto makeStatesChecker (States... states)
 
template<typename T, typename Predicate, typename NewValueGetter>
bool multipleCompareExchange (std::atomic< T > &target, T &prevValue, Predicate predicate, NewValueGetter newValueGetter)
 

Variables

constexpr uint32_t AudioStateBitsCount = 8
 
constexpr RawState AudioStateMask = 0xFF
 
constexpr RawState AudioErrorMask = 0xFF00
 
constexpr RawState DrainingFlag = 0x10000
 

Typedef Documentation

◆ RawState

Definition at line 24 of file qaudiostatemachineutils_p.h.

Function Documentation

◆ addDrainingFlag()

RawState AudioStateMachineUtils::addDrainingFlag ( RawState state)
constexpr

Definition at line 40 of file qaudiostatemachineutils_p.h.

References DrainingFlag.

◆ isDrainingState()

bool AudioStateMachineUtils::isDrainingState ( RawState state)
constexpr

Definition at line 35 of file qaudiostatemachineutils_p.h.

References DrainingFlag.

◆ makeStatesChecker()

template<typename... States>
auto AudioStateMachineUtils::makeStatesChecker ( States... states)
constexpr

Definition at line 71 of file qaudiostatemachineutils_p.h.

References AudioStateMask, and DrainingFlag.

◆ multipleCompareExchange()

template<typename T, typename Predicate, typename NewValueGetter>
bool AudioStateMachineUtils::multipleCompareExchange ( std::atomic< T > & target,
T & prevValue,
Predicate predicate,
NewValueGetter newValueGetter )

Definition at line 82 of file qaudiostatemachineutils_p.h.

◆ removeDrainingFlag()

RawState AudioStateMachineUtils::removeDrainingFlag ( RawState state)
constexpr

Definition at line 45 of file qaudiostatemachineutils_p.h.

References DrainingFlag.

◆ setStateError()

RawState AudioStateMachineUtils::setStateError ( RawState state,
QAudio::Error error )
constexpr

Definition at line 65 of file qaudiostatemachineutils_p.h.

References AudioErrorMask.

◆ toAudioError()

QAudio::Error AudioStateMachineUtils::toAudioError ( RawState state)
constexpr

Definition at line 55 of file qaudiostatemachineutils_p.h.

References AudioErrorMask.

◆ toAudioState()

QAudio::State AudioStateMachineUtils::toAudioState ( RawState state)
constexpr

Definition at line 50 of file qaudiostatemachineutils_p.h.

References AudioStateMask.

◆ toRawState()

RawState AudioStateMachineUtils::toRawState ( QAudio::State state,
QAudio::Error error = QAudio::NoError )
constexpr

Definition at line 60 of file qaudiostatemachineutils_p.h.

Variable Documentation

◆ AudioErrorMask

RawState AudioStateMachineUtils::AudioErrorMask = 0xFF00
constexpr

Definition at line 28 of file qaudiostatemachineutils_p.h.

Referenced by setStateError(), and toAudioError().

◆ AudioStateBitsCount

uint32_t AudioStateMachineUtils::AudioStateBitsCount = 8
constexpr

Definition at line 26 of file qaudiostatemachineutils_p.h.

◆ AudioStateMask

RawState AudioStateMachineUtils::AudioStateMask = 0xFF
constexpr

Definition at line 27 of file qaudiostatemachineutils_p.h.

Referenced by makeStatesChecker(), and toAudioState().

◆ DrainingFlag

RawState AudioStateMachineUtils::DrainingFlag = 0x10000
constexpr