FastLED 3.9.15
Loading...
Searching...
No Matches

◆ hex_add_oversampled_bleplike()

static void fl::third_party::hexwave::hex_add_oversampled_bleplike ( float * output,
float time_since_transition,
float scale,
float * data,
HexWaveEngine * engine )
static

Definition at line 88 of file stb_hexwave.cpp.hpp.

89{
90 float *d1,*d2;
91 float lerpweight;
92 int32_t i, bw = engine->width;
93
94 int32_t slot = (int32_t) (time_since_transition * engine->oversample);
95 if (slot >= engine->oversample)
96 slot = engine->oversample-1; // clamp in case the floats overshoot
97
98 d1 = &data[ slot *bw];
99 d2 = &data[(slot+1)*bw];
100
101 lerpweight = time_since_transition * engine->oversample - slot;
102 for (i=0; i < bw; ++i)
103 output[i] += scale * (d1[i] + (d2[i]-d1[i])*lerpweight);
104}
fl::UISlider scale("Scale", 4,.1, 4,.1)
int32_t oversample
Number of oversampled versions.
int32_t width
Width of fixup in samples (4..64)
Definition stb_hexwave.h:99
fl::i32 int32_t
Definition coder.h:220

References FL_NOEXCEPT, and scale.

Referenced by hex_blamp(), and hex_blep().

+ Here is the caller graph for this function: