pub struct Periodic<'a> { /* private fields */ }Implementations§
Source§impl<'a> Periodic<'a>
impl<'a> Periodic<'a>
pub fn simple(waveform: Waveform, period: u16, magnitude: i16) -> Periodic<'a>
pub fn custom(data: &'a [i16]) -> Periodic<'a>
pub fn waveform(&self) -> Waveform
pub fn period(&self) -> u16
pub fn magnitude(&self) -> i16
pub fn offset(&self) -> i16
Sourcepub fn phase(&self) -> u16
pub fn phase(&self) -> u16
The phase offset in the effect’s Waveform where playback will begin.
pub fn envelope(&self) -> Envelope
pub fn with_envelope(self, env: Envelope) -> Self
Sourcepub fn custom_data(&self) -> Option<&'a [i16]>
pub fn custom_data(&self) -> Option<&'a [i16]>
If this effect has any custom waveform data attached to it, returns a reference to that data.
Also see Periodic::custom for how to create such an effect.
Trait Implementations§
impl<'a> Copy for Periodic<'a>
impl<'a> Eq for Periodic<'a>
impl<'a> StructuralPartialEq for Periodic<'a>
Auto Trait Implementations§
impl<'a> Freeze for Periodic<'a>
impl<'a> RefUnwindSafe for Periodic<'a>
impl<'a> Send for Periodic<'a>
impl<'a> Sync for Periodic<'a>
impl<'a> Unpin for Periodic<'a>
impl<'a> UnwindSafe for Periodic<'a>
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