use crate::*; pub struct ArrangementAudio { model: Arc> } impl From<&Arc>> for ArrangementAudio { fn from (model: &Arc>) -> Self { Self { model: model.clone() } } } impl Audio for ArrangementAudio { #[inline] fn process (&mut self, client: &Client, scope: &ProcessScope) -> Control { for track in self.model.write().unwrap().tracks.iter_mut() { if MIDIPlayerAudio::from(&mut track.player).process(client, scope) == Control::Quit { return Control::Quit } } Control::Continue } }