Function audio_processor_main_with_midi

Source
pub fn audio_processor_main_with_midi<Processor: AudioProcessor<SampleType = f32> + MidiEventHandler + Send + 'static>(
    audio_processor: Processor,
    handle: &Handle,
)
Expand description

A default main function for an AudioProcessor and MidiEventHandler.

Run an AudioProcessor / MidiEventHandler as a stand-alone cpal app and forward MIDI messages received on all inputs to it. Same as audio_processor_main, but requires MidiEventHandler to support MIDI.

Will internally create cpal::Stream, [audio_processor_standalone_midi::MidiHost] and park the current thread. If the thread is unparked the function will exit and the audio/MIDI threads will stop once these structures are dropped.