[−][src]Struct spectrusty_core::audio::BlepAmpFilter
A wrapper Blep implementation that filters pulses' ∆ amplitude before sending them to the underlying implementation.
BlepAmpFilter
may be used to adjust generated audio volume dynamically.
NOTE: To emulate a linear volume control, filter
value should be scaled
logarithmically.
Fields
filter: B::SampleDelta
A normalized filter value in the range [0.0, 1.0]
(floats) or [0, int::max_value()]
(integers).
blep: B
A downstream Blep implementation.
Implementations
impl<B: Blep> BlepAmpFilter<B>
[src]
pub fn build(filter: B::SampleDelta) -> impl FnOnce(B) -> Self
[src]
pub fn new(filter: B::SampleDelta, blep: B) -> Self
[src]
Trait Implementations
impl<B> Blep for BlepAmpFilter<B> where
B: Blep,
B::SampleDelta: MulNorm + SampleDelta,
[src]
B: Blep,
B::SampleDelta: MulNorm + SampleDelta,
type SampleDelta = B::SampleDelta
A type for sample ∆ amplitudes (pulse height).
fn ensure_frame_time(
&mut self,
sample_rate: u32,
ts_rate: f64,
frame_ts: FTs,
margin_ts: FTs
)
[src]
&mut self,
sample_rate: u32,
ts_rate: f64,
frame_ts: FTs,
margin_ts: FTs
)
fn end_frame(&mut self, timestamp: FTs) -> usize
[src]
fn add_step(&mut self, channel: usize, timestamp: FTs, delta: Self::SampleDelta)
[src]
impl<B: Blep> Deref for BlepAmpFilter<B>
[src]
impl<B: Blep> DerefMut for BlepAmpFilter<B>
[src]
Auto Trait Implementations
impl<B> RefUnwindSafe for BlepAmpFilter<B> where
B: RefUnwindSafe,
<B as Blep>::SampleDelta: RefUnwindSafe,
B: RefUnwindSafe,
<B as Blep>::SampleDelta: RefUnwindSafe,
impl<B> Send for BlepAmpFilter<B> where
B: Send,
<B as Blep>::SampleDelta: Send,
B: Send,
<B as Blep>::SampleDelta: Send,
impl<B> Sync for BlepAmpFilter<B> where
B: Sync,
<B as Blep>::SampleDelta: Sync,
B: Sync,
<B as Blep>::SampleDelta: Sync,
impl<B> Unpin for BlepAmpFilter<B> where
B: Unpin,
<B as Blep>::SampleDelta: Unpin,
B: Unpin,
<B as Blep>::SampleDelta: Unpin,
impl<B> UnwindSafe for BlepAmpFilter<B> where
B: UnwindSafe,
<B as Blep>::SampleDelta: UnwindSafe,
B: UnwindSafe,
<B as Blep>::SampleDelta: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,