lmms
Cross-platform music production software
Loading...
Searching...
No Matches
lmms::SampleThumbnailCache::Thumbnail::Peak Struct Reference

Stores a audio peak value pairing (i.e., minimum and maximum sample over some amount of time). More...

#include <SampleThumbnailCache.h>

Public Member Functions

auto operator+= (const Peak &other) -> Peak &
 In-place accumulates another peak into this peak, expanding this one as necessary.

Public Attributes

float min = std::numeric_limits<float>::infinity()
 The lowest audio sample found in this frame window. Initialized to positive infinity so that any real sample value will be immediately lower than it.
float max = -std::numeric_limits<float>::infinity()
 The highest audio sample found in this frame window. Initialized to negative infinity so that any real sample value will be immediately higher than it.

Friends

auto operator+ (const Peak &left, const Peak &right) -> Peak
 Combines two peaks together by getting the smallest minimum and largest maximum of the two.

Detailed Description

Stores a audio peak value pairing (i.e., minimum and maximum sample over some amount of time).

Peaks track the absolute lowest and highest sample values over a specific time window.

Member Function Documentation

◆ operator+=()

auto lmms::SampleThumbnailCache::Thumbnail::Peak::operator+= ( const Peak & other) -> Peak &
inline

In-place accumulates another peak into this peak, expanding this one as necessary.

Returns
Reference to this peak being modified.

◆ operator+

auto operator+ ( const Peak & left,
const Peak & right ) -> Peak
friend

Combines two peaks together by getting the smallest minimum and largest maximum of the two.

Returns
A new Peak containing the minimum and maximum values of both peaks.

Member Data Documentation

◆ max

float lmms::SampleThumbnailCache::Thumbnail::Peak::max = -std::numeric_limits<float>::infinity()

The highest audio sample found in this frame window. Initialized to negative infinity so that any real sample value will be immediately higher than it.

◆ min

float lmms::SampleThumbnailCache::Thumbnail::Peak::min = std::numeric_limits<float>::infinity()

The lowest audio sample found in this frame window. Initialized to positive infinity so that any real sample value will be immediately lower than it.


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