mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
launch countdown/switchover, pt.4
This commit is contained in:
parent
5f112cc203
commit
6cb609f8b8
4 changed files with 25 additions and 24 deletions
|
|
@ -419,7 +419,12 @@ impl PhrasePlayer {
|
|||
pub fn samples_since_start (&self) -> Option<usize> {
|
||||
self.phrase.as_ref()
|
||||
.map(|(started,_)|started.sample().get())
|
||||
.map(|started|(started - self.clock.instant.sample().get()) as usize)
|
||||
.map(|started|(self.clock.instant.sample().get() - started) as usize)
|
||||
}
|
||||
pub fn pulses_since_start (&self) -> Option<f64> {
|
||||
self.phrase.as_ref()
|
||||
.map(|(started,_)|started.pulse().get())
|
||||
.map(|started|self.clock.instant.pulse().get() - started)
|
||||
}
|
||||
}
|
||||
impl<E: Engine> PhraseLength<E> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue