|
FastLED 3.9.15
|
#include <silence.h>
Inheritance diagram for fl::audio::detector::Silence:
Collaboration diagram for fl::audio::detector::Silence:Public Member Functions | |
| Silence () FL_NOEXCEPT | |
| ~Silence () FL_NOEXCEPT override | |
| void | fireCallbacks () override |
| float | getCurrentRMS () const |
| const char * | getName () const override |
| u32 | getSilenceDuration () const |
| float | getSilenceThreshold () const |
| bool | isSilent () const |
| bool | needsFFT () const override |
| void | reset () override |
| void | setHysteresis (float hysteresis) |
| void | setMaxSilenceDuration (u32 durationMs) |
| void | setMinSilenceDuration (u32 durationMs) |
| void | setSilenceThreshold (float threshold) |
| void | update (shared_ptr< Context > context) override |
Public Member Functions inherited from fl::audio::Detector | |
| virtual | ~Detector () FL_NOEXCEPT=default |
| virtual bool | needsFFTHistory () const FL_NOEXCEPT |
| virtual void | setSampleRate (int) FL_NOEXCEPT |
Public Attributes | |
| function_list< void(u8 silent)> | onSilence |
| function_list< void(u32 durationMs)> | onSilenceDuration |
| function_list< void()> | onSilenceEnd |
| function_list< void()> | onSilenceStart |
Private Types | |
| enum class | PendingSilenceEvent : u8 { kNone , kStart , kEnd , kMaxDuration } |
Private Member Functions | |
| bool | checkSilenceCondition (float smoothedRMS) |
| float | getSmoothedRMS () |
Private Attributes | |
| float | mCurrentRMS |
| int | mHistoryIndex |
| int | mHistorySize |
| float | mHysteresis |
| bool | mIsSilent |
| u32 | mLastUpdateTime |
| u32 | mMaxSilenceDuration |
| u32 | mMinSilenceDuration |
| u32 | mPendingDuration = 0 |
| PendingSilenceEvent | mPendingEvent = PendingSilenceEvent::kNone |
| bool | mPreviousSilent |
| vector< float > | mRMSHistory |
| u32 | mSilenceEndTime |
| u32 | mSilenceStartTime |
| float | mSilenceThreshold |
Static Private Attributes | |
| static constexpr int | DEFAULT_HISTORY_SIZE = 5 |
| static constexpr float | DEFAULT_HYSTERESIS = 0.2f |
| static constexpr u32 | DEFAULT_MAX_SILENCE_MS = 60000 |
| static constexpr u32 | DEFAULT_MIN_SILENCE_MS = 500 |
| static constexpr float | DEFAULT_SILENCE_THRESHOLD = 0.01f |