Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
RealtimeEffectManager::ProcessScope Class Reference

Object whose lifetime encompasses one block of processing in one thread. More...

#include <RealtimeEffectManager.h>

Collaboration diagram for RealtimeEffectManager::ProcessScope:
[legend]

Public Member Functions

 ProcessScope (AudacityProject *pProject)
 
 ProcessScope (ProcessScope &&other)
 
ProcessScopeoperator= (ProcessScope &&other)
 
 ~ProcessScope ()
 
size_t Process (Track *track, float **buffers, size_t numSamples)
 

Private Attributes

AudacityProjectmpProject = nullptr
 

Detailed Description

Object whose lifetime encompasses one block of processing in one thread.

Definition at line 87 of file RealtimeEffectManager.h.

Constructor & Destructor Documentation

◆ ProcessScope() [1/2]

RealtimeEffectManager::ProcessScope::ProcessScope ( AudacityProject pProject)
inlineexplicit

Definition at line 89 of file RealtimeEffectManager.h.

90 : mpProject{ pProject }
91 {
92 if (mpProject)
93 Get(*mpProject).ProcessStart();
94 }
static RealtimeEffectManager & Get(AudacityProject &project)

References BasicUI::Get().

Here is the call graph for this function:

◆ ProcessScope() [2/2]

RealtimeEffectManager::ProcessScope::ProcessScope ( ProcessScope &&  other)
inline

Definition at line 95 of file RealtimeEffectManager.h.

96 : mpProject{ other.mpProject }
97 {
98 other.mpProject = nullptr;
99 }

◆ ~ProcessScope()

RealtimeEffectManager::ProcessScope::~ProcessScope ( )
inline

Definition at line 107 of file RealtimeEffectManager.h.

108 {
109 if (mpProject)
110 Get(*mpProject).ProcessEnd();
111 }

References BasicUI::Get().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

ProcessScope & RealtimeEffectManager::ProcessScope::operator= ( ProcessScope &&  other)
inline

Definition at line 100 of file RealtimeEffectManager.h.

101 {
102 auto pProject = other.mpProject;
103 other.mpProject = nullptr;
104 mpProject = pProject;
105 return *this;
106 }

References mpProject.

◆ Process()

size_t RealtimeEffectManager::ProcessScope::Process ( Track track,
float **  buffers,
size_t  numSamples 
)
inline

Definition at line 113 of file RealtimeEffectManager.h.

114 {
115 if (mpProject)
116 return Get(*mpProject)
117 .Process(track, buffers, numSamples);
118 else
119 return numSamples; // consider them trivially processed
120 }
size_t Process(Track *track, float **buffers, size_t numSamples)

References BasicUI::Get().

Here is the call graph for this function:

Member Data Documentation

◆ mpProject

AudacityProject* RealtimeEffectManager::ProcessScope::mpProject = nullptr
private

Definition at line 123 of file RealtimeEffectManager.h.

Referenced by operator=().


The documentation for this class was generated from the following file: