|
lmms
Cross-platform music production software
|
Holds increasingly downsampled versions of an audio waveform for efficient rendering of them. More...
#include <SampleThumbnailCache.h>
Classes | |
| class | Thumbnail |
| Encapsulates a fixed-width vector of audio peak min/max values. More... | |
Public Member Functions | |
| SampleThumbnailCache ()=default | |
| Constructs an uninitialized, empty thumbnail cache. | |
| SampleThumbnailCache (const SampleBuffer &buffer) | |
| Constructs a cache and populates its multi-resolution levels from a sample buffer. | |
| auto | nearestThumbnailForWidth (f_cnt_t width) const -> const Thumbnail & |
| Get a thumbnail of the requested width. If no thumbnail of the requested width exists, the nearest larger thumbnail is returned. | |
| auto | sampleCount () const -> f_cnt_t |
Private Attributes | |
| std::vector< Thumbnail > | m_thumbnails |
| f_cnt_t | m_sampleCount |
Holds increasingly downsampled versions of an audio waveform for efficient rendering of them.
Instead of reading a lot of audio samples every time the screen redraws or zooms, this class keeps a list of small, pre-calculated waveforms (known as thumbnails,
|
default |
Constructs an uninitialized, empty thumbnail cache.
| lmms::SampleThumbnailCache::SampleThumbnailCache | ( | const SampleBuffer & | buffer | ) |
Constructs a cache and populates its multi-resolution levels from a sample buffer.
| buffer | The sample buffer to downsample and analyze. |
| auto lmms::SampleThumbnailCache::nearestThumbnailForWidth | ( | f_cnt_t | width | ) | const -> const Thumbnail & |
Get a thumbnail of the requested width. If no thumbnail of the requested width exists, the nearest larger thumbnail is returned.
| width | The requested thumbnail width. |
|
inline |
|
private |
|
private |