Audacity 3.2.0
|
#include <WaveformCache.h>
Public Member Functions | |
WaveClipWaveformCache (size_t nChannels) | |
~WaveClipWaveformCache () override | |
std::unique_ptr< WaveClipListener > | Clone () const override |
void | MarkChanged () noexcept override |
void | Invalidate () override |
void | Clear () |
Delete the wave cache - force redraw. Thread-safe. More... | |
bool | GetWaveDisplay (const WaveChannelInterval &clip, WaveDisplay &display, double t0, double pixelsPerSecond) |
void | MakeStereo (WaveClipListener &&other, bool aligned) override |
void | SwapChannels () override |
Default implementation does nothing. More... | |
void | Erase (size_t index) override |
Public Member Functions inherited from WaveClipListener | |
virtual | ~WaveClipListener ()=0 |
virtual void | MarkChanged () noexcept=0 |
virtual void | Invalidate ()=0 |
virtual void | WriteXMLAttributes (XMLWriter &writer) const |
virtual bool | HandleXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) |
virtual void | MakeStereo (WaveClipListener &&other, bool aligned) |
virtual void | SwapChannels () |
Default implementation does nothing. More... | |
virtual void | Erase (size_t index) |
Static Public Member Functions | |
static WaveClipWaveformCache & | Get (const WaveChannelInterval &clip) |
Public Attributes | |
std::vector< std::unique_ptr< WaveCache > > | mWaveCaches |
int | mDirty { 0 } |
Definition at line 61 of file WaveformCache.h.
|
explicit |
Definition at line 271 of file WaveformCache.cpp.
References mWaveCaches.
|
override |
Definition at line 278 of file WaveformCache.cpp.
void WaveClipWaveformCache::Clear | ( | ) |
Delete the wave cache - force redraw. Thread-safe.
|
override |
Definition at line 282 of file WaveformCache.cpp.
References mWaveCaches.
|
overridevirtual |
Erase attachment at a given index, if it existed, moving later-indexed attachments to earlier indices
Default implementation does nothing
Reimplemented from WaveClipListener.
Definition at line 324 of file WaveformCache.cpp.
References mWaveCaches.
|
static |
Definition at line 293 of file WaveformCache.cpp.
References WaveClipChannel::GetClip(), and sKeyW.
Referenced by anonymous_namespace{WaveformView.cpp}::DrawClipWaveform().
bool WaveClipWaveformCache::GetWaveDisplay | ( | const WaveChannelInterval & | clip, |
WaveDisplay & | display, | ||
double | t0, | ||
double | pixelsPerSecond | ||
) |
Getting high-level data for screen display
Definition at line 66 of file WaveformCache.cpp.
References WaveClipUIUtilities::fillWhere(), WaveClipUIUtilities::findCorrection(), floatSample, WaveClipChannel::GetAppendBuffer(), WaveClipChannel::GetAppendBufferLen(), WaveClipChannel::GetChannelIndex(), Sequence::GetNumSamples(), WaveClipChannel::GetRate(), WaveClipChannel::GetSequence(), WaveClipChannel::GetStretchRatio(), WaveClipChannel::GetTrimLeft(), GetWaveDisplay(), WaveDisplay::max, mDirty, min(), WaveDisplay::min, mWaveCaches, WaveDisplay::ownWhere, ArrayOf< X >::reinit(), WaveDisplay::rms, SAMPLE_SIZE, anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, SamplesToFloats(), staffpad::audio::simd::sqrt(), WaveDisplay::where, and WaveDisplay::width.
Referenced by GetWaveDisplay().
|
overridevirtual |
Implements WaveClipListener.
Definition at line 304 of file WaveformCache.cpp.
References mWaveCaches.
|
overridevirtual |
Append the other's attachments to this, assuming concrete subclasses are the same
Default implementation does nothing
aligned | whether the strong invariant condition on the clip may be assumed |
typeid(*this) == typeid(other)
Reimplemented from WaveClipListener.
Definition at line 311 of file WaveformCache.cpp.
References mWaveCaches.
|
overridevirtualnoexcept |
|
overridevirtual |
Default implementation does nothing.
Reimplemented from WaveClipListener.
Definition at line 318 of file WaveformCache.cpp.
References mWaveCaches, and anonymous_namespace{NoteTrack.cpp}::swap().
int WaveClipWaveformCache::mDirty { 0 } |
Definition at line 70 of file WaveformCache.h.
Referenced by GetWaveDisplay(), and MarkChanged().
std::vector<std::unique_ptr<WaveCache> > WaveClipWaveformCache::mWaveCaches |
Definition at line 69 of file WaveformCache.h.
Referenced by Clone(), Erase(), GetWaveDisplay(), Invalidate(), MakeStereo(), SwapChannels(), and WaveClipWaveformCache().