fix transport clock timebase

This commit is contained in:
🪞👃🪞 2024-11-01 15:41:19 +02:00
parent ff7ae12405
commit 21b08bf3df
6 changed files with 22 additions and 14 deletions

View file

@ -79,6 +79,14 @@ impl Timebase {
}
impl Default for Timebase { fn default () -> Self { Self::new(48000f64, 150f64, 96f64) } }
impl Instant {
pub fn zero (timebase: &Arc<Timebase>) -> Self {
Self {
usec: 0.into(),
sample: 0.into(),
pulse: 0.into(),
timebase: timebase.clone(),
}
}
pub fn from_usec (timebase: &Arc<Timebase>, usec: f64) -> Self {
Self {
usec: usec.into(),