MayaFlux 0.5.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 346 of file DynamicSoundStream.cpp.

347{
348 {
349 Memory::SeqlockWriteGuard g(m_data_lock);
350 m_data.resize(data.size());
351 std::ranges::for_each(std::views::zip(data, m_data),
352 [](auto&& pair) {
353 auto&& [source, dest] = pair;
354 safe_copy_data_variant(source, dest);
355 });
356
357 m_num_frames = std::visit([](const auto& vec) {
358 return static_cast<uint64_t>(vec.size());
359 },
360 m_data[0]);
363
365 }
366
368}
void update_processing_state(ProcessingState new_state) override
Update the processing state of the container.
@ 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:36
Source source()
Begin a Source chain.
Definition Plot.hpp:128

References MayaFlux::Kakshya::SoundStreamContainer::get_num_channels(), MayaFlux::Kakshya::INTERLEAVED, MayaFlux::Kakshya::SoundStreamContainer::m_data, MayaFlux::Kakshya::SoundStreamContainer::m_data_lock, 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: