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

◆ set_all_data() [2/2]

void MayaFlux::Kakshya::DynamicSoundStream::set_all_data ( const std::vector< DataVariant > &  new_data)
private

Definition at line 375 of file DynamicSoundStream.cpp.

376{
377 std::unique_lock lock(m_data_mutex);
378 m_data.resize(data.size());
379
380 std::ranges::for_each(std::views::zip(data, m_data),
381 [](auto&& pair) {
382 auto&& [source, dest] = pair;
383 safe_copy_data_variant(source, dest);
384 });
385
386 m_num_frames = std::visit([](const auto& vec) {
387 return static_cast<uint64_t>(vec.size());
388 },
389 m_data[0]);
390
393 }
394
397}
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.
@ READY
Container has data loaded and is ready for processing.
@ INTERLEAVED
Single DataVariant with interleaved data (LRLRLR for stereo)
void safe_copy_data_variant(const DataVariant &input, DataVariant &output)
Safely copy data from a DataVariant to another DataVariant, handling type conversion.
Definition DataUtils.cpp:34
Source source()
Begin a Source chain.
Definition Plot.hpp:128

References MayaFlux::Kakshya::SoundStreamContainer::get_num_channels(), MayaFlux::Kakshya::INTERLEAVED, MayaFlux::Kakshya::SoundStreamContainer::lock(), MayaFlux::Kakshya::SoundStreamContainer::m_data, MayaFlux::Kakshya::SoundStreamContainer::m_data_mutex, MayaFlux::Kakshya::SoundStreamContainer::m_num_frames, MayaFlux::Kakshya::SoundStreamContainer::m_structure, MayaFlux::Kakshya::ContainerDataStructure::organization, MayaFlux::Kakshya::READY, MayaFlux::Kakshya::safe_copy_data_variant(), MayaFlux::Kakshya::SoundStreamContainer::setup_dimensions(), and MayaFlux::Kakshya::SoundStreamContainer::update_processing_state().

+ Here is the call graph for this function: