pub struct NoteVoiceTable { /* private fields */ }Expand description
Fixed-size voice pool. No heap in apply / flush_ends after Self::new.
Implementations§
Source§impl NoteVoiceTable
impl NoteVoiceTable
pub fn new(max_voices: usize) -> NoteVoiceTable
pub fn max_voices(&self) -> usize
pub fn occupied_count(&self) -> usize
pub fn voices(&self) -> &[NoteVoice]
pub fn voice_mut(&mut self, index: usize) -> Option<&mut NoteVoice>
Sourcepub fn apply(&mut self, notes: &NoteBuffer)
pub fn apply(&mut self, notes: &NoteBuffer)
Route inbound CLAP notes. On allocates / retriggers; Off releases the
gate; Choke queues NOTE_END immediately; expressions update matches.
Sourcepub fn mark_silent(&mut self, index: usize, sample_offset: u32)
pub fn mark_silent(&mut self, index: usize, sample_offset: u32)
Envelope finished (or steal-equivalent). Next Self::flush_ends emits NOTE_END.
pub fn mark_silent_id(&mut self, note_id: i32, sample_offset: u32)
pub fn mark_all_silent(&mut self, sample_offset: u32)
Sourcepub fn flush_ends(&mut self, out: &mut NoteBuffer)
pub fn flush_ends(&mut self, out: &mut NoteBuffer)
Push queued NOTE_END events (steal + Self::mark_silent).
Auto Trait Implementations§
impl Forget for NoteVoiceTable
impl Freeze for NoteVoiceTable
impl RefUnwindSafe for NoteVoiceTable
impl Send for NoteVoiceTable
impl Sync for NoteVoiceTable
impl Unpin for NoteVoiceTable
impl UnsafeUnpin for NoteVoiceTable
impl UnwindSafe for NoteVoiceTable
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