From 322bdd5f5f66d1930f09e193fc1f48314ec11626 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Mon, 30 Sep 2024 21:59:44 -0700 Subject: [PATCH] Rustfmt and a doc comment --- src/source/mod.rs | 4 ++-- src/source/sine.rs | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/source/mod.rs b/src/source/mod.rs index d91cabf2..932bec4c 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -27,6 +27,7 @@ pub use self::periodic::PeriodicAccess; pub use self::position::TrackPosition; pub use self::repeat::Repeat; pub use self::samples_converter::SamplesConverter; +pub use self::signal_generator::{Function, SignalGenerator}; pub use self::sine::SineWave; pub use self::skip::SkipDuration; pub use self::skippable::Skippable; @@ -34,7 +35,6 @@ pub use self::spatial::Spatial; pub use self::speed::Speed; pub use self::stoppable::Stoppable; pub use self::take::TakeDuration; -pub use self::signal_generator::{Function, SignalGenerator}; pub use self::uniform::UniformSourceIterator; pub use self::zero::Zero; @@ -59,6 +59,7 @@ mod periodic; mod position; mod repeat; mod samples_converter; +mod signal_generator; mod sine; mod skip; mod skippable; @@ -66,7 +67,6 @@ mod spatial; mod speed; mod stoppable; mod take; -mod signal_generator; mod uniform; mod zero; diff --git a/src/source/sine.rs b/src/source/sine.rs index b7591900..da4f8b2c 100644 --- a/src/source/sine.rs +++ b/src/source/sine.rs @@ -56,8 +56,11 @@ impl Source for SineWave { None } + /// `try_seek()` does nothing on the sine generator. If you need to + /// generate a sine tone with a precise phase or sample offset, consider + /// using `skip::skip_samples()`. #[inline] - fn try_seek(&mut self, pos: Duration) -> Result<(), SeekError> { - self.test_sine.try_seek(pos) + fn try_seek(&mut self, _: Duration) -> Result<(), SeekError> { + Ok(()) } }