MayaFlux 0.4.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 401 of file DynamicSoundStream.cpp.

402{
403 uint64_t current_frames = get_total_elements() / get_num_channels();
404 uint64_t new_capacity = std::max(target_frames, current_frames * 2);
405
406 std::vector<DataVariant> new_data = create_expanded_data(new_capacity);
407 set_all_data(new_data);
408}
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: