MayaFlux 0.3.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 148 of file Timers.cpp.

149{
150 switch (m_active_type) {
151 case ActiveType::NODE:
152 if (m_current_node) {
153 if (m_channels.empty()) {
155 }
156 for (auto channel : m_channels) {
157 if (m_current_node->is_used_by_channel(channel)) {
159 }
160 }
161 m_current_node = nullptr;
162 m_channels.clear();
163 }
164 break;
165
167 if (m_current_network) {
168 for (const auto& ch : m_channels) {
169 m_current_network->remove_channel_usage(ch);
170 }
171
173 m_current_network = nullptr;
174 }
175 break;
176
178 if (m_current_buffer) {
179 for (auto channel : m_channels) {
181 }
182 m_current_buffer = nullptr;
183 }
184 break;
185
186 case ActiveType::NONE:
187 break;
188 }
189
191}
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:406
std::vector< uint32_t > m_channels
The output channels the current node is connected to.
Definition Timers.hpp:415
Nodes::ProcessingToken m_node_token
The processing token associated with the currently active node or buffer.
Definition Timers.hpp:397
std::shared_ptr< Buffers::Buffer > m_current_buffer
The currently active buffer being played.
Definition Timers.hpp:388
std::shared_ptr< Nodes::Network::NodeNetwork > m_current_network
The currently active network being played.
Definition Timers.hpp:379
Nodes::NodeGraphManager & m_node_graph_manager
Reference to the graph manager that manages processing nodes.
Definition Timers.hpp:345
std::shared_ptr< Nodes::Node > m_current_node
The currently active node being played.
Definition Timers.hpp:370
Buffers::BufferManager & m_buffer_manager
Reference to the buffer manager that manages processing buffers.
Definition Timers.hpp:353
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: