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

◆ clear()

void MayaFlux::Kakshya::SoundStreamContainer::clear ( )
overridevirtual

Clear all data in the container.

Implements MayaFlux::Kakshya::NDDataContainer< DataVariant >.

Definition at line 290 of file SoundStreamContainer.cpp.

291{
292 {
293 Memory::SeqlockWriteGuard g(m_data_lock);
294 std::ranges::for_each(m_data, [](auto& vec) {
295 std::visit([](auto& v) { v.clear(); }, vec);
296 });
297 std::ranges::for_each(m_processed_data, [](auto& vec) {
298 std::visit([](auto& v) { v.clear(); }, vec);
299 });
300 m_num_frames = 0;
302 m_read_position = std::vector<std::atomic<uint64_t>>(m_num_channels);
303 for (auto& pos : m_read_position)
304 pos.store(0);
306 }
307
310}
std::vector< std::atomic< uint64_t > > m_read_position
void update_processing_state(ProcessingState new_state) override
Update the processing state of the container.
void invalidate_span_cache()
Invalidate the span cache when data or layout changes.
@ IDLE
Container is inactive with no data or not ready for processing.
std::shared_ptr< T > store(std::shared_ptr< T > obj)
Transfer ownership of an existing object to the persistent store for process lifetime.
Definition Persist.hpp:28

References MayaFlux::Kakshya::IDLE, invalidate_span_cache(), m_circular_write_position, m_data, m_data_lock, m_num_channels, m_num_frames, m_processed_data, m_read_position, setup_dimensions(), and update_processing_state().

+ Here is the call graph for this function: