Ardour  9.0-pre0-439-ga53b99b307
ARDOUR::Graph Class Reference

#include <graph.h>

Inheritance diagram for ARDOUR::Graph:
[legend]

Public Member Functions

 Graph (Session &session)
 
int process_routes (std::shared_ptr< GraphChain > chain, pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool &need_butler)
 
int routes_no_roll (std::shared_ptr< GraphChain > chain, pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool non_rt_pending)
 
int silence_routes (std::shared_ptr< GraphChain > chain, pframes_t nframes)
 
int process_io_plugs (std::shared_ptr< GraphChain > chain, pframes_t nframes, samplepos_t start_sample)
 
bool in_process_thread () const
 
uint32_t n_threads () const
 
void trigger (ProcessNode *n)
 
void reached_terminal_node ()
 
void process_one_route (Route *route)
 
void process_one_ioplug (IOPlug *)
 
void process_tasklist (RTTaskList const &)
 
- Public Member Functions inherited from ARDOUR::SessionHandleRef
 SessionHandleRef (ARDOUR::Session &s)
 
virtual ~SessionHandleRef ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
 ScopedConnectionList (const ScopedConnectionList &)=delete
 
ScopedConnectionListoperator= (const ScopedConnectionList &)=delete
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Protected Member Functions

virtual void session_going_away ()
 
- Protected Member Functions inherited from ARDOUR::SessionHandleRef
virtual void insanity_check ()
 

Private Types

enum  ProcessMode { Roll , NoRoll , Silence }
 

Private Member Functions

void reset_thread_list ()
 
void drop_threads ()
 
void run_one ()
 
void main_thread ()
 
void prep ()
 
void helper_thread ()
 
void engine_stopped ()
 

Private Attributes

PBD::MPMCQueue< ProcessNode * > _trigger_queue
 nodes that can be processed More...
 
std::atomic< uint32_t > _trigger_queue_size
 number of entries in trigger-queue More...
 
PBD::Semaphore _execution_sem
 
std::atomic< uint32_t > _idle_thread_cnt
 
PBD::Semaphore _callback_start_sem
 
PBD::Semaphore _callback_done_sem
 
std::atomic< uint32_t > _terminal_refcnt
 
bool _graph_empty
 
std::atomic< uint32_t > _n_workers
 
std::atomic< int > _terminate
 
GraphChain const * _graph_chain
 
pframes_t _process_nframes
 
samplepos_t _process_start_sample
 
samplepos_t _process_end_sample
 
bool _process_non_rt_pending
 
enum ARDOUR::Graph::ProcessMode _process_mode
 
int _process_retval
 
bool _process_need_butler
 
PBD::ScopedConnectionList engine_connections
 

Additional Inherited Members

- Protected Attributes inherited from ARDOUR::SessionHandleRef
ARDOUR::Session_session
 

Detailed Description

Definition at line 71 of file graph.h.

Member Enumeration Documentation

◆ ProcessMode

Enumerator
Roll 
NoRoll 
Silence 

Definition at line 141 of file graph.h.

Constructor & Destructor Documentation

◆ Graph()

ARDOUR::Graph::Graph ( Session session)

Member Function Documentation

◆ drop_threads()

void ARDOUR::Graph::drop_threads ( )
private

◆ engine_stopped()

void ARDOUR::Graph::engine_stopped ( )
private

◆ helper_thread()

void ARDOUR::Graph::helper_thread ( )
private

◆ in_process_thread()

bool ARDOUR::Graph::in_process_thread ( ) const

◆ main_thread()

void ARDOUR::Graph::main_thread ( )
private

◆ n_threads()

uint32_t ARDOUR::Graph::n_threads ( ) const

◆ prep()

void ARDOUR::Graph::prep ( )
private

◆ process_io_plugs()

int ARDOUR::Graph::process_io_plugs ( std::shared_ptr< GraphChain chain,
pframes_t  nframes,
samplepos_t  start_sample 
)

◆ process_one_ioplug()

void ARDOUR::Graph::process_one_ioplug ( IOPlug )

◆ process_one_route()

void ARDOUR::Graph::process_one_route ( Route route)

◆ process_routes()

int ARDOUR::Graph::process_routes ( std::shared_ptr< GraphChain chain,
pframes_t  nframes,
samplepos_t  start_sample,
samplepos_t  end_sample,
bool &  need_butler 
)

◆ process_tasklist()

void ARDOUR::Graph::process_tasklist ( RTTaskList const &  )

◆ reached_terminal_node()

void ARDOUR::Graph::reached_terminal_node ( )

◆ reset_thread_list()

void ARDOUR::Graph::reset_thread_list ( )
private

◆ routes_no_roll()

int ARDOUR::Graph::routes_no_roll ( std::shared_ptr< GraphChain chain,
pframes_t  nframes,
samplepos_t  start_sample,
samplepos_t  end_sample,
bool  non_rt_pending 
)

◆ run_one()

void ARDOUR::Graph::run_one ( )
private

◆ session_going_away()

virtual void ARDOUR::Graph::session_going_away ( )
protectedvirtual

Reimplemented from ARDOUR::SessionHandleRef.

◆ silence_routes()

int ARDOUR::Graph::silence_routes ( std::shared_ptr< GraphChain chain,
pframes_t  nframes 
)

◆ trigger()

void ARDOUR::Graph::trigger ( ProcessNode n)

Member Data Documentation

◆ _callback_done_sem

PBD::Semaphore ARDOUR::Graph::_callback_done_sem
private

Definition at line 119 of file graph.h.

◆ _callback_start_sem

PBD::Semaphore ARDOUR::Graph::_callback_start_sem
private

Signalled to start a run of the graph for a process callback

Definition at line 118 of file graph.h.

◆ _execution_sem

PBD::Semaphore ARDOUR::Graph::_execution_sem
private

Start worker threads

Definition at line 112 of file graph.h.

◆ _graph_chain

GraphChain const* ARDOUR::Graph::_graph_chain
private

Definition at line 133 of file graph.h.

◆ _graph_empty

bool ARDOUR::Graph::_graph_empty
private

Definition at line 124 of file graph.h.

◆ _idle_thread_cnt

std::atomic<uint32_t> ARDOUR::Graph::_idle_thread_cnt
private

The number of processing threads that are asleep

Definition at line 115 of file graph.h.

◆ _n_workers

std::atomic<uint32_t> ARDOUR::Graph::_n_workers
private

Definition at line 127 of file graph.h.

◆ _process_end_sample

samplepos_t ARDOUR::Graph::_process_end_sample
private

Definition at line 138 of file graph.h.

◆ _process_mode

enum ARDOUR::Graph::ProcessMode ARDOUR::Graph::_process_mode
private

◆ _process_need_butler

bool ARDOUR::Graph::_process_need_butler
private

Definition at line 146 of file graph.h.

◆ _process_nframes

pframes_t ARDOUR::Graph::_process_nframes
private

Definition at line 136 of file graph.h.

◆ _process_non_rt_pending

bool ARDOUR::Graph::_process_non_rt_pending
private

Definition at line 139 of file graph.h.

◆ _process_retval

int ARDOUR::Graph::_process_retval
private

Definition at line 145 of file graph.h.

◆ _process_start_sample

samplepos_t ARDOUR::Graph::_process_start_sample
private

Definition at line 137 of file graph.h.

◆ _terminal_refcnt

std::atomic<uint32_t> ARDOUR::Graph::_terminal_refcnt
private

The number of unprocessed nodes that do not feed any other node; updated during processing

Definition at line 122 of file graph.h.

◆ _terminate

std::atomic<int> ARDOUR::Graph::_terminate
private

Definition at line 130 of file graph.h.

◆ _trigger_queue

PBD::MPMCQueue<ProcessNode*> ARDOUR::Graph::_trigger_queue
private

nodes that can be processed

Definition at line 108 of file graph.h.

◆ _trigger_queue_size

std::atomic<uint32_t> ARDOUR::Graph::_trigger_queue_size
private

number of entries in trigger-queue

Definition at line 109 of file graph.h.

◆ engine_connections

PBD::ScopedConnectionList ARDOUR::Graph::engine_connections
private

Definition at line 149 of file graph.h.


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