pub struct SimpleSound { /* private fields */ }Expand description
Implementations§
Source§impl SimpleSound
impl SimpleSound
Sourcepub fn new(input_gain: MathT, output_gain: MathT, generator: BlockSP) -> Self
pub fn new(input_gain: MathT, output_gain: MathT, generator: BlockSP) -> Self
Constructs a new SimpleSound object. The new object is initialized
with an empty Vec of Modifiers. Add Modifiers with
add_modifier or extend_modifiers.
Sourcepub fn add_modifier<M>(&mut self, m: BlockSP)where
M: 'static + Clone,
pub fn add_modifier<M>(&mut self, m: BlockSP)where
M: 'static + Clone,
Sourcepub fn extend_modifiers(&mut self, m_list: Vec<BlockSP>)
pub fn extend_modifiers(&mut self, m_list: Vec<BlockSP>)
Sourcepub fn get_input_gain(&self) -> MathT
pub fn get_input_gain(&self) -> MathT
Returns the linear gain applied to the input during processing.
Sourcepub fn get_output_gain(&self) -> MathT
pub fn get_output_gain(&self) -> MathT
Returns the linear gain applied to the output during processing.
Sourcepub fn set_input_gain(&mut self, g: MathT)
pub fn set_input_gain(&mut self, g: MathT)
Sets the input linear gain that is applied during processing.
Sourcepub fn set_output_gain(&mut self, g: MathT)
pub fn set_output_gain(&mut self, g: MathT)
Sets the output linear gain that is applied during processing.
Trait Implementations§
Source§impl Clone for SimpleSound
impl Clone for SimpleSound
Source§fn clone(&self) -> SimpleSound
fn clone(&self) -> SimpleSound
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Sound for SimpleSound
impl Sound for SimpleSound
Source§fn toggle_pause(&mut self)
fn toggle_pause(&mut self)
Toggles the pause state of the sound. If the sound is paused, the
internal structures aren’t process during a call to
process, instead
only Default::default() is returned.Source§fn toggle_mute(&mut self)
fn toggle_mute(&mut self)
Toggles the mute state of the sound. If the sound is muted, the internal
structures are still processed during a call to
process, but
Default::default() is returned.Source§fn unregister(&mut self)
fn unregister(&mut self)
Sets itself as unregistered and clears the saved ID. Read more
Auto Trait Implementations§
impl Freeze for SimpleSound
impl !RefUnwindSafe for SimpleSound
impl !Send for SimpleSound
impl !Sync for SimpleSound
impl Unpin for SimpleSound
impl !UnwindSafe for SimpleSound
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)