You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dsp-paw/gui/examples/8_attenuation.cpp

13 lines
237 B
C++

Sample* process_data(Samples samples)
{
const auto p = param1();
const float scale = p / 4095.f;
const auto offset = (4095 - p) / 2;
for (int i = 0; i < SIZE; ++i)
samples[i] = samples[i] * scale + offset;
return samples;
}