mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2024-11-12 21:09:01 +00:00
fix compost rosenberg, iir_filter
This commit is contained in:
parent
b44f7c8f2a
commit
0754fd0fad
2 changed files with 4 additions and 4 deletions
|
@ -522,8 +522,8 @@ namespace sprout {
|
|||
return Result(
|
||||
sample,
|
||||
typename Result::second_type(
|
||||
sprout::remake<DelayA>(da, 2, sprout::tuples::get<1>(da), sample),
|
||||
sprout::remake<DelayB>(db, 2, sprout::tuples::get<1>(db), base)
|
||||
sprout::remake<DelayA>(da, 2, sample, sprout::tuples::get<0>(da)),
|
||||
sprout::remake<DelayB>(db, 2, base, sprout::tuples::get<0>(db))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR typename sprout::float_promote<T>::type
|
||||
rosenberg_value(T x, T tau1, T tau2) {
|
||||
typedef typename sprout::float_promote<T>::type type;
|
||||
return x >= 0 && sprout::math::less_equal(x, tau1)
|
||||
return x >= 0 && x <= tau1
|
||||
? 3 * sprout::detail::pow2<type>(x / tau1) - 2 * sprout::detail::pow3<type>(x / tau1)
|
||||
: sprout::math::greater(x, tau1) && sprout::math::less_equal(x, tau1 + tau2)
|
||||
: x > tau1 && x <= tau1 + tau2
|
||||
? 1 - sprout::detail::pow2<type>((x - tau1) / tau2)
|
||||
: 0
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue