|
MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Kriya::TemporalActivation::activate_buffer | ( | const std::shared_ptr< Buffers::Buffer > & | buffer, |
| double | duration_seconds, | ||
| Buffers::ProcessingToken | token = Buffers::ProcessingToken::AUDIO_BACKEND, |
||
| uint32_t | channel = 0 |
||
| ) |
Activates a buffer for a specified duration.
| buffer | The buffer to activate |
| token | The processing token associated with the buffer |
| duration_seconds | The duration to keep the buffer active (in seconds) |
| channel | Optional output channel to connect the buffer to (default is 0) This method activates the specified buffer by connecting it to the output channel, and starts a timer for the specified duration. When the timer expires, the buffer is automatically disconnected from the output channel, effectively deactivating it. |
If another node, network, or buffer is already active, it will be cancelled before activating the new one.
Definition at line 129 of file Timers.cpp.
References MayaFlux::Buffers::BufferManager::add_buffer(), BUFFER, cancel(), cleanup_current_operation(), m_active_type, m_buffer_manager, m_buffer_token, m_channels, m_current_buffer, m_timer, and MayaFlux::Kriya::Timer::schedule().
Here is the call graph for this function: