|
FastLED 3.10.8
|
#include <silence.h>
Inheritance diagram for fl::audio::detector::Silence:
Collaboration diagram for fl::audio::detector::Silence:Public Member Functions | |
| Silence () FL_NO_EXCEPT | |
| ~Silence () FL_NO_EXCEPT override | |
| void | fireCallbacks () FL_NO_EXCEPT override |
| float | getCurrentRMS () const FL_NO_EXCEPT |
| const char * | getName () const FL_NO_EXCEPT override |
| u32 | getSilenceDuration () const FL_NO_EXCEPT |
| float | getSilenceThreshold () const FL_NO_EXCEPT |
| bool | isSilent () const FL_NO_EXCEPT |
| bool | needsFFT () const FL_NO_EXCEPT override |
| void | reset () FL_NO_EXCEPT override |
| void | setHysteresis (float hysteresis) FL_NO_EXCEPT |
| void | setMaxSilenceDuration (u32 durationMs) FL_NO_EXCEPT |
| void | setMinSilenceDuration (u32 durationMs) FL_NO_EXCEPT |
| void | setSilenceThreshold (float threshold) FL_NO_EXCEPT |
| void | update (shared_ptr< Context > context) FL_NO_EXCEPT override |
Public Member Functions inherited from fl::audio::Detector | |
| virtual | ~Detector () FL_NO_EXCEPT=default |
| virtual bool | needsFFTHistory () const FL_NO_EXCEPT |
| virtual void | setSampleRate (int) FL_NO_EXCEPT |
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) FL_NO_EXCEPT |
| float | getSmoothedRMS () FL_NO_EXCEPT |
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 |