pub struct MemoryPerformanceSource { /* private fields */ }Expand description
An in-memory PerformanceSource holding state and an optional capture.
Implementations§
Source§impl MemoryPerformanceSource
impl MemoryPerformanceSource
Sourcepub fn new(source_id: Symbol, channel: Channel) -> Self
pub fn new(source_id: Symbol, channel: Channel) -> Self
Creates an unbound source with the given id and default channel.
Sourcepub fn state(&self) -> &PerformanceSourceState
pub fn state(&self) -> &PerformanceSourceState
Returns a shared reference to the source’s state.
Sourcepub fn state_mut(&mut self) -> &mut PerformanceSourceState
pub fn state_mut(&mut self) -> &mut PerformanceSourceState
Returns a mutable reference to the source’s state.
Sourcepub fn set_octave_shift(&mut self, octave_shift: i8)
pub fn set_octave_shift(&mut self, octave_shift: i8)
Sets the octave shift applied to incoming pitches.
Sourcepub fn set_transpose(&mut self, transpose: i8)
pub fn set_transpose(&mut self, transpose: i8)
Sets the semitone transpose applied to incoming pitches.
Sourcepub fn set_scale_lock(&mut self, scale_lock: Option<ScaleLock>)
pub fn set_scale_lock(&mut self, scale_lock: Option<ScaleLock>)
Sets or clears the scale lock applied to incoming pitches.
Trait Implementations§
Source§impl Clone for MemoryPerformanceSource
impl Clone for MemoryPerformanceSource
Source§fn clone(&self) -> MemoryPerformanceSource
fn clone(&self) -> MemoryPerformanceSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryPerformanceSource
impl Debug for MemoryPerformanceSource
impl Eq for MemoryPerformanceSource
Source§impl PartialEq for MemoryPerformanceSource
impl PartialEq for MemoryPerformanceSource
Source§impl PerformanceSource for MemoryPerformanceSource
impl PerformanceSource for MemoryPerformanceSource
Source§fn bind_input(&mut self, binding: PerformanceInputBinding) -> Result<()>
fn bind_input(&mut self, binding: PerformanceInputBinding) -> Result<()>
Binds an input to this source, setting its lane and channel.
Source§fn poll_events(
&mut self,
inputs: Vec<PerformanceInput>,
) -> Result<Vec<PerformanceEvent>>
fn poll_events( &mut self, inputs: Vec<PerformanceInput>, ) -> Result<Vec<PerformanceEvent>>
Transforms queued inputs into events, updating held-note state.
Source§fn panic(&mut self, input_time: Tick) -> Result<Vec<PerformanceEvent>>
fn panic(&mut self, input_time: Tick) -> Result<Vec<PerformanceEvent>>
Emits note-offs for all held notes followed by a panic event.
Source§fn capture_start(&mut self, take_id: Symbol) -> Result<()>
fn capture_start(&mut self, take_id: Symbol) -> Result<()>
Begins capturing emitted events under
take_id.Source§fn capture_stop(&mut self) -> Result<PerformanceTake>
fn capture_stop(&mut self) -> Result<PerformanceTake>
Ends capture and returns the recorded
PerformanceTake.impl StructuralPartialEq for MemoryPerformanceSource
Auto Trait Implementations§
impl Freeze for MemoryPerformanceSource
impl RefUnwindSafe for MemoryPerformanceSource
impl Send for MemoryPerformanceSource
impl Sync for MemoryPerformanceSource
impl Unpin for MemoryPerformanceSource
impl UnsafeUnpin for MemoryPerformanceSource
impl UnwindSafe for MemoryPerformanceSource
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