Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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()

constexpr RawState AudioStateMachineUtils::addDrainingFlag ( RawState state)
constexpr

Definition at line 40 of file qaudiostatemachineutils_p.h.

References DrainingFlag, and state.

Referenced by QAudioStateMachine::stop().

+ Here is the caller graph for this function:

◆ isDrainingState()

constexpr bool AudioStateMachineUtils::isDrainingState ( RawState state)
constexpr

Definition at line 35 of file qaudiostatemachineutils_p.h.

References DrainingFlag, and state.

Referenced by QAudioStateMachine::getDrainedAndStopped(), QAudioStateMachine::Notifier::isDraining(), QAudioStateMachine::isDraining(), and QAudioStateMachine::onDrained().

+ Here is the caller graph for this function:

◆ makeStatesChecker()

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

Definition at line 71 of file qaudiostatemachineutils_p.h.

References AudioStateMask, DrainingFlag, and state.

Referenced by QAudioStateMachine::activateFromIdle(), QAudioStateMachine::resume(), QAudioStateMachine::start(), QAudioStateMachine::stop(), QAudioStateMachine::suspend(), and QAudioStateMachine::updateActiveOrIdle().

+ Here is the caller graph for this function:

◆ 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.

References predicate.

◆ removeDrainingFlag()

constexpr RawState AudioStateMachineUtils::removeDrainingFlag ( RawState state)
constexpr

Definition at line 45 of file qaudiostatemachineutils_p.h.

References state.

Referenced by QAudioStateMachine::onDrained().

+ Here is the caller graph for this function:

◆ setStateError()

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

Definition at line 65 of file qaudiostatemachineutils_p.h.

References AudioStateBitsCount, error, and state.

Referenced by QAudioStateMachine::setError().

+ Here is the caller graph for this function:

◆ toAudioError()

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

Definition at line 55 of file qaudiostatemachineutils_p.h.

References AudioErrorMask, AudioStateBitsCount, and state.

Referenced by QAudioStateMachine::error().

+ Here is the caller graph for this function:

◆ toAudioState()

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

Definition at line 50 of file qaudiostatemachineutils_p.h.

References AudioStateMask, and state.

Referenced by QAudioStateMachine::Notifier::audioState(), QAudioStateMachine::getDrainedAndStopped(), QAudioStateMachine::Notifier::prevAudioState(), QAudioStateMachine::state(), and QAudioStateMachine::stop().

+ Here is the caller graph for this function:

◆ toRawState()

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

Definition at line 60 of file qaudiostatemachineutils_p.h.

References AudioStateBitsCount, error, and state.

Referenced by QAudioStateMachine::activateFromIdle(), QAudioStateMachine::forceSetState(), QAudioStateMachine::resume(), QAudioStateMachine::start(), QAudioStateMachine::stop(), QAudioStateMachine::suspend(), and QAudioStateMachine::updateActiveOrIdle().

+ Here is the caller graph for this function:

Variable Documentation

◆ AudioErrorMask

constexpr RawState AudioStateMachineUtils::AudioErrorMask = 0xFF00
constexpr

Definition at line 28 of file qaudiostatemachineutils_p.h.

Referenced by toAudioError().

◆ AudioStateBitsCount

constexpr uint32_t AudioStateMachineUtils::AudioStateBitsCount = 8
constexpr

Definition at line 26 of file qaudiostatemachineutils_p.h.

Referenced by setStateError(), toAudioError(), and toRawState().

◆ AudioStateMask

constexpr RawState AudioStateMachineUtils::AudioStateMask = 0xFF
constexpr

Definition at line 27 of file qaudiostatemachineutils_p.h.

Referenced by makeStatesChecker(), and toAudioState().

◆ DrainingFlag

constexpr RawState AudioStateMachineUtils::DrainingFlag = 0x10000
constexpr

Definition at line 29 of file qaudiostatemachineutils_p.h.

Referenced by addDrainingFlag(), isDrainingState(), and makeStatesChecker().