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

#include <waveform_overview.hpp>

Public Member Functions

WaveformOverviewInfo info () const noexcept
const OverviewLevel & level (std::size_t i) const
std::size_t num_levels () const noexcept
std::size_t best_level_for (uint32_t target_peaks) const noexcept
std::size_t render_min_max (uint32_t channel, uint32_t target_peaks, float *dst_min_max_interleaved) const noexcept
bool empty () const noexcept

Static Public Member Functions

static std::optional< WaveformOverview > build_from_path (const std::string &path, uint32_t samples_per_peak=256)
static WaveformOverview build_from_buffer (const AudioFileData &data, uint32_t samples_per_peak=256)
static WaveformOverview build_from_buffer_view (BufferView< const float > source, uint32_t sample_rate, uint32_t samples_per_peak=256)
static std::optional< WaveformOverview > from_serialized_levels (uint32_t num_channels, uint64_t num_source_frames, uint32_t sample_rate, uint32_t num_levels, const uint8_t *data, std::size_t size, std::size_t offset)

Static Public Attributes

static constexpr uint32_t kAllChannels = static_cast<uint32_t>(-1)

Member Function Documentation

◆ best_level_for()

std::size_t pulp::audio::WaveformOverview::best_level_for ( uint32_t target_peaks) const
noexcept

◆ build_from_buffer()

WaveformOverview pulp::audio::WaveformOverview::build_from_buffer ( const AudioFileData & data,
uint32_t samples_per_peak = 256 )
static

◆ build_from_buffer_view()

WaveformOverview pulp::audio::WaveformOverview::build_from_buffer_view ( BufferView< const float > source,
uint32_t sample_rate,
uint32_t samples_per_peak = 256 )
static

◆ build_from_path()

std::optional< WaveformOverview > pulp::audio::WaveformOverview::build_from_path ( const std::string & path,
uint32_t samples_per_peak = 256 )
static

◆ empty()

bool pulp::audio::WaveformOverview::empty ( ) const
inlinenoexcept

◆ from_serialized_levels()

std::optional< WaveformOverview > pulp::audio::WaveformOverview::from_serialized_levels ( uint32_t num_channels,
uint64_t num_source_frames,
uint32_t sample_rate,
uint32_t num_levels,
const uint8_t * data,
std::size_t size,
std::size_t offset )
static

◆ info()

WaveformOverviewInfo pulp::audio::WaveformOverview::info ( ) const
noexcept

◆ level()

const OverviewLevel & pulp::audio::WaveformOverview::level ( std::size_t i) const
inline

◆ num_levels()

std::size_t pulp::audio::WaveformOverview::num_levels ( ) const
inlinenoexcept

◆ render_min_max()

std::size_t pulp::audio::WaveformOverview::render_min_max ( uint32_t channel,
uint32_t target_peaks,
float * dst_min_max_interleaved ) const
noexcept

Member Data Documentation

◆ kAllChannels

uint32_t pulp::audio::WaveformOverview::kAllChannels = static_cast<uint32_t>(-1)
staticconstexpr

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