From 2fbd21a41db072c9de76fb6cdd7a2771ecaed8cf Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 8 Feb 2017 16:41:52 +0100 Subject: [PATCH] Rename Pauseable to Pausable --- src/sink.rs | 2 +- src/source/mod.rs | 4 ++-- src/source/{pauseable.rs => pausable.rs} | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) rename src/source/{pauseable.rs => pausable.rs} (93%) diff --git a/src/sink.rs b/src/sink.rs index 42c8bbf..ecd1a60 100644 --- a/src/sink.rs +++ b/src/sink.rs @@ -50,7 +50,7 @@ impl Sink { S::Item: Sample, S::Item: Send { - let source = source::Pauseable::new(source, self.pause.clone(), 5); + let source = source::Pausable::new(source, self.pause.clone(), 5); let source = source::Stoppable::new(source, self.stopped.clone(), 5); let source = source::VolumeFilter::new(source, self.volume.clone(), 5); let source = source::SamplesConverter::new(source); diff --git a/src/source/mod.rs b/src/source/mod.rs index e13f3e1..c932f26 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -8,7 +8,7 @@ pub use self::delay::Delay; pub use self::empty::Empty; pub use self::fadein::FadeIn; pub use self::mix::Mix; -pub use self::pauseable::Pauseable; +pub use self::pausable::Pausable; pub use self::repeat::Repeat; pub use self::samples_converter::SamplesConverter; pub use self::sine::SineWave; @@ -25,7 +25,7 @@ mod delay; mod empty; mod fadein; mod mix; -mod pauseable; +mod pausable; mod repeat; mod samples_converter; mod sine; diff --git a/src/source/pauseable.rs b/src/source/pausable.rs similarity index 93% rename from src/source/pauseable.rs rename to src/source/pausable.rs index 67ff5bb..4662f15 100644 --- a/src/source/pauseable.rs +++ b/src/source/pausable.rs @@ -7,7 +7,7 @@ use Source; /// Filter that allows another thread to pause the stream. #[derive(Clone, Debug)] -pub struct Pauseable +pub struct Pausable where I: Source, I::Item: Sample { @@ -26,14 +26,14 @@ pub struct Pauseable samples_until_update: u32, } -impl Pauseable +impl Pausable where I: Source, I::Item: Sample { - pub fn new(source: I, remote_paused: Arc, update_ms: u32) -> Pauseable { + pub fn new(source: I, remote_paused: Arc, update_ms: u32) -> Pausable { // TODO: handle the fact that the samples rate can change let update_frequency = (update_ms * source.get_samples_rate()) / 1000; - Pauseable { + Pausable { input: source, local_paused: remote_paused.load(Ordering::Relaxed), remote_paused: remote_paused, @@ -43,7 +43,7 @@ impl Pauseable } } -impl Iterator for Pauseable +impl Iterator for Pausable where I: Source, I::Item: Sample { @@ -68,7 +68,7 @@ impl Iterator for Pauseable } } -impl Source for Pauseable +impl Source for Pausable where I: Source, I::Item: Sample {