mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-11 22:26:44 +01:00
refactor midi player api
This commit is contained in:
parent
a26a1f2967
commit
71e19c9800
11 changed files with 159 additions and 183 deletions
|
|
@ -33,7 +33,7 @@ pub enum ArrangerTrackCommand {
|
|||
SetZoom(usize),
|
||||
}
|
||||
|
||||
pub trait ArrangerTrackApi: MidiPlayerApi + Send + Sync + Sized {
|
||||
pub trait ArrangerTrackApi: HasPlayer + Send + Sync + Sized {
|
||||
/// Name of track
|
||||
fn name (&self) -> &Arc<RwLock<String>>;
|
||||
/// Preferred width of track column
|
||||
|
|
@ -78,7 +78,7 @@ impl<'a, T: ArrangerTrackApi, H: HasTracks<T>> Audio for TracksAudio<'a, T, H> {
|
|||
let note_buffer = &mut self.1;
|
||||
let output_buffer = &mut self.2;
|
||||
for track in model.tracks_mut().iter_mut() {
|
||||
if PlayerAudio(track, note_buffer, output_buffer).process(client, scope) == Control::Quit {
|
||||
if PlayerAudio(track.player_mut(), note_buffer, output_buffer).process(client, scope) == Control::Quit {
|
||||
return Control::Quit
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue