MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ cleanup_current_operation()

void MayaFlux::Kriya::TemporalActivation::cleanup_current_operation ( )
private

Cleans up the current operation, disconnecting the entity and resetting state.

This method is called when the timer completes its specified duration. It disconnects the currently active node/nodenetwork/buffer from the output channels or graphics syc, or active and resets internal state to allow new operations to be started.

Definition at line 164 of file Timers.cpp.

165{
166 switch (m_active_type) {
167 case ActiveType::NODE:
168 if (m_current_node) {
169 if (m_channels.empty()) {
171 }
172 for (auto channel : m_channels) {
173 if (m_current_node->is_used_by_channel(channel)) {
175 }
176 }
177 m_current_node = nullptr;
178 m_channels.clear();
179 }
180 break;
181
183 if (m_current_network) {
184 for (const auto& ch : m_channels) {
185 m_current_network->remove_channel_usage(ch);
186 }
187
189 m_current_network = nullptr;
190 }
191 break;
192
194 if (m_current_buffer) {
195 for (auto channel : m_channels) {
197 }
198 m_current_buffer = nullptr;
199 }
200 break;
201
202 case ActiveType::NONE:
203 break;
204 }
205
207}
void remove_buffer(const std::shared_ptr< Buffer > &buffer, ProcessingToken token, uint32_t channel=0)
Removes a buffer from a token.
Buffers::ProcessingToken m_buffer_token
The processing token associated with the currently active buffer.
Definition Timers.hpp:420
std::vector< uint32_t > m_channels
The output channels the current node is connected to.
Definition Timers.hpp:438
Nodes::ProcessingToken m_node_token
The processing token associated with the currently active node or buffer.
Definition Timers.hpp:411
std::shared_ptr< Buffers::Buffer > m_current_buffer
The currently active buffer being played.
Definition Timers.hpp:402
std::shared_ptr< Nodes::Network::NodeNetwork > m_current_network
The currently active network being played.
Definition Timers.hpp:393
Nodes::NodeGraphManager & m_node_graph_manager
Reference to the graph manager that manages processing nodes.
Definition Timers.hpp:359
std::shared_ptr< Nodes::Node > m_current_node
The currently active node being played.
Definition Timers.hpp:384
Buffers::BufferManager & m_buffer_manager
Reference to the buffer manager that manages processing buffers.
Definition Timers.hpp:367
void remove_network(const std::shared_ptr< Network::NodeNetwork > &network, ProcessingToken token)
Remove a network from a processing token.
RootNode & get_root_node(ProcessingToken token, unsigned int channel)
Gets or creates the root node for a specific token and channel.
void unregister_node(const std::shared_ptr< Node > &node)
Removes a node from this root node.
Definition RootNode.cpp:46

References BUFFER, MayaFlux::Nodes::NodeGraphManager::get_root_node(), m_active_type, m_buffer_manager, m_buffer_token, m_channels, m_current_buffer, m_current_network, m_current_node, m_node_graph_manager, m_node_token, NETWORK, NODE, NONE, MayaFlux::Buffers::BufferManager::remove_buffer(), MayaFlux::Nodes::NodeGraphManager::remove_network(), and MayaFlux::Nodes::RootNode::unregister_node().

Referenced by activate_buffer(), activate_network(), activate_node(), and cancel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: