31 fl::size
size()
const;
44 const fl::i16 &
at(fl::size i)
const;
46 operator bool()
const {
return isValid(); }
69 void processBlock(
const fl::i16 *samples, fl::size count);
128 const fl::size n =
pcm().
size();
139 for (fl::size i = 1; i <
mSignedPcm.size(); ++i) {
const VectorPCM & pcm() const
VectorPCM::const_iterator const_iterator
fl::vector< fl::i16 > VectorPCM
AudioSample(const AudioSample &other)
bool operator!=(const AudioSample &other) const
AudioSample(AudioSampleImplPtr impl)
bool operator==(const AudioSample &other) const
const fl::i16 & operator[](fl::size i) const
const fl::i16 & at(fl::size i) const
fl::u32 timestamp() const
const_iterator begin() const
const_iterator end() const
AudioSample & operator=(const AudioSample &other)
static const VectorPCM & empty()
fl::u32 timestamp() const
fl::vector< fl::i16 > VectorPCM
void assign(It begin, It end, fl::u32 timestamp)
const VectorPCM & pcm() const
SoundLevelMeter(double spl_floor=33.0, double smoothing_alpha=0.0)
double dbfs_floor_global_
void processBlock(fl::span< const fl::i16 > samples)
void setFloorSPL(double spl_floor)
change your known noise-floor SPL at runtime
void processBlock(const fl::i16 *samples, fl::size count)
Process a block of int16 PCM samples.
void resetFloor()
reset so the next quiet block will re-initialize your floor
constexpr T * begin(T(&array)[N]) noexcept
constexpr T * end(T(&array)[N]) noexcept
HeapVector< T, Allocator > vector
#define FASTLED_SMART_PTR(type)