hydrogen 1.2.6
AudioEngineLocking Class Reference

AudioEngineLocking. More...

#include <AudioEngine.h>

Inheritance diagram for AudioEngineLocking:
PatternList

Public Member Functions

 AudioEngineLocking ()
 
void setNeedsLock (bool bNeedsLock)
 The audio processing thread can modify some PatternLists.
 

Protected Member Functions

void assertAudioEngineLocked (const QString &sClass, const char *sFunction, const QString &sMsg) const
 Assert that the AudioEngine lock is held if needed.
 

Private Attributes

bool m_bNeedsLock
 

Detailed Description

AudioEngineLocking.

This is a base class for shared data structures which may be modified by the AudioEngine. These should only be modified or trusted by a thread holding the AudioEngine lock.

Any class which implements a data structure which can be modified by the AudioEngine can inherit from this, and use the protected "assertLocked()" method to ensure that methods are called only with appropriate locking.

Checking is only done on debug builds.

Definition at line 726 of file AudioEngine.h.

Constructor & Destructor Documentation

◆ AudioEngineLocking()

AudioEngineLocking ( )
inline

Definition at line 750 of file AudioEngine.h.

Member Function Documentation

◆ assertAudioEngineLocked()

void assertAudioEngineLocked ( const QString & sClass,
const char * sFunction,
const QString & sMsg ) const
protected

Assert that the AudioEngine lock is held if needed.

Definition at line 3069 of file AudioEngine.cpp.

◆ setNeedsLock()

void setNeedsLock ( bool bNeedsLock)
inline

The audio processing thread can modify some PatternLists.

For these structures, the audio engine lock must be held for any thread to access them.

Definition at line 746 of file AudioEngine.h.

Field Documentation

◆ m_bNeedsLock

bool m_bNeedsLock
private

Definition at line 728 of file AudioEngine.h.