42 const int16_t &
at(
size_t i)
const;
44 operator bool()
const {
return isValid(); }
64 SoundLevelMeter(
double spl_floor = 33.0f,
double smoothing_alpha = 0.0);
104 template <
typename It>
void assign(It begin, It end) {
132 for (
size_t i = 1; i <
mSignedPcm.size(); ++i) {
fl::vector< int16_t > VectorPCM
const VectorPCM & pcm() const
const int16_t & at(size_t i) const
VectorPCM::const_iterator const_iterator
AudioSample(const AudioSample &other)
bool operator!=(const AudioSample &other) const
AudioSample(AudioSampleImplPtr impl)
bool operator==(const AudioSample &other) const
const int16_t & operator[](size_t i) const
const_iterator begin() const
const_iterator end() const
AudioSample & operator=(const AudioSample &other)
static const VectorPCM & empty()
void assign(It begin, It end)
fl::vector< int16_t > VectorPCM
const VectorPCM & pcm() const
double dbfs_floor_global_
void processBlock(const int16_t *samples, size_t count)
Process a block of int16 PCM samples.
SoundLevelMeter(double spl_floor=33.0f, double smoothing_alpha=0.0)
void setFloorSPL(double spl_floor)
change your known noise-floor SPL at runtime
void processBlock(fl::Slice< const int16_t > samples)
void resetFloor()
reset so the next quiet block will re-initialize your floor
Implements a simple red square effect for 2D LED grids.
#define FASTLED_SMART_PTR(type)