Audacity 3.2.0
|
#include <DownwardMeterValueProvider.h>
Public Member Functions | |
DownwardMeterValueProvider (float upperValue=0.f) | |
~DownwardMeterValueProvider ()=default | |
void | Update (float value, bool alsoFiveSecondMax) override |
float | GetGlobalMax () const override |
float | GetFiveSecMax () const override |
float | GetCurrentMax () const override |
Direction | GetDirection () const override |
bool | IsInvisible () const override |
Public Member Functions inherited from MeterValueProvider | |
virtual | ~MeterValueProvider ()=default |
virtual void | Update (float value, bool alsoFiveSecondMax)=0 |
virtual float | GetGlobalMax () const =0 |
virtual float | GetFiveSecMax () const =0 |
virtual float | GetCurrentMax () const =0 |
virtual Direction | GetDirection () const =0 |
virtual bool | IsInvisible () const =0 |
Private Attributes | |
const float | mUpperValue |
float | mGlobalMin |
float | mCurrentMin |
float | mFiveSecMinState |
std::vector< std::pair< int, float > > | mLastFiveSeconds |
std::array< float, ringBufferLength > | mRingBuffer |
size_t | mRingBufferIndex = 0 |
int | mTimerCount = 0 |
Static Private Attributes | |
static constexpr auto | displayDelayMs = 100 |
static constexpr auto | ringBufferLength |
Additional Inherited Members | |
Public Types inherited from MeterValueProvider | |
enum class | Direction { Upwards , Downwards } |
Static Public Member Functions inherited from MeterValueProvider | |
static std::unique_ptr< MeterValueProvider > | Create (Direction direction) |
Audacity: A Digital Audio Editor
Matthieu Hodgkinson
Definition at line 19 of file DownwardMeterValueProvider.h.
DownwardMeterValueProvider::DownwardMeterValueProvider | ( | float | upperValue = 0.f | ) |
Definition at line 24 of file DownwardMeterValueProvider.cpp.
References mRingBuffer.
|
default |
|
overridevirtual |
Implements MeterValueProvider.
Definition at line 79 of file DownwardMeterValueProvider.cpp.
References mCurrentMin.
Referenced by UpwardMeterValueProvider::GetCurrentMax().
|
overridevirtual |
Implements MeterValueProvider.
Definition at line 85 of file DownwardMeterValueProvider.cpp.
References MeterValueProvider::Downwards.
|
overridevirtual |
Implements MeterValueProvider.
Definition at line 74 of file DownwardMeterValueProvider.cpp.
References mFiveSecMinState.
Referenced by UpwardMeterValueProvider::GetFiveSecMax().
|
overridevirtual |
Implements MeterValueProvider.
Definition at line 69 of file DownwardMeterValueProvider.cpp.
References mGlobalMin.
Referenced by UpwardMeterValueProvider::GetGlobalMax().
|
overridevirtual |
Implements MeterValueProvider.
Definition at line 90 of file DownwardMeterValueProvider.cpp.
References mCurrentMin, and mUpperValue.
Referenced by UpwardMeterValueProvider::IsInvisible().
|
overridevirtual |
Implements MeterValueProvider.
Definition at line 33 of file DownwardMeterValueProvider.cpp.
References anonymous_namespace{DownwardMeterValueProvider.cpp}::decayPerTickDb, anonymous_namespace{DownwardMeterValueProvider.cpp}::maxTickCount, mCurrentMin, mFiveSecMinState, mGlobalMin, min(), mLastFiveSeconds, mRingBuffer, mRingBufferIndex, mTimerCount, mUpperValue, and ringBufferLength.
Referenced by UpwardMeterValueProvider::Update().
|
staticconstexprprivate |
The display tends to be earlier than the audio playback. We delay the former by (approximately) this amount, for a tighter audiovisual experience.
Definition at line 36 of file DownwardMeterValueProvider.h.
|
private |
Definition at line 42 of file DownwardMeterValueProvider.h.
Referenced by GetCurrentMax(), IsInvisible(), and Update().
|
private |
Definition at line 43 of file DownwardMeterValueProvider.h.
Referenced by GetFiveSecMax(), and Update().
|
private |
Definition at line 41 of file DownwardMeterValueProvider.h.
Referenced by GetGlobalMax(), and Update().
|
private |
Definition at line 44 of file DownwardMeterValueProvider.h.
Referenced by Update().
|
private |
Definition at line 45 of file DownwardMeterValueProvider.h.
Referenced by DownwardMeterValueProvider(), and Update().
|
private |
Definition at line 46 of file DownwardMeterValueProvider.h.
Referenced by Update().
|
private |
Definition at line 47 of file DownwardMeterValueProvider.h.
Referenced by Update().
|
private |
Definition at line 40 of file DownwardMeterValueProvider.h.
Referenced by IsInvisible(), and Update().
|
staticconstexprprivate |
Definition at line 37 of file DownwardMeterValueProvider.h.
Referenced by Update().