Fix linear smoother again
This commit is contained in:
parent
44e48f7003
commit
2b4efe6eb7
1 changed files with 6 additions and 6 deletions
|
|
@ -105,8 +105,8 @@ void LinearSmoother::process(absl::Span<const float> input, absl::Span<float> ou
|
|||
if (target != nextTarget) {
|
||||
target = nextTarget;
|
||||
//framesToTarget = (framesToTarget > 0) ? framesToTarget : smoothFrames;
|
||||
//step = (target - current) / (16 * max(1, framesToTarget));
|
||||
step = (target - current) / (16 * max(1, smoothFrames));
|
||||
//step = (target - current) / max(16, framesToTarget);
|
||||
step = (target - current) / max(16, smoothFrames);
|
||||
}
|
||||
const simde__m128 targetX4 = simde_mm_set1_ps(target);
|
||||
if (target > current) {
|
||||
|
|
@ -154,8 +154,8 @@ void LinearSmoother::process(absl::Span<const float> input, absl::Span<float> ou
|
|||
if (target != nextTarget) {
|
||||
target = nextTarget;
|
||||
//framesToTarget = (framesToTarget > 0) ? framesToTarget : smoothFrames;
|
||||
//step = (target - current) / (16 * max(1, framesToTarget));
|
||||
step = (target - current) / (16 * max(1, smoothFrames));
|
||||
//step = (target - current) / max(16, framesToTarget);
|
||||
step = (target - current) / max(16, smoothFrames);
|
||||
}
|
||||
if (target > current) {
|
||||
for (size_t j = 0; j < 16; ++j)
|
||||
|
|
@ -179,8 +179,8 @@ void LinearSmoother::process(absl::Span<const float> input, absl::Span<float> ou
|
|||
if (target != nextTarget) {
|
||||
target = nextTarget;
|
||||
// framesToTarget = (framesToTarget > 0) ? framesToTarget : smoothFrames;
|
||||
// step = (target - current) / ((count - i) * max(1, framesToTarget));
|
||||
step = (target - current) / ((count - i) * max(1, smoothFrames));
|
||||
// step = (target - current) / max(static_cast<int32_t>(count - i), framesToTarget);
|
||||
step = (target - current) / max(static_cast<int32_t>(count - i), smoothFrames);
|
||||
}
|
||||
if (target > current) {
|
||||
for (; i < count; ++i)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue