mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Add an is_smoothing() check
This commit is contained in:
@@ -71,6 +71,12 @@ impl<T: Default> Smoother<T> {
|
||||
pub fn none() -> Self {
|
||||
Default::default()
|
||||
}
|
||||
|
||||
/// Whether calling [next] will yield a new value or an old value. Useful if you need to
|
||||
/// recompute something wheenver this parameter changes.
|
||||
pub fn is_smoothing(&self) -> bool {
|
||||
self.steps_left > 0
|
||||
}
|
||||
}
|
||||
|
||||
// These are not iterators for the sole reason that this will always yield a value, and needing to
|
||||
|
||||
Reference in New Issue
Block a user