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

◆ expand_to()

void MayaFlux::Kakshya::DynamicSoundStream::expand_to ( uint64_t  target_frames)
private

Definition at line 368 of file DynamicSoundStream.cpp.

369{
370 uint64_t current_frames = get_total_elements() / get_num_channels();
371 uint64_t new_capacity = std::max(target_frames, current_frames * 2);
372
373 std::vector<DataVariant> new_data = create_expanded_data(new_capacity);
374 set_all_data(new_data);
375}
std::vector< DataVariant > create_expanded_data(uint64_t new_frame_count)
void set_all_data(const DataVariant &new_data)
uint64_t get_total_elements() const override
Get the total number of elements in the container.

References create_expanded_data(), MayaFlux::Kakshya::SoundStreamContainer::get_num_channels(), MayaFlux::Kakshya::SoundStreamContainer::get_total_elements(), and set_all_data().

Referenced by ensure_capacity(), validate(), validate_single_channel(), and write_frames().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: