wip: refactor pt.12, separate tek_snd

This commit is contained in:
🪞👃🪞 2024-11-10 22:24:58 +01:00
parent 47c9cd2fe8
commit 2be7aee002
28 changed files with 955 additions and 766 deletions

View file

@ -0,0 +1,22 @@
use crate::*;
pub struct ArrangementAudio {
model: Arc<RwLock<Arrangement>>
}
impl From<&Arc<RwLock<Arrangement>>> for ArrangementAudio {
fn from (model: &Arc<RwLock<Arrangement>>) -> 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 track.player.process(client, scope) == Control::Quit {
return Control::Quit
}
}
Control::Continue
}
}