use crate::{siggen::source::SourceImpl, *};
#[derive(Clone, Debug)]
pub struct Silence {
fs: StrictlyPositive,
}
impl Silence {
pub fn new(fs: StrictlyPositive) -> Self {
Self { fs }
}
}
impl SourceImpl for Silence {
fn genSignal_unscaled(&mut self, sig: &mut dyn ExactSizeIterator<Item = &mut Flt>) {
sig.for_each(|s| {
*s = 0.0;
});
}
fn fs(&self) -> StrictlyPositive {
self.fs
}
}