Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
RealtimeEffects::ProcessingScope Class Reference

Brackets one block of processing in one thread. More...

#include <RealtimeEffectManager.h>

Collaboration diagram for RealtimeEffects::ProcessingScope:
[legend]

Public Member Functions

 ProcessingScope (InitializationScope &, std::weak_ptr< AudacityProject > wProject)
 Require a prior InializationScope to ensure correct nesting. More...
 
 ProcessingScope (ProcessingScope &&other)=default
 
ProcessingScopeoperator= (ProcessingScope &&other)=default
 
 ~ProcessingScope ()
 
size_t Process (const ChannelGroup *group, float *const *buffers, float *const *scratch, float *dummy, unsigned nBuffers, size_t numSamples)
 

Private Attributes

std::weak_ptr< AudacityProjectmwProject
 
bool mSuspended {}
 

Detailed Description

Brackets one block of processing in one thread.

Definition at line 256 of file RealtimeEffectManager.h.

Constructor & Destructor Documentation

◆ ProcessingScope() [1/2]

RealtimeEffects::ProcessingScope::ProcessingScope ( InitializationScope ,
std::weak_ptr< AudacityProject wProject 
)
inlineexplicit

Require a prior InializationScope to ensure correct nesting.

Definition at line 259 of file RealtimeEffectManager.h.

261 : mwProject{ move(wProject) }
262 {
263 if (auto pProject = mwProject.lock())
265 }
static RealtimeEffectManager & Get(AudacityProject &project)
void ProcessStart(bool suspended)
std::weak_ptr< AudacityProject > mwProject

References RealtimeEffectManager::Get(), mSuspended, mwProject, and RealtimeEffectManager::ProcessStart().

Here is the call graph for this function:

◆ ProcessingScope() [2/2]

RealtimeEffects::ProcessingScope::ProcessingScope ( ProcessingScope &&  other)
default

◆ ~ProcessingScope()

RealtimeEffects::ProcessingScope::~ProcessingScope ( )
inline

Definition at line 268 of file RealtimeEffectManager.h.

269 {
270 if (auto pProject = mwProject.lock())
272 }
void ProcessEnd(bool suspended) noexcept

References RealtimeEffectManager::Get(), mSuspended, mwProject, and RealtimeEffectManager::ProcessEnd().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

ProcessingScope & RealtimeEffects::ProcessingScope::operator= ( ProcessingScope &&  other)
default

◆ Process()

size_t RealtimeEffects::ProcessingScope::Process ( const ChannelGroup group,
float *const *  buffers,
float *const *  scratch,
float *  dummy,
unsigned  nBuffers,
size_t  numSamples 
)
inline
Returns
how many samples to discard for latency
Parameters
nBuffershow many buffers; equal number of scratches
numSampleslength of each buffer

Definition at line 275 of file RealtimeEffectManager.h.

282 {
283 if (const auto pProject = mwProject.lock())
284 {
285 return RealtimeEffectManager::Get(*pProject)
286 .Process(mSuspended, group, buffers, scratch, dummy,
287 nBuffers, numSamples);
288 }
289 return 0; // consider them trivially processed
290 }
size_t Process(bool suspended, const ChannelGroup *group, float *const *buffers, float *const *scratch, float *dummy, unsigned nBuffers, size_t numSamples)

References RealtimeEffectManager::Get(), mSuspended, mwProject, and RealtimeEffectManager::Process().

Here is the call graph for this function:

Member Data Documentation

◆ mSuspended

bool RealtimeEffects::ProcessingScope::mSuspended {}
private

Definition at line 294 of file RealtimeEffectManager.h.

Referenced by Process(), ProcessingScope(), and ~ProcessingScope().

◆ mwProject

std::weak_ptr<AudacityProject> RealtimeEffects::ProcessingScope::mwProject
private

Definition at line 293 of file RealtimeEffectManager.h.

Referenced by Process(), ProcessingScope(), and ~ProcessingScope().


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