simplify time traits

This commit is contained in:
🪞👃🪞 2024-11-01 13:31:27 +02:00
parent ad2f75bee6
commit 66f9afe500
7 changed files with 151 additions and 165 deletions

View file

@ -401,7 +401,7 @@ impl PhrasePlayer {
pub fn samples_since_start (&self) -> Option<usize> {
self.phrase.as_ref()
.map(|(started,_)|started.sample())
.map(|started|started - self.clock.sample())
.map(|started|started - self.clock.instant.sample())
}
pub fn playing_phrase (&self) -> Option<(usize, Arc<RwLock<Phrase>>)> {
if let (