Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::audio::WaveformOverviewCache Class Reference

#include <waveform_overview.hpp>

Public Member Functions

 WaveformOverviewCache (std::size_t max_entries=32)
std::shared_ptr< const WaveformOverview > get_or_build (const std::string &path, uint32_t samples_per_peak=256)
std::shared_ptr< const WaveformOverview > get (const std::string &path, uint32_t samples_per_peak=256)
void put (const std::string &path, std::shared_ptr< const WaveformOverview > thumbnail, uint32_t fallback_samples_per_peak=kInferSamplesPerPeak)
void clear ()
bool erase (const std::string &path)
WaveformOverviewCacheStats stats () const
std::size_t size () const
std::size_t capacity () const
void set_capacity (std::size_t max_entries)
void set_disk_cache_dir (const std::string &dir)
std::string disk_cache_dir () const
void clear_disk_cache ()

Static Public Attributes

static constexpr uint32_t kInferSamplesPerPeak = 0

Constructor & Destructor Documentation

◆ WaveformOverviewCache()

pulp::audio::WaveformOverviewCache::WaveformOverviewCache ( std::size_t max_entries = 32)
explicit

Member Function Documentation

◆ capacity()

std::size_t pulp::audio::WaveformOverviewCache::capacity ( ) const

◆ clear()

void pulp::audio::WaveformOverviewCache::clear ( )

◆ clear_disk_cache()

void pulp::audio::WaveformOverviewCache::clear_disk_cache ( )

◆ disk_cache_dir()

std::string pulp::audio::WaveformOverviewCache::disk_cache_dir ( ) const

◆ erase()

bool pulp::audio::WaveformOverviewCache::erase ( const std::string & path)

◆ get()

std::shared_ptr< const WaveformOverview > pulp::audio::WaveformOverviewCache::get ( const std::string & path,
uint32_t samples_per_peak = 256 )

◆ get_or_build()

std::shared_ptr< const WaveformOverview > pulp::audio::WaveformOverviewCache::get_or_build ( const std::string & path,
uint32_t samples_per_peak = 256 )

◆ put()

void pulp::audio::WaveformOverviewCache::put ( const std::string & path,
std::shared_ptr< const WaveformOverview > thumbnail,
uint32_t fallback_samples_per_peak = kInferSamplesPerPeak )

◆ set_capacity()

void pulp::audio::WaveformOverviewCache::set_capacity ( std::size_t max_entries)

◆ set_disk_cache_dir()

void pulp::audio::WaveformOverviewCache::set_disk_cache_dir ( const std::string & dir)

◆ size()

std::size_t pulp::audio::WaveformOverviewCache::size ( ) const

◆ stats()

WaveformOverviewCacheStats pulp::audio::WaveformOverviewCache::stats ( ) const

Member Data Documentation

◆ kInferSamplesPerPeak

uint32_t pulp::audio::WaveformOverviewCache::kInferSamplesPerPeak = 0
staticconstexpr

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