mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
20 lines
684 B
Rust
20 lines
684 B
Rust
use crate::*;
|
|
|
|
impl Audio for ArrangerModel {
|
|
fn process (&mut self, client: &Client, scope: &ProcessScope) -> Control {
|
|
ArrangerRefAudio(self).process(client, scope)
|
|
}
|
|
}
|
|
|
|
pub struct ArrangerRefAudio<'a, T: ArrangerModelApi + Send + Sync>(&'a mut T);
|
|
|
|
impl<'a, T: ArrangerModelApi + Send + Sync> Audio for ArrangerRefAudio<'a, T> {
|
|
#[inline] fn process (&mut self, client: &Client, scope: &ProcessScope) -> Control {
|
|
for track in self.0.tracks_mut().iter_mut() {
|
|
if MIDIPlayerAudio::from(&mut track.player).process(client, scope) == Control::Quit {
|
|
return Control::Quit
|
|
}
|
|
}
|
|
Control::Continue
|
|
}
|
|
}
|