mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
refactor PhrasePlayer::process callback
This commit is contained in:
parent
0820c10f8b
commit
3df8e87840
4 changed files with 118 additions and 87 deletions
|
|
@ -403,15 +403,6 @@ impl PhrasePlayer {
|
|||
.map(|(started,_)|started.sample().get())
|
||||
.map(|started|(started - self.clock.instant.sample().get()) as usize)
|
||||
}
|
||||
pub fn playing_phrase (&self) -> Option<(usize, Arc<RwLock<Phrase>>)> {
|
||||
if let (
|
||||
Some(TransportState::Rolling), Some((started, Some(ref phrase)))
|
||||
) = (*self.clock.playing.read().unwrap(), &self.phrase) {
|
||||
Some((started.sample().get() as usize, phrase.clone()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Displays and edits phrase length
|
||||
pub struct PhraseLength<E: Engine> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue