1
0
Fork 0

Mark the smoother's style field pub

This is useful when using the smoother as a simple amplitude envelope.
This commit is contained in:
Robbert van der Helm 2022-07-06 20:14:29 +02:00
parent d610230aca
commit 2bb698a8f1

View file

@ -36,7 +36,7 @@ pub enum SmoothingStyle {
#[derive(Debug)]
pub struct Smoother<T> {
/// The kind of snoothing that needs to be applied, if any.
style: SmoothingStyle,
pub style: SmoothingStyle,
/// The number of steps of smoothing left to take.
///
// This is a signed integer because we can skip multiple steps, which would otherwise make it
@ -119,13 +119,6 @@ impl<T: Smoothable> Smoother<T> {
Default::default()
}
/// Get the smoother's style. This is useful when a per-voice smoother wants to use the same
/// style as a parameter's global smoother.
#[inline]
pub fn style(&self) -> SmoothingStyle {
self.style
}
/// The number of steps left until calling [`next()`][Self::next()] will stop yielding new
/// values.
#[inline]