GVXGUTXFNHGTF6ZYK5OEWKJ4N3IXZTRBK65D6KXB4JQG5GFLKWAQC
SXVH6NSJG4KSPJPFDXV4SKU6KL2BU2J62SO5VKQ2IUTHBE3VIZXAC
MKB2A5XCWBZO2E6QFE6PD36LF3IGMJCGJB5TGMRAPSKCKHS75ISAC
KZU3YXA22IYIPZICQTMZ4XILKCWOI5O6W4H72PDXDUTZDFVMVGVQC
OPLLJ6B6WHLEVGORJOLNZGJQZUW3RZY6TPPEJQLXFXLT5ZQTQP2QC
ASIORORAPGGVNLR42J6PZRTG7JKK34GYXBYSKSTJFXSFW6YXBJJQC
ZJ2DSL63RVPSNXIGTAZNPV6HLHOKLWC5RSK5EAAM3HIYUJ5Y3ISQC
ZW67OU7OPHAITCJS3GHQYFBRY5YGOIGRD7B4CKULAXAEXHM42KYQC
ZQD7OQ6OQB2E6CPKKT5MILYDWSR2QDNYDPCUTG3DXGY25H6ANHZQC
pub trait FundspAudioApp {
fn add_track<T: Resource>(&mut self) -> &mut Self {
self.add_track_with_sample_rate::<T>(DEFAULT_SR)
}
fn add_track_with_sample_rate<T: Resource>(&mut self, sample_rate: f64) -> &mut Self;
}
impl FundspAudioApp for App {
fn add_track_with_sample_rate<T: Resource>(&mut self, sample_rate: f64) -> &mut Self {
self.insert_resource(Track::<T> {
sample_rate,
..default()
})
}
}
// to start a new sound, fast-forward (and throw away)
// latency signals
if let Some(mut latency) = node.latency() {
while latency >= 1.0 {
latency -= 1.0;
_ = node.get_stereo();
}
} else {
// Uh-oh! We def have no outputs!!!
// Do some tricks so we immediately end.
// Make our signal a dc(0.0)
node = Box::new(dc(0.0f32));
// Set the noise floor to 1.0
settings.noise_floor = 1.0;
}