MCPcopy Create free account
hub / github.com/PerroEngine/Perro / remove_voice_at

Method remove_voice_at

perro_source/audio_stack/perro_pawdio/src/midi.rs:607–618  ·  view source on GitHub ↗
(&mut self, index: usize)

Source from the content-addressed store, hash-verified

605static SINE_TABLE: OnceLock<[f32; SINE_TABLE_SIZE]> = OnceLock::new();
606
607#[cfg(feature = "playback")]
608pub struct BuiltInMidiMixerSource {
609 voices: Vec<Voice>,
610 voice_index: HashMap<u64, usize>,
611 rx: Receiver<MidiMixerControl>,
612 stopped: bool,
613 sine: &'static [f32; SINE_TABLE_SIZE],
614 control_counter: u32,
615}
616
617#[cfg(feature = "playback")]
618impl BuiltInMidiMixerSource {
619 pub fn new(rx: Receiver<MidiMixerControl>) -> Self {
620 Self {
621 voices: Vec::with_capacity(BUILT_IN_MIXER_MAX_VOICES),

Callers 2

push_voiceMethod · 0.80
nextMethod · 0.80

Calls 3

removeMethod · 0.45
lenMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected