mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
wip: refactor pt.15: 107 errors
This commit is contained in:
parent
8b68a993bc
commit
5823d0b746
8 changed files with 423 additions and 455 deletions
|
|
@ -113,12 +113,12 @@ impl ArrangementScene {
|
|||
|
||||
/// Returns true if all phrases in the scene are
|
||||
/// currently playing on the given collection of tracks.
|
||||
pub fn is_playing (&self, tracks: &[MIDIPlayer]) -> bool {
|
||||
pub fn is_playing (&self, tracks: &[ArrangementTrack]) -> bool {
|
||||
self.clips.iter().any(|clip|clip.is_some()) && self.clips.iter().enumerate()
|
||||
.all(|(track_index, clip)|match clip {
|
||||
Some(clip) => tracks
|
||||
.get(track_index)
|
||||
.map(|track|if let Some((_, Some(phrase))) = &track.phrase {
|
||||
.map(|track|if let Some((_, Some(phrase))) = &track.player.phrase {
|
||||
*phrase.read().unwrap() == *clip.read().unwrap()
|
||||
} else {
|
||||
false
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ pub enum ArrangementCommand {
|
|||
#[derive(Clone)]
|
||||
pub enum ArrangementSceneCommand {
|
||||
Add,
|
||||
Delete,
|
||||
Delete(usize),
|
||||
RandomColor,
|
||||
Play,
|
||||
Play(usize),
|
||||
Swap(usize),
|
||||
SetSize(usize),
|
||||
SetZoom(usize),
|
||||
|
|
@ -25,7 +25,7 @@ pub enum ArrangementSceneCommand {
|
|||
#[derive(Clone)]
|
||||
pub enum ArrangementTrackCommand {
|
||||
Add,
|
||||
Delete,
|
||||
Delete(usize),
|
||||
RandomColor,
|
||||
Stop,
|
||||
Swap(usize),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue