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

Method process_controls

perro_source/audio_stack/perro_pawdio/src/midi.rs:582–596  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

580 }
581
582 fn process_controls(&mut self) {
583 while let Ok(cmd) = self.rx.try_recv() {
584 match cmd {
585 MidiMixerControl::Note(note) => self.push_voice(note),
586 MidiMixerControl::Release { id } => {
587 if let Some(index) = self.voice_index.get(&id).copied()
588 && let Some(voice) = self.voices.get_mut(index)
589 {
590 voice.release();
591 }
592 }
593 MidiMixerControl::Stop => self.stopped = true,
594 }
595 }
596 }
597
598 fn push_voice(&mut self, note: MidiMixerNote) {
599 if self.voices.len() >= BUILT_IN_MIXER_MAX_VOICES {

Callers 1

nextMethod · 0.80

Calls 6

push_voiceMethod · 0.80
releaseMethod · 0.80
getMethod · 0.45
get_mutMethod · 0.45
start_noteMethod · 0.45
release_noteMethod · 0.45

Tested by

no test coverage detected