MayaFlux 0.1.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.

Definition at line 311 of file SoundStreamContainer.cpp.

312{
313 std::unique_lock lock(m_data_mutex);
314
315 std::ranges::for_each(m_data, [](auto& vec) {
316 std::visit([](auto& v) { v.clear(); }, vec);
317 });
318
319 std::ranges::for_each(m_processed_data, [](auto& vec) {
320 std::visit([](auto& v) { v.clear(); }, vec);
321 });
322
323 m_num_frames = 0;
325
326 m_read_position = std::vector<std::atomic<uint64_t>>(m_num_channels);
327 for (auto& pos : m_read_position) {
328 pos.store(0);
329 }
330
333}
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 lock() override
Acquire a lock for thread-safe access.
@ IDLE
Container is inactive with no data or not ready for processing.

References MayaFlux::Kakshya::IDLE, lock(), m_circular_write_position, m_data, m_data_mutex, 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: