pub struct SamplesPlayer { /* private fields */ }Expand description
Manages the applying of modifiers and the sending of samples to audio streams, transforms the original sample into IntermediateSampleType which is much more efficient. Go see ExactSamplesPlayer to send the exact sample type of the original sample to the audio streams.
Implementations§
Source§impl SamplesPlayer
impl SamplesPlayer
Sourcepub fn new<T: Sample>(samples: Samples<T>) -> SamplesPlayerwhere
IntermediateSampleType: FromSample<T>,
pub fn new<T: Sample>(samples: Samples<T>) -> SamplesPlayerwhere
IntermediateSampleType: FromSample<T>,
Creates a new SamplePlayer directly from Samples<T>
Trait Implementations§
Source§impl SamplesPlayerTrait for SamplesPlayer
impl SamplesPlayerTrait for SamplesPlayer
Source§fn metadata(&self) -> Box<dyn AudioMetadataTrait>
fn metadata(&self) -> Box<dyn AudioMetadataTrait>
Returns the metadata of the samples
Source§fn add_modifier(&mut self, modifier: Box<dyn ModifierTrait>)
fn add_modifier(&mut self, modifier: Box<dyn ModifierTrait>)
Adds a modifier
Source§fn clear_modifiers(&mut self)
fn clear_modifiers(&mut self)
Clears all modifiers and their effects
Auto Trait Implementations§
impl Freeze for SamplesPlayer
impl !RefUnwindSafe for SamplesPlayer
impl !Send for SamplesPlayer
impl !Sync for SamplesPlayer
impl Unpin for SamplesPlayer
impl !UnwindSafe for SamplesPlayer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more