|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Kriya::NodeTimer::play_with_processing | ( | std::shared_ptr< Nodes::Node > | node, |
| std::function< void(std::shared_ptr< Nodes::Node >)> | setup_func, | ||
| std::function< void(std::shared_ptr< Nodes::Node >)> | cleanup_func, | ||
| double | duration_seconds, | ||
| std::vector< uint32_t > | channels | ||
| ) |
Activates a processing node with custom setup and cleanup functions.
| node | The processing node to activate |
| setup_func | Function to call before activating the node |
| cleanup_func | Function to call after deactivating the node |
| duration_seconds | How long to keep the node active (in seconds) |
| channels | The output channel to connect the node to |
| channel | The output channel to connect the node to (single-channel overload) |
This method provides more control over the node activation process by allowing custom setup and cleanup functions. The setup function is called before connecting the node, and the cleanup function is called after disconnecting it.
This is useful for more complex scenarios where additional setup or cleanup steps are needed, such as configuring node parameters or managing resources.
If a node is already active, it is deactivated before starting the new one.
Definition at line 133 of file Timers.cpp.
References MayaFlux::Nodes::NodeGraphManager::add_to_root(), cancel(), cleanup_current_operation(), m_channels, m_current_node, m_node_graph_manager, m_timer, MayaFlux::Kriya::Timer::schedule(), and token.
Referenced by play_with_processing(), and play_with_processing().
Here is the call graph for this function:
Here is the caller graph for this function: