[−][src]Struct rmus::Sink
Plays back samples from a type that implements Source.
Example
use rmus::{Source, VorbisDecoder, Sink}; fn main () { let sink = Sink::new(VorbisDecoder::new("example.ogg").unwrap()); }
Implementations
impl Sink
[src]
pub fn new<T: 'static + Source + Send + Sync>(source: T) -> Arc<Self>
[src]
This creates a new "Sink" and starts playing back the samples its source creates
pub fn toggle_playback(&self)
[src]
pub fn skip(&self, pos: f32)
[src]
Skips a certain time span in seconds. Can be negative to skip backwards.
pub fn get_length(&self) -> u32
[src]
Gets the total length in tenths of seconds.
pub fn set_rel_vol(&self, vol: i8)
[src]
Sets the volume relative to the current value.
pub fn set_vol(&self, vol: u8)
[src]
pub fn is_finished(&self) -> bool
[src]
pub fn sleep_until_end(&self)
[src]
pub fn get_vol(&self) -> u8
[src]
Gets the volume from the event loop of the Sink.
pub fn paused(&self) -> bool
[src]
Checks whether the Sink's playback is paused.
Auto Trait Implementations
impl RefUnwindSafe for Sink
impl Send for Sink
impl Sync for Sink
impl Unpin for Sink
impl UnwindSafe for Sink
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>,