18namespace zrythm::utils::float_ranges
24[[
using gnu: hot]]
void
25fill (std::span<float> buf,
float val);
30[[
using gnu: hot]]
void
31clip (std::span<float> buf,
float minf,
float maxf);
36[[
using gnu: hot]]
void
37copy (std::span<float> dest, std::span<const float> src);
42[[
using gnu: hot]]
void
43mul_k2 (std::span<float> dest,
float k);
55min (std::span<const float> buf);
61max (std::span<const float> buf);
66[[
using gnu: hot]]
void
67add2 (std::span<float> dest, std::span<const float> src);
72[[
using gnu: hot]]
void
73product (std::span<float> dest, std::span<const float> src,
float k);
78[[
using gnu: hot]]
void
79mix_product (std::span<float> dest, std::span<const float> src,
float k);
84[[
using gnu: hot]]
void
85reverse (std::span<float> dest, std::span<const float> src);
91[[
using gnu: hot]]
void
92normalize (std::span<float> dest, std::span<const float> src);
111 std::span<float> dest,
112 int32_t start_offset,
113 int32_t total_frames_to_fade,
114 float fade_from_multiplier);
130 std::span<float> dest,
131 int32_t start_offset,
132 int32_t total_frames_to_fade,
133 float fade_to_multiplier);
147make_mono (std::span<float> l, std::span<float> r,
bool equal_power);
void linear_fade_in_from(std::span< float > dest, int32_t start_offset, int32_t total_frames_to_fade, float fade_from_multiplier)
Calculate linear fade by multiplying from 0 to 1 for total_frames_to_fade samples.
void fill(std::span< float > buf, float val)
Fill the buffer with the given value.
void mix_product(std::span< float > dest, std::span< const float > src, float k)
Calculate dest[i] = dest[i] + src[i] * k.
void make_mono(std::span< float > l, std::span< float > r, bool equal_power)
Makes the two signals mono.
void normalize(std::span< float > dest, std::span< const float > src)
Calculate normalized values: dst[i] = src[i] / (max { abs(src) }).
void clip(std::span< float > buf, float minf, float maxf)
Clamp the buffer to min/max.
float max(std::span< const float > buf)
Gets the maximum of the buffer.
void product(std::span< float > dest, std::span< const float > src, float k)
Calculate dest[i] = src[i] * k.
float min(std::span< const float > buf)
Gets the minimum of the buffer.
float abs_max(std::span< const float > buf)
Gets the maximum absolute value of the buffer (as amplitude).
void mul_k2(std::span< float > dest, float k)
Scale: dst[i] = dst[i] * k.
void add2(std::span< float > dest, std::span< const float > src)
Calculate dst[i] = dst[i] + src[i].
void reverse(std::span< float > dest, std::span< const float > src)
Reverse the order of samples: dst[i] <=> src[count - i - 1].
void linear_fade_out_to(std::span< float > dest, int32_t start_offset, int32_t total_frames_to_fade, float fade_to_multiplier)
Calculate linear fade by multiplying from 1 to 0 for total_frames_to_fade samples.
void copy(std::span< float > dest, std::span< const float > src)
Compute dest[i] = src[i].