mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
remove unused generic; add Sequencer::player
This commit is contained in:
parent
076be5bcb3
commit
86adf493c8
5 changed files with 32 additions and 30 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue