pub fn collect_midi_messages(&mut self, midi_message_queue: &MidiMessageQueue) -> usize {
        let mut midi_message_count = 0;
        for _i in 0..self.capacity {
            if let Some(midi_message) = midi_message_queue.pop() {
                self.buffer.push(midi_message);
                midi_message_count += 1;
            } else {
                return midi_message_count;
            }
        }
        midi_message_count
    }
/// Push messages onto the buffer
///
/// This is real-time safe as long as `MidiAudioThreadHandler::clear` is called on every tick.
Push messages onto the buffer
This is real-time safe as long as `MidiAudioThreadHandler::clear` is called on every tick.
Push messages onto the buffer This is real - time safe as long as ` MidiAudioThreadHandler :: clear ` is called on every tick .
pub fn collect_midi_messages(&mut self, midi_message_queue: &MidiMessageQueue) -> usize {
        let mut midi_message_count = 0;
        for _i in 0..self.capacity {
            if let Some(midi_message) = midi_message_queue.pop() {
                self.buffer.push(midi_message);
                midi_message_count += 1;
            } else {
                return midi_message_count;
            }
        }
        midi_message_count
    }
pub fn collect_midi_messages ( & mut self , midi_message_queue : & MidiMessageQueue ) -> usize { let mut midi_message_count = 0 ; for _i in 0 .. self . capacity { if let Some ( midi_message ) = midi_message_queue . pop ( ) { self . buffer . push ( midi_message ) ; midi_message_count += 1 ; } else { return midi_message_count ; } } midi_message_count }
Push messages onto the buffer
This is real-time safe as long as `MidiAudioThreadHandler::clear` is called on every tick.
Push messages onto the buffer This is real - time safe as long as ` MidiAudioThreadHandler :: clear ` is called on every tick .
&mut self
midi_message_queue
&MidiMessageQueue
&mut self
midi_message_queue
&MidiMessageQueue