pub struct Tuning { /* private fields */ }Expand description
Handle passed to crate::ProcessContext for per-voice tuning queries.
Implementations§
Source§impl Tuning
impl Tuning
Sourcepub fn new(provider: Arc<dyn TuningProvider>) -> Tuning
pub fn new(provider: Arc<dyn TuningProvider>) -> Tuning
Create a tuning handle backed by provider.
Sourcepub fn apply_event(&self, event: &TuningEvent)
pub fn apply_event(&self, event: &TuningEvent)
Apply a host tuning-selection event.
Sourcepub fn relative_offset(
&self,
port_index: i32,
channel: i32,
key: i32,
sample_offset: u32,
) -> f64
pub fn relative_offset( &self, port_index: i32, channel: i32, key: i32, sample_offset: u32, ) -> f64
Relative tuning in semitones for (port, channel, key) at the given
sample offset within the current block.
Sourcepub fn should_play(&self, port_index: i32, channel: i32, key: i32) -> bool
pub fn should_play(&self, port_index: i32, channel: i32, key: i32) -> bool
Returns false when the host wants the note suppressed.
Sourcepub fn tuning_count(&self) -> u32
pub fn tuning_count(&self) -> u32
Number of tunings exposed by the host.
Sourcepub fn tuning_info(&self, index: u32) -> Option<TuningInfo>
pub fn tuning_info(&self, index: u32) -> Option<TuningInfo>
Metadata for the tuning at index.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Tuning
impl !UnwindSafe for Tuning
impl Forget for Tuning
impl Freeze for Tuning
impl Send for Tuning
impl Sync for Tuning
impl Unpin for Tuning
impl UnsafeUnpin for Tuning
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