remove unused generic; add Sequencer::player

This commit is contained in:
🪞👃🪞 2024-11-01 00:42:12 +02:00
parent 076be5bcb3
commit 86adf493c8
5 changed files with 32 additions and 30 deletions

View file

@ -19,6 +19,8 @@ pub struct Sequencer<E: Engine> {
pub phrases: Arc<RwLock<PhrasePool<E>>>,
/// Phrase editor view
pub editor: PhraseEditor<E>,
/// Phrase player
pub player: PhrasePlayer,
}
/// Sections in the sequencer app that may be focused
#[derive(Copy, Clone, PartialEq, Eq)]
@ -113,8 +115,7 @@ pub struct PhraseEditor<E: Engine> {
pub height: AtomicUsize,
}
/// Phrase player.
pub struct PhrasePlayer<E: Engine> {
_engine: PhantomData<E>,
pub struct PhrasePlayer {
/// Global timebase
pub clock: Arc<TransportTime>,
/// Start time and phrase being played
@ -371,10 +372,9 @@ impl std::cmp::PartialEq for Phrase {
fn eq (&self, other: &Self) -> bool { self.uuid == other.uuid }
}
impl Eq for Phrase {}
impl<E: Engine> PhrasePlayer<E> {
impl PhrasePlayer {
pub fn new (clock: &Arc<TransportTime>) -> Self {
Self {
_engine: Default::default(),
clock: clock.clone(),
phrase: None,
started: None,