Process one 512-sample block; returns [0…1] with inertia.
Definition at line 29 of file fx_audio.h.
29 {
31
32 float peak = 0.0f;
33 for (
size_t i = 0; i <
length; ++i) {
34 float v =
fl::abs(samples[i]) * (1.0f/32768.0f);
36 }
37
38
40
41
45 } else {
48 }
49
50
53
55 }
fl::UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f)
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
enable_if< is_fixed_point< T >::value, T >::type exp(T x) FL_NOEXCEPT
constexpr enable_if< is_fixed_point< T >::value, T >::type abs(T x) FL_NOEXCEPT
References fl::abs(), fl::exp(), length(), mAttackRate, fl::max(), mCurrentLevel, mDecayRate, mOutputRate, mSampleRate, and mSmoothedOutput.