Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::AutomationTimelineDataCache Class Reference

Automation-specific timeline data cache. More...

#include <src/dsp/timeline_data_cache.h>

Inheritance diagram for zrythm::dsp::AutomationTimelineDataCache:
Collaboration diagram for zrythm::dsp::AutomationTimelineDataCache:

Data Structures

struct  AutomationCacheEntry
 Automation cache entry for caching. More...

Public Member Functions

void add_automation_sequence (IntervalType interval, const std::vector< float > &automation_values)
 Adds an automation sequence for the given interval.
const std::vector< AutomationCacheEntry > & get_automation_sequences () const
 Gets the cached automation sequences.
void clear () override
 Clears all cached data.
void remove_sequences_matching_interval (IntervalType interval) override
 Removes cached data matching the given interval.
void finalize_changes () override
 Finalizes changes and prepares cached data for access.
bool has_content () const override
 Checks if the cache has any content.

Additional Inherited Members

Public Types inherited from zrythm::dsp::TimelineDataCache
using IntervalType = std::pair<units::sample_t, units::sample_t>

Detailed Description

Automation-specific timeline data cache.

Handles caching of automation sequences with thread-safe access and range-based updates.

Definition at line 179 of file timeline_data_cache.h.

Member Function Documentation

◆ add_automation_sequence()

void zrythm::dsp::AutomationTimelineDataCache::add_automation_sequence ( IntervalType interval,
const std::vector< float > & automation_values )

Adds an automation sequence for the given interval.

Parameters
intervalThe time interval (in samples).
automation_valuesThe automation values.

◆ clear()

void zrythm::dsp::AutomationTimelineDataCache::clear ( )
overridevirtual

Clears all cached data.

Implements zrythm::dsp::TimelineDataCache.

◆ finalize_changes()

void zrythm::dsp::AutomationTimelineDataCache::finalize_changes ( )
overridevirtual

Finalizes changes and prepares cached data for access.

This should be called after all modifications are complete to prepare the cached data for real-time access.

Implements zrythm::dsp::TimelineDataCache.

◆ get_automation_sequences()

const std::vector< AutomationCacheEntry > & zrythm::dsp::AutomationTimelineDataCache::get_automation_sequences ( ) const
inline

Gets the cached automation sequences.

Returns
Reference to the vector of automation cache entries.

Definition at line 216 of file timeline_data_cache.h.

◆ has_content()

bool zrythm::dsp::AutomationTimelineDataCache::has_content ( ) const
overridevirtual

Checks if the cache has any content.

Returns
True if the cache contains any data, false otherwise.

Implements zrythm::dsp::TimelineDataCache.

◆ remove_sequences_matching_interval()

void zrythm::dsp::AutomationTimelineDataCache::remove_sequences_matching_interval ( IntervalType interval)
overridevirtual

Removes cached data matching the given interval.

Parameters
intervalThe time interval to remove (in samples).

Implements zrythm::dsp::TimelineDataCache.


The documentation for this class was generated from the following file: