Trait rsynth::backend::Stop [−][src]
A marker trait that indicates that the backend can be stopped.
Example
The following illustrates a plugin that works with backends that support stopping.
Based on some condition (plugin_has_finished
), the plugin can signal to the backend
that processing is finished by calling stop()
.
use rsynth::ContextualAudioRenderer; use rsynth::backend::{HostInterface, Stop}; use rsynth::buffer::AudioBufferInOut; struct MyPlugin { /* ... */ } impl<H> ContextualAudioRenderer<f32, H> for MyPlugin where H: HostInterface + Stop { fn render_buffer( &mut self, buffer: &mut AudioBufferInOut<f32>, context: &mut H) { let plugin_has_finished = unimplemented!(); if plugin_has_finished { context.stop(); } } }
Implementors
impl<'c, 'mp, 'mw> Stop for JackHost<'c, 'mp, 'mw>
[src]
impl<W> Stop for MidiWriterWrapper<W> where
W: MidiWriter,
[src]
W: MidiWriter,